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: add batch DELETE syntax #104157

Closed
ecwall opened this issue May 31, 2023 · 0 comments · Fixed by #104160
Closed

sql: add batch DELETE syntax #104157

ecwall opened this issue May 31, 2023 · 0 comments · Fixed by #104160
Assignees
Labels
A-sql-syntax Issues strictly related to the SQL grammar, with no semantic aspect C-enhancement Solution expected to add code/behavior + preserve backward-compat (pg compat issues are exception) T-sql-foundations SQL Foundations Team (formerly SQL Schema + SQL Sessions)

Comments

@ecwall
Copy link
Contributor

ecwall commented May 31, 2023

Add the following DELETE syntax in preparation of bulk delete:

  • DELETE BATCH FROM - To use the the default batch size
  • DELETE BATCH (SIZE expr) FROM - To use the specified batch size

These will return unimplemented errors for now.

The syntax fulfills the following requirements:

  1. DELETE keyword comes first because some tools look at the first keyword to determine what type of statement it is.
  2. New BATCH params can be added in the future in a backward compatible way.
  3. BATCH params (only SIZE for now) are order-independent for usability.
  4. SIZE value is an expression to allow composing a DELETE statement from subqueries.

Jira issue: CRDB-28377

Epic CRDB-456

@ecwall ecwall added C-enhancement Solution expected to add code/behavior + preserve backward-compat (pg compat issues are exception) A-sql-syntax Issues strictly related to the SQL grammar, with no semantic aspect T-sql-foundations SQL Foundations Team (formerly SQL Schema + SQL Sessions) labels May 31, 2023
@ecwall ecwall self-assigned this May 31, 2023
@ecwall ecwall changed the title sql: add [BATCH [SIZE x]] DELETE FROM syntax sql: add batch DELETE syntax Jun 13, 2023
craig bot pushed a commit that referenced this issue Jun 22, 2023
104160: sql: add batch DELETE syntax r=rafiss a=ecwall

Fixes #104157

This change adds the following DELETE syntax in preparation of bulk delete:
`DELETE BATCH FROM` - To use the the default batch size
`DELETE BATCH (SIZE expr) FROM` - To use the specified batch size
These will return unimplemented errors for now.

The syntax fulfills the following requirements:
1) DELETE keyword comes first because some tools look at the first keyword to
   determine what type of statement it is.
2) New BATCH params can be added in the future in a backward compatible way.
3) BATCH params (only SIZE for now) are order-independent for usability.
4) SIZE value is an expression to allow composing a DELETE statement from
   subqueries.

Release note: None

105180: roachtest: pass monitor via `makeFailer` in `failover` tests r=erikgrinaker a=erikgrinaker

Previously, we propagated the cluster monitor via `Failer.Ready()`, since the cluster hadn't been started yet when we constructed the failer (it might have to e.g. mess with the disk setup first). However, if `Failer.Cleanup()` relied on the monitor, and the test failed before `Ready()` was called, it could result in a nil pointer panic.

It turns out the monitor doesn't actually monitor anything until we call `Wait()` on it, so we can safely construct it before starting the cluster. This patch therefore propagates the monitor via `makeFailer()` instead, such that it's never unset.

Touches #104665.

Epic: none
Release note: None

105347: security: add back 22.1 TLS ciphers r=kpatron-cockroachlabs a=kpatron-cockroachlabs

Previously, only some of the TLS ciphers that were valid in 22.1 were available even with `COCKROACH_TLS_ENABLE_OLD_CIPHER_SUITES` set. This produced a problem for some customers who upgrade to 22.2 as their applications suddenly might be unable to connect.

This change adds back the full list of 22.1 cipher suites behind the environment variable.

Note: this takes us away from the path of following the Mozilla standard for old cipher suites in favor of being consistent with old versions.

fixes: CC-24958

Release note (security update): The full set of TLS ciphers that was present in 22.1 have ben included in the old cipher suites list, which can be enabled with the
`COCKROACH_TLS_ENABLE_OLD_CIPHER_SUITES` environment variable

Co-authored-by: Evan Wall <[email protected]>
Co-authored-by: Erik Grinaker <[email protected]>
Co-authored-by: Kyle Patron <[email protected]>
@craig craig bot closed this as completed in 9e7aee6 Jun 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-sql-syntax Issues strictly related to the SQL grammar, with no semantic aspect C-enhancement Solution expected to add code/behavior + preserve backward-compat (pg compat issues are exception) T-sql-foundations SQL Foundations Team (formerly SQL Schema + SQL Sessions)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant