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

sql: RETURNING NOTHING should work outside of transactions #14551

Closed
nvanbenschoten opened this issue Apr 3, 2017 · 0 comments
Closed

sql: RETURNING NOTHING should work outside of transactions #14551

nvanbenschoten opened this issue Apr 3, 2017 · 0 comments
Assignees
Milestone

Comments

@nvanbenschoten
Copy link
Member

We currently return an error when using the RETURNING NOTHING syntax outside of transactions. We should allow the syntax and simply synchronize immediately after instead, still returning the mock result.

@nvanbenschoten nvanbenschoten added this to the 1.0 milestone Apr 3, 2017
@nvanbenschoten nvanbenschoten self-assigned this Apr 3, 2017
nvanbenschoten added a commit to nvanbenschoten/cockroach that referenced this issue Apr 12, 2017
Fixes cockroachdb#14551.

This change adds support for `RETURNING NOTHING` statements outside of
explicit transactions. Because statements running outside of an explicit
transaction have a transactional scope of exactly one statement,
parallel statement execution semantics would deem that we synchronize
immediately after running the async statement. Instead, we expose
identical behavior by simply running the statement synchronously and
mocking out the results, as is expected from `RETURNING NOTHING`
statements.
nvanbenschoten added a commit to nvanbenschoten/cockroach that referenced this issue Apr 12, 2017
Fixes cockroachdb#14551.

This change adds support for `RETURNING NOTHING` statements outside of
explicit transactions. Because statements running outside of an explicit
transaction have a transactional scope of exactly one statement,
parallel statement execution semantics would deem that we synchronize
immediately after running the async statement. Instead, we expose
identical behavior by simply running the statement synchronously and
mocking out the results, as is expected from `RETURNING NOTHING`
statements.
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

No branches or pull requests

1 participant