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: restrict statements that can be used as row sources #36977

Merged
merged 1 commit into from Apr 22, 2019

Conversation

Projects
None yet
3 participants
@RaduBerinde
Copy link
Member

commented Apr 21, 2019

We currently support all preparable statements as row sources using
the SELECT FROM [ ... ] syntax. Many of these statements are not
really useful here and each one will require work when we deprecate
the heuristic planner.

This change restricts the set of statements that can be used as row
sources to DML statements, SHOW statements, and EXPLAIN. There were no
specific tests for this functionality for any of the statements that
were removed. If we find that we need any of them, we can add them
back on a case-by-case basis.

Release note (sql change): Only SELECT, INSERT, UPDATE, UPSERT,
DELETE, SHOW, EXPLAIN are supported as data sources using the SELECT ... FROM [ ... ] syntax.

Informs #34848.

sql: restrict statements that can be used as row sources
We currently support all preparable statements as row sources using
the `SELECT FROM [ ... ]` syntax. Many of these statements are not
really useful here and each one will require work when we deprecate
the heuristic planner.

This change restricts the set of statements that can be used as row
sources to DML statements, SHOW statements, and EXPLAIN. There were no
specific tests for this functionality for any of the statements that
were removed. If we find that we need any of them, we can add them
back on a case-by-case basis.

Release note (sql change): Only SELECT, INSERT, UPDATE, UPSERT,
DELETE, SHOW, EXPLAIN are supported as data sources using the `SELECT
...  FROM [ ... ]` syntax.

Informs #34848.

@RaduBerinde RaduBerinde requested a review from knz Apr 21, 2019

@RaduBerinde RaduBerinde requested review from cockroachdb/sql-execution-prs as code owners Apr 21, 2019

@cockroach-teamcity

This comment has been minimized.

Copy link
Member

commented Apr 21, 2019

This change is Reviewable

@jordanlewis
Copy link
Member

left a comment

:lgtm: I think this is a good simplification.

Reviewable status: :shipit: complete! 1 of 0 LGTMs obtained (waiting on @knz)

@RaduBerinde

This comment has been minimized.

Copy link
Member Author

commented Apr 22, 2019

bors r+

craig bot pushed a commit that referenced this pull request Apr 22, 2019

Merge #36977
36977: sql: restrict statements that can be used as row sources r=RaduBerinde a=RaduBerinde

We currently support all preparable statements as row sources using
the `SELECT FROM [ ... ]` syntax. Many of these statements are not
really useful here and each one will require work when we deprecate
the heuristic planner.

This change restricts the set of statements that can be used as row
sources to DML statements, SHOW statements, and EXPLAIN. There were no
specific tests for this functionality for any of the statements that
were removed. If we find that we need any of them, we can add them
back on a case-by-case basis.

Release note (sql change): Only SELECT, INSERT, UPDATE, UPSERT,
DELETE, SHOW, EXPLAIN are supported as data sources using the `SELECT
...  FROM [ ... ]` syntax.

Informs #34848.

Co-authored-by: Radu Berinde <radu@cockroachlabs.com>
@craig

This comment has been minimized.

Copy link

commented Apr 22, 2019

Build succeeded

@craig craig bot merged commit c72e9bd into cockroachdb:master Apr 22, 2019

3 checks passed

GitHub CI (Cockroach) TeamCity build finished
Details
bors Build succeeded
Details
license/cla Contributor License Agreement is signed.
Details

@RaduBerinde RaduBerinde deleted the RaduBerinde:restrict-selected-stmts branch Apr 22, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.