Repository navigation
fix: honor UPDATE IGNORE on duplicate keys - #25706
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? |
There was a problem hiding this comment.
Re-reviewed the latest head d242c9e.
The previous blocker is fixed: UPDATE IGNORE now propagates the old-row identity, excludes its own old-key match, preserves an existing key owner independent of input order, and rebuilds the survivor/group mappings after filtering. I also checked multi-unique-key interactions, nullable unique keys, shuffle and join orientation, cleanup, and bounded-memory behavior.
Local validation passed:
- focused hashbuild and dedupjoin regressions repeated 20x
- planner regressions repeated 10x and parser package repeated 5x
- full relevant package tests
- focused race tests repeated 5x
- go vet on all relevant packages
The current CI is green. I found no remaining correctness, performance, or unhappy-path merge blocker.
Summary
IGNOREmodifier in the UPDATE AST and formatterNode_IGNOREaction for primary-key and unique-key conflictsMULTI_UPDATE, keeping their original data unchangedSHOW WARNINGSemission is unchanged; this PR fixes the reported skip-without-error behavior.Validation
go test -count=1 ./pkg/sql/parsers/dialect/mysqlgo test -count=1 -run ^TestUpdateIgnoreUsesIgnoreDedupAction$ ./pkg/sql/plango vet ./pkg/sql/parsers/dialect/mysql ./pkg/sql/planmake buildROW_COUNT()is 0, and the row remains unchangedFixes #25347