Repository navigation
fix(plan): preserve prepare context for SHOW COLUMNS WHERE parameters - #32414
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? |
|
mo-bot review · Commit: Review completed. Read the assessment. |
XuPeng-SH
left a comment
There was a problem hiding this comment.
mo-bot review · mo-bot-local · review
Commit: 25d55b442a59a31a55d55d8d166945a6ac0be2b6
Assessment: approve
The fix narrowly preserves prepare mode through the existing SHOW rewrite, retaining authorization, dependency refresh and result metadata. Tests reuse the authenticated cluster and existing metadata BVT. No actionable findings remain.
Model: gpt-6.1-sol / max
Session: 01a1a004-90c3-73b1-acc9-3d4636452003 · slot 0 · generation 0
Validation:
-
Reviewed all six changed files, relevant owners/consumers, linked issue 32408 and every discussion entry; complete discussion ledger saved.
-
Eight focused planner regressions and the full pkg/sql/plan package passed: 4860 top-level tests, with two existing subtests skipped.
-
TestShowColumnsPreparedWhere passed twice in one process using actual binary and SQL preparation, including rebinding, NULL/empty results, schema refresh and denied access.
-
Exact baseline production overlays reproduced the intended error in all eight parameterized SQL/AST cases; candidate cases and nearest controls passed.
-
Go 1.27.1 isolation preflight, fresh native build, native integrity, formatting and clean-source checks passed. Receipts and retained logs are mapped in validation-reconciliation.json.
-
Supplied exact-head CI reports successful build, x86 UT/coverage, arm64 SCA and BVT checks.
Limitations:
-
The updated mo-tester case was not rerun locally; supplied CI statuses and author comparison reports lack raw per-case execution logs.
-
The full historical issues suite and an additional race campaign were not rerun locally.
🚫 Left the queue · pull request dequeued1 h 19 min in the queue, with no time running CI. So far
Reason Pull request #32414 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.
To get back in the queue
Merge conditions not met when it left the queue
Tick the box to put this pull request back in the merge queue (same as
2 merge conditions met
Times in UTC · dashboard · how the merge queue works |
What type of PR is this?
Which issue(s) this PR fixes:
Fixes #32408
What this PR does / why we need it:
Preserve the prepare flag when rewriting
SHOW COLUMNS/FIELDS ... WHEREinto a SELECT. Previously, the rewritten SELECT was always bound outside prepare mode, so valid WHERE parameter markers failed during both SQL PREPARE and COM_STMT_PREPARE.LIKE ?syntax.Validation (macOS arm64, Go 1.27.1, repository CGo test wrapper):
only prepare statement can use ? expr; the literal and non-prepare controls passed.pkg/sql/planpackage passed with 86.0% statement coverage. Statements associated with changed production blocks were covered 9/9.TestShowColumnsPreparedWherepassed with-count=2, exercising explicit driver preparation withinterpolateParams=falseas well as SQL PREPARE/EXECUTE.make -j8 build, gofmt, and incremental vet/lint forpkg/sql/planandpkg/tests/issuespassed (golangci-lint 2.14.0, zero issues).Validation is local; no claim is made that full repository CI or the entire historical integration-issue suite has run.