Repository navigation
fix: enforce parent foreign key actions for REPLACE - #26383
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 edb179f. I checked parent/child and unique-index lock ordering, shared/exclusive mode propagation through local/remote/deep-copy paths, NULL key handling, old-row ownership across RESTRICT/CASCADE/SET NULL (including self-reference), and prepared-plan sensitivity to foreign_key_checks. Local full package tests for pkg/sql/plan, pkg/sql/colexec/lockop, and pkg/sql/compile pass; the focused frontend prepared-cache test, build, and vet also pass. Current CI is green.
Merge Queue Status
This pull request spent 30 minutes 20 seconds in the queue, with no time running CI. Waiting for
All conditions
ReasonPull request #26383 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? - [ ] API-change - [x] BUG - [ ] Improvement - [ ] Documentation - [ ] Feature - [ ] Test and CI - [ ] Code Refactoring ## Which issue(s) this PR fixes: issue matrixorigin#24951 ## What this PR does / why we need it: Make REPLACE apply parent-side foreign key semantics to the actual conflicting old rows. The plan now orders and materializes parent/unique-key locks before FK actions, supports RESTRICT/NO ACTION/CASCADE/SET NULL including recursive and self-referencing cases, preserves prepared-plan sensitivity to foreign_key_checks, and carries lock metadata through compile and remote execution. It also adds planner, compile, lock operator, prepared-plan, BVT, and pessimistic concurrency coverage. --------- Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
What type of PR is this?
Which issue(s) this PR fixes:
issue #24951
What this PR does / why we need it:
Make REPLACE apply parent-side foreign key semantics to the actual conflicting old rows. The plan now orders and materializes parent/unique-key locks before FK actions, supports RESTRICT/NO ACTION/CASCADE/SET NULL including recursive and self-referencing cases, preserves prepared-plan sensitivity to foreign_key_checks, and carries lock metadata through compile and remote execution.
It also adds planner, compile, lock operator, prepared-plan, BVT, and pessimistic concurrency coverage.