Repository navigation
fix(mysql): support SHOW GRANTS FOR CURRENT_USER - #29993
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? |
|
Reviewed head Recommendation: approve from the code-review perspective, subject to required CI passing. No confirmed blocker in this syntax compatibility fix. The new production accepts both CURRENT_USER forms, retains the AST distinction through Independent exact-head validation with linked CGo:
Non-blocking test improvement: the added planner cases only log errors from the incomplete mock catalog, so they would also pass if planning failed for an unintended reason. Add a durable successful execution assertion like the above, or constrain the expected mock failure. My runtime probe covers the normal current-user forms, not tenant isolation, non-default host accounts or role-specific USING semantics. Those existing semantics are not established by this review. At posting time preflight/shared build passed, while owning UT/SCA/coverage and active BVT checks were still queued/running. Merge should wait for required CI. I did not run complete owning-package suites or independently regenerate the parser. Ordinary PR comment only; no formal review state changed. |
|
mo-bot review · Commit: Assessment: approve Reviewed the complete five-file delta and affected parser, formatter, frontend and planner paths. Both CURRENT_USER forms reuse existing session identity resolution and grant execution. No actionable PR-introduced defect found. Model: Session: Validation:
Limitations:
|
XuPeng-SH
left a comment
There was a problem hiding this comment.
mo-bot review · mo-bot-local · review
Commit: 5c5759ad0f43e79c31977578fcba8bb6efe59187
Assessment: approve
Reviewed the complete five-file delta and affected parser, formatter, frontend and planner paths. Both CURRENT_USER forms reuse existing session identity resolution and grant execution. No actionable PR-introduced defect found.
Model: gpt-6-astra / xhigh
Session: 01a12d8f-7dea-77c2-a565-38d45b5564e4 · slot 0 · generation 0
Validation:
-
Independently regenerated the parser using the frozen repository generator: byte-identical output and zero parsing conflicts.
-
Reused exact-head evidence in comment 6120399021: targeted tests passed, and an authenticated SQL probe returned identical nonempty grant multisets for both new forms, SHOW GRANTS and the explicit current account.
-
Frozen CI records successful UT, SCA, coverage, proxy BVT, pessimistic multi-CN BVT and required checks.
-
Reviewed all supplied comments, syntax boundaries, identity ownership, compatibility and resource implications.
-
Verified assigned HEAD, clean source checkout and passing git diff --check.
Limitations:
-
Planner cases still only log planning errors; accepted as a nonblocking coverage weakness given the parser assertions and reported exact-head execution probe.
-
Runtime evidence was reused from the frozen author report; no native tests were rerun.
-
The linked issue's full text was unavailable; scope follows the frozen PR's explicit behavioral contract.
-
No independent tenant, non-default-host, USING-semantics or performance tests were run; unchanged behavior is not claimed newly validated.
Merge Queue Status
This pull request spent 5 minutes 3 seconds in the queue, with no time running CI. ReasonPull request #29993 has been dequeued Pull request from fork cannot be queued. This pull request comes from a fork, and Mergify needs the author's permission to update its branch.
HintYou should look at the reason for the failure and decide if the pull request needs to be fixed or if you want to requeue it. Waiting for any of
All conditions
Tick the box to put this pull request back in the merge queue (same as
|
Metabase sync-fields queries produce computed BOOLEAN results that Connector/J must expose as Number. Advertise these results with TINYINT width 8 while retaining BOOL value encoding. Stored BOOLEAN columns keep width 1 and Java Boolean metadata. The separate SHOW GRANTS parser issue was fixed by #29993. Resolve value provenance through the existing JOIN routing owner, keeping origin/key barriers intact. An extraction-local dependency graph handles shared/recursive producers without repeated traversal or output-order-dependent false results. It follows the correct aggregate/SAMPLE offsets, set-operation ownership, MARK markers and window value/default arguments. Lazy projection/binding indexes avoid repeated wide-JOIN scans; immutable reference keys reduce graph storage without a global cache or plan mutation. Non-BOOL outputs bypass classification. Validation on the rebased source includes normal/race metadata and affected lifecycle tests, incremental SCA across the complete 11-package delivery closure, and real Connector/J 8.4.0 execution: 222 JOIN/composed cases, 144 MARK cases and the window probe, covering Statement, client-prepared and verified server-prepared execution. Identical real-binder shared/recursive probes preserve result kinds and node counts. Compact keys reduce allocated bytes at the larger sizes from 32.9 to 20.1 MB (stored BOOL), 28.4 to 17.2 MB (computed BOOL), and 155.4 to 95.7 MB (recursive). These are metadata-extraction TotalAlloc measurements, not peak memory or SQL throughput. Full CI and TP throughput are not claimed. Approved by: @XuPeng-SH, @aptend, @aunjgr
What type of PR is this?
Which issue(s) this PR fixes:
issue #29952
What this PR does / why we need it:
Accept both
SHOW GRANTS FOR CURRENT_USERandSHOW GRANTS FOR CURRENT_USER(). The parser records the current-user form, and the existing plan builder resolves it to the authenticated session identity. Added parser and plan regressions.