Repository navigation
feat(frontend): support prepared publication statements - #29386
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.
Deep review completed against head b069f6b69e52968b0a75e4a6c11aa5820ed7e211 and PR base 3f0a68bd8034d37e098765920f328985c308c9ff. No blocking findings; approved.
I traced PREPARE → SQL/binary EXECUTE → frontend publication handlers → MySQL result metadata/rows → saved-result materialization → statement cleanup. The change keeps authorization and publication-state checks at execution time. Repeated execution, missing-publication errors, access revocation, and deallocation are covered by the regression cases and existing lifecycle paths. The new metadata conversion is limited to nonbinary BLOB-family wire types and does not mutate wire metadata.
Performance/maintainability: fixed-size SHOW schemas and a column-count conversion add only bounded per-statement work; the change adds no per-row scan, RPC, lock, cache, or background task. Reusing the existing handlers and sharing the two SHOW schemas keeps the implementation proportionate.
Locally verified on Linux/amd64 with Go 1.26.4 and matched CPU CGo artifacts: all six focused new tests passed; the full ./pkg/sql/plan and ./pkg/frontend test packages passed (-count=1); build, vet, and git diff --check passed. Current-head CI Required, Linux UT, SCA, coverage, and multi-CN BVT are green.
Known scope boundary: prepared SHOW PUBLICATIONS LIKE ? is rejected explicitly. Parameter-marker support can be tracked as a separate feature request; it is not a blocker for this PR or for issue #16543.
Merge Queue Status
This pull request spent 1 minute 8 seconds in the queue, with no time running CI. ReasonPull request #29386 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
|
What type of PR is this?
Which issue(s) this PR fixes:
Fixes #16543
What this PR does / why we need it:
Complete prepared-statement support for publication management and inspection:
CREATE/ALTER/DROP PUBLICATION,SHOW PUBLICATIONS, andSHOW PUBLICATION COVERAGEthrough the existing frontend-only prepared-statement path instead of compiling an empty engine plan.SHOW CREATE PUBLICATIONquery path and cover it in end-to-end regression tests.SHOW PUBLICATIONS LIKEpatterns during PREPARE; this change does not introduce parameter-marker syntax.Tests cover PREPARE without side effects, repeated execution, missing publications, access revocation, saved results, result metadata, and reuse after errors.
Validation
mo-cgo-test:./pkg/sql/planand./pkg/frontend.publication_subscriptionBVT directory: 1,953/1,953;save_query_result: 128/128.ServerPreparedStatementinstances, with client fallback disabled; metadata, results, repeated execution, error recovery, and unsupported LIKE parameters passed.Full-repository SCA and CI are not claimed as locally verified.