forked from cockroachdb/cockroach
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
sql/opt/exec: perform implicit SELECT FOR UPDATE on UPDATE with index…
… join Fixes cockroachdb#45511. This commit enables implicit row-level locking on UPDATEs with an index-join in its initial row scan. To support this, two new patterns were needed in `Builder.shouldApplyImplicitLockingToUpdateInput`: ``` (Update $input:(IndexJoin $input:(Scan $scanPrivate:*) $indexJoinPrivate:* ) $checks:* $mutationPrivate:* ) AND (Update $input:(Project $input:(IndexJoin $input:(Scan $scanPrivate:*) $indexJoinPrivate:* ) $projections:* $passthrough:* ) $checks:* $mutationPrivate:* ) ``` These extra patterns are pushing the limits of this form of pattern matching, but this is ok for the next release. If/when we want to make any more general, we should strongly consider Andy's proposal to fold the patten matching and analysis into the explorer rather than execbuilder.
- Loading branch information
1 parent
eba2585
commit 47d6ec8
Showing
2 changed files
with
99 additions
and
31 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters