Repository navigation
fix: make SHOW metadata identifiers safe - #31033
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? |
173a706 to
ddab2dd
Compare
ddab2dd to
3953ab4
Compare
…cbdb926b48bd21872318cac7036f0efe3176518
|
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: eb1c0a92e091eb58390b5dcffafac765f6554543
Assessment: approve
Reviewed the complete delta and affected callers; no actionable findings remain. The change reuses the shared SQL quoting owner, resolves temporary metadata through the physical table name, and consistently updates SHOW COLUMNS protocol metadata. Added work is confined to SHOW metadata construction, without new queries, shared state, or ordinary SELECT/DML overhead.
Model: gpt-6-astra / xhigh
Session: 01a13dcf-1586-7a01-9000-d45e20995cf8 · slot 1 · generation 1
Validation:
-
Passed 46 selected tests: 28 planner, 16 frontend, and 2 embedded SQL tests, with no failures or skips. Coverage includes quoted identifiers, temporary-table metadata, secondary-index statistics, and real MySQL result types.
-
Passed go vet for all three affected packages, changed-file Go formatting and whitespace checks, and source-cleanliness verification.
-
Isolation preflight passed. Verified 192 native build inputs and the retained library through the repository provenance owner before testing.
-
Reconciled commands, frozen-head fingerprints, zero exit receipts, and retained logs in /home/xupeng/.local/state/mo-bot/jobs/983cf46cc004f6c9df738fd3/attempt-1/evidence-audit.json. Frozen CI success statuses provide supplemental coverage.
Limitations:
-
Issue #30545's body was absent from frozen evidence; reviewed the behavioral contracts described in the PR and regression tests.
-
Full distributed suites were not rerun locally. No performance benchmark was run; the performance assessment follows the bounded SHOW-only code changes.
Merge Queue Status
This pull request spent 5 hours 46 minutes 1 second in the queue, with no time running CI. ReasonPull request #31033 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. Tick the box to put this pull request back in the merge queue (same as
|
…cbdb926b48bd21872318cac7036f0efe3176518
…cbdb926b48bd21872318cac7036f0efe3176518
What type of PR is this?
Which issue(s) this PR fixes:
What this PR does / why we need it:
SHOW metadata commands generated SQL with unescaped table and column names, so valid identifiers containing apostrophes caused syntax errors. SHOW COLUMNS also looked up session temporary tables by their SQL alias instead of their physical catalog relation, returning no columns.
This change uses the shared SQL literal quoting helper for SHOW TABLE STATUS, SHOW COLUMNS, and SHOW INDEX generated SQL. It keeps temporary table display names separate from physical catalog names, so metadata output preserves the user-visible identifier while catalog scans use the resolved relation. Regression coverage includes quoted table and indexed-column names, permanent controls, and all DESC/SHOW COLUMNS variants on a live temporary table.
Validation completed at the reviewed HEAD:
pkg/sql/planpackage: passpkg/frontendpackage: passTestIssue30545ShowMetadataQuotedAndTemporaryTables: passThe issue reporter should verify the SHOW metadata behavior after this PR is merged.