fix(plan): reject views referencing temporary tables - #26600
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 99a899fea7e15ec9ea17d8acb79b23b3519f095a. The invariant is enforced at the right boundary: validation runs after binding has exposed every reachable scan but before optimizer rewrites can eliminate an effectless temporary-table scan. Direct scans, derived tables, scalar subqueries, WHERE FALSE, and parenthesized SELECTs are covered, and CREATE/REPLACE/ALTER VIEW all share genViewTableDef. Both regular and system temporary table markers are handled, with the original table name preserved in MySQL error 1352. The BVT cleanup change is correct. Full owning package tests for pkg/common/moerr and pkg/sql/plan, go vet, diff checks, and remote CI pass at this head.
Merge Queue Status
This pull request spent 39 minutes 57 seconds in the queue, with no time running CI. Waiting for
All conditions
ReasonPull request #26600 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.
Failing checks:
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
|
What type of PR is this?
Which issue(s) this PR fixes:
issue #23700
What this PR does / why we need it:
fix(plan): reject views referencing temporary tables