Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

parser: handle FOR UPDATE [ OF tables ] #40962

Merged
merged 2 commits into from
Sep 23, 2019

Conversation

jordanlewis
Copy link
Member

@jordanlewis jordanlewis commented Sep 21, 2019

This commit adds no-op parsing to this extension of the for locked
clause, which allows specifying a subset of the tables in the FROM list
to lock. We don't handle FOR UPDATE at all, so this syntax is also
no-op.

This commit also adds explicit "not supported" errors for the SKIP
LOCKED and NOWAIT variants, which we can't properly support at this
time.

Also, add an explicit error for DELETE FROM ... USING …

Release note (sql change): add parsing for FOR UPDATE [ OF tables ]
form, and explicit error for DELETE FROM ... USING ...
Release justification: low risk compatibility change; no functionality
changed.

This commit adds no-op parsing to this extension of the for locked
clause, which allows specifying a subset of the tables in the FROM list
to lock. We don't handle FOR UPDATE at all, so this syntax is also
no-op.

This commit also adds explicit "not supported" errors for the SKIP
LOCKED and NOWAIT variants, which we can't properly support at this
time.

Release note (sql change): add parsing for FOR UPDATE [ OF tables ]
form.
Release justification: low risk compatibility change; no functionality
changed.
@cockroach-teamcity
Copy link
Member

This change is Reviewable

Release note: None
Release justification: low-risk telemetry improvement.
@rafiss
Copy link
Collaborator

rafiss commented Sep 23, 2019

This relates to #40474 and #40476 (maybe it closes the first one)

Copy link
Collaborator

@rafiss rafiss left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

awesome! this is helpful to look at since i was interested in using the "unimplemented with issue" but didn't know how it was done

Reviewed 7 of 8 files at r1, 2 of 2 files at r2.
Reviewable status: :shipit: complete! 0 of 0 LGTMs obtained (waiting on @RaduBerinde)

@jordanlewis
Copy link
Member Author

TFTR!

bors r+

craig bot pushed a commit that referenced this pull request Sep 23, 2019
40962: parser: handle FOR UPDATE [ OF tables ] r=jordanlewis a=jordanlewis

This commit adds no-op parsing to this extension of the for locked
clause, which allows specifying a subset of the tables in the FROM list
to lock. We don't handle FOR UPDATE at all, so this syntax is also
no-op.

This commit also adds explicit "not supported" errors for the SKIP
LOCKED and NOWAIT variants, which we can't properly support at this
time.

Also, add an explicit error for DELETE FROM ... USING …

Release note (sql change): add parsing for FOR UPDATE [ OF tables ]
form, and explicit error for DELETE FROM ... USING ...
Release justification: low risk compatibility change; no functionality
changed.

Co-authored-by: Jordan Lewis <jordanthelewis@gmail.com>
@craig
Copy link
Contributor

craig bot commented Sep 23, 2019

Build succeeded

@craig craig bot merged commit 64415f6 into cockroachdb:master Sep 23, 2019
@jordanlewis jordanlewis deleted the for-update-of branch October 2, 2019 03:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants