Repository navigation
fix(parser): reject NULLS FIRST/LAST in MySQL syntax - #26236
mergify[bot] merged 10 commits into
Conversation
Qodo reviews are paused for this user.Troubleshooting steps vary by plan Learn more → On a Teams plan? Using GitHub Enterprise Server, GitLab Self-Managed, or Bitbucket Data Center? |
XuPeng-SH
left a comment
There was a problem hiding this comment.
Reviewed exact head 32559c268c211444833adb3de7e6bd7cd5e886ee against current main@159742db6672ff5dadb617880b831da026f0a3f4 and its auto-merge result.
[P2] Make the startup-failure cleanup actually close partially started services.
The new t.Cleanup(c.Close) is registered before c.Start(), but it cannot provide the guarantee stated by this commit. cluster.Close() iterates services in reverse and returns on the first operator.Close() error. In the HAKeeper-timeout path being fixed, LOG has started, TN fails while waiting for HAKeeper, and CN has never started. Cleanup therefore reaches the stopped CN first, gets service already stopped, returns immediately, and leaves the started LOG plus the partially initialized TN stopper/goroutines alive. It also adds a second cleanup assertion failure that obscures the original timeout and can contaminate TestPreparedParams in the same test binary.
Please make embedded-cluster startup roll back/close every service that was started or partially initialized, continuing past never-started services, and cover the LOG-started/TN-timeout/CN-not-started sequence with a focused failure-path test. Merely ignoring the Close error would retain the leak. If startup rollback is intentionally out of scope, register cleanup only after a successful Start and remove the claim that startup failures are cleaned, but that leaves the cleanup requirement from #26299 unresolved.
The parser portion otherwise looks correct: the BVT/doc rewrites preserve MySQL default NULL ordering, the merged generated parser reproduces byte-for-byte from mysql_sql.y, and no live repository SQL still uses the rejected syntax. Verification on the current-main merge result passed: parser focused race x100, parser package race, txnexecutor focused race x2, txnexecutor package race, and embed package race.
This reverts commit 32559c2.
XuPeng-SH
left a comment
There was a problem hiding this comment.
Deep-reviewed latest exact head 5fe9b097af9f5ae6ba532f85fc5e569b18837816. The previous documentation, duplicate allocation-test, and unrelated HAKeeper changes are all resolved/reverted. The grammar now rejects NULLS FIRST/LAST consistently in top-level and window ORDER BY while preserving valid MySQL ordering; BVT rewrites are semantically equivalent for ASC/DESC NULL placement, and no live user-facing SQL still advertises the rejected syntax. Generated mysql_sql.go matches mysql_sql.y, focused parser race passed for 20 iterations, and latest-main merge is clean. No production-path performance change. No blocker found.
Merge Queue Status
This pull request spent 2 hours 16 minutes 50 seconds in the queue, including 38 minutes 41 seconds running CI. Required conditions to merge
|
What type of PR is this?
Which issue(s) this PR fixes:
issue #25332 #26243
What this PR does / why we need it:
fix(parser): reject NULLS FIRST/LAST in MySQL syntax