Is there an existing issue for the same bug?
Branch Name
3.0-dev
Commit ID
d1e78d8
Other Environment Information
- Hardware parameters: N/A (branch-compare audit)
- OS type: Darwin
- Others:
- Compared `base/main` vs `base/3.0-dev`
- Audit window: 2025-10-01 .. 2026-04-24
Actual Behavior
3.0-dev is still missing a cluster of main-only MySQL time/date compatibility fixes. The highest-priority missing work covers fractional-second precision for TIME/DATETIME/TIMESTAMP, MySQL 8.0-aligned datetime behavior, time arithmetic (TIMEDIFF / TIMEADD / TIMESUB / TIMESTAMPADD / TIMESTAMPDIFF), CURTIME, and related time-formatting / timezone-sensitive behavior.
Expected Behavior
3.0-dev should match main for user-visible time/date/datetime/timestamp behavior, especially where main already aligned semantics with MySQL 8.0.
Steps to Reproduce
1. Compare `base/main` and `base/3.0-dev` for PRs `#22708`, `#23112`, `#23150`, `#23161`, `#23051`, `#22929`, `#23761`.
2. Verify missing surfaces on `3.0-dev`:
- `git grep -n 'TIMESTAMPADD' base/3.0-dev -- pkg/sql/parsers/dialect/mysql/mysql_sql.y` -> no match
- `git grep -n 'ADDTIME' base/3.0-dev -- pkg/sql/plan/function/list_builtIn.go` -> no match
- `git cat-file -e base/3.0-dev:test/distributed/cases/function/func_datetime_curtime.test` -> missing
- `git cat-file -e base/3.0-dev:test/distributed/cases/function/func_datetime_edge_cases.test` -> missing
3. Exercise representative SQL on `3.0-dev`, for example:
- `select curtime();`
- `select timediff('10:00:00', '09:59:59');`
- `select timestampadd(second, 1, '2025-01-01 00:00:00');`
- `select timestampdiff(day, '2025-01-01', '2025-01-03');`
- `select get_format(date, 'USA');`
- TIME/DATETIME/TIMESTAMP columns with scale 0/3/6 and boundary values
- `LOAD DATA` on TIMESTAMP values under a non-default session timezone.
Additional information
Main-only reference commits:
4ae1bb45d8 Enforce fractional-second precision end-to-end for TIME/DATETIME/TIMESTAMP, align with MySQL 8.0, add comprehensive tests (#22708)
b494d87c3f fix: several datetime-related issues and improves MySQL 8.0 compatibility: (#23112)
bf7ae49546 fix: time-related mysql compatibility (#23150)
2377651895 fix: TIMESTAMPADD and TIMESTAMPDIFF compatibility with MySQL (#23161)
9f71c57837 Adding curtime. #22931 (#23051)
72791e25a1 Fix: LOAD DATA should use session timezone for TIMESTAMP parsing main (#22929)
50a63af528 fix get format date (#23761)
Non-time function/window parity is tracked separately in #24185.
Is there an existing issue for the same bug?
Branch Name
3.0-dev
Commit ID
d1e78d8
Other Environment Information
Actual Behavior
3.0-devis still missing a cluster of main-only MySQL time/date compatibility fixes. The highest-priority missing work covers fractional-second precision for TIME/DATETIME/TIMESTAMP, MySQL 8.0-aligned datetime behavior, time arithmetic (TIMEDIFF/TIMEADD/TIMESUB/TIMESTAMPADD/TIMESTAMPDIFF),CURTIME, and related time-formatting / timezone-sensitive behavior.Expected Behavior
3.0-devshould matchmainfor user-visible time/date/datetime/timestamp behavior, especially wheremainalready aligned semantics with MySQL 8.0.Steps to Reproduce
Additional information
Main-only reference commits:
4ae1bb45d8Enforce fractional-second precision end-to-end for TIME/DATETIME/TIMESTAMP, align with MySQL 8.0, add comprehensive tests (#22708)b494d87c3ffix: several datetime-related issues and improves MySQL 8.0 compatibility: (#23112)bf7ae49546fix: time-related mysql compatibility (#23150)2377651895fix: TIMESTAMPADD and TIMESTAMPDIFF compatibility with MySQL (#23161)9f71c57837Adding curtime. #22931 (#23051)72791e25a1Fix: LOAD DATA should use session timezone for TIMESTAMP parsing main (#22929)50a63af528fix get format date (#23761)Non-time function/window parity is tracked separately in
#24185.