From e3159db56d7faf67ef0f5738296c591270ded552 Mon Sep 17 00:00:00 2001 From: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> Date: Tue, 23 Jan 2024 11:59:23 +0200 Subject: [PATCH] 18.0.3 release notes: ExecuteFetchAsDBA breaking change Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> --- changelog/18.0/18.0.3/changelog.md | 1 + changelog/18.0/18.0.3/release_notes.md | 16 ++++++++++++++++ changelog/18.0/README.md | 4 ++++ 3 files changed, 21 insertions(+) create mode 100644 changelog/18.0/18.0.3/changelog.md create mode 100644 changelog/18.0/18.0.3/release_notes.md diff --git a/changelog/18.0/18.0.3/changelog.md b/changelog/18.0/18.0.3/changelog.md new file mode 100644 index 00000000000..9a40538aa57 --- /dev/null +++ b/changelog/18.0/18.0.3/changelog.md @@ -0,0 +1 @@ +# Changelog of Vitess v18.0.3 diff --git a/changelog/18.0/18.0.3/release_notes.md b/changelog/18.0/18.0.3/release_notes.md new file mode 100644 index 00000000000..8e984a81370 --- /dev/null +++ b/changelog/18.0/18.0.3/release_notes.md @@ -0,0 +1,16 @@ +# Release of Vitess v18.0.3 +The entire changelog for this release can be found [here](https://github.com/vitessio/vitess/blob/main/changelog/18.0/18.0.3/changelog.md). + +### Breaking Changes + +`vtctldclient ExecuteFetchAsDBA` (and similarly the `vtctl` and `vtctlclient` commands) now reject multi-statement SQL with error. + +For example, `vtctldclient ExecuteFetchAsDBA my-tablet "stop replica; change replication source to auto_position=1; start replica` will return an error, without attempting to execute any of these queries. + +Previously, `ExecuteFetchAsDBA` silently accepted multi statement SQL. It would (attempt to) execute all of them, but: + +- It would only indicate error for the first statement. Errors on 2nd, 3rd, ... statements were silently ignored. +- It would not consume the result sets of the 2nd, 3rd, ... statements. It would then return the used connection to the pool in a dirty state. Any further query that happens to take that connection out of the pool could get unexpected results. +- As another side effect, multi-statement schema changes would cause schema to be reloaded with only the 1st change, leaving the cached schema inconsistent with the underlying database. + +`ExecuteFetchAsDBA` does allow a specific use case of multi-statement SQL, which is where all statements are in the form of `CREATE TABLE` or `CREATE VIEW`. This is to support a common pattern of schema initialization, formalized in `ApplySchema --batch-size` which uses `ExecuteFetchAsDBA` under the hood. diff --git a/changelog/18.0/README.md b/changelog/18.0/README.md index 625ff947c5c..b02ee6b707a 100644 --- a/changelog/18.0/README.md +++ b/changelog/18.0/README.md @@ -1,4 +1,8 @@ ## v18.0 +* **[18.0.3](18.0.3)** + * [Changelog](18.0.3/changelog.md) + * [Release Notes](18.0.3/release_notes.md) + * **[18.0.2](18.0.2)** * [Changelog](18.0.2/changelog.md) * [Release Notes](18.0.2/release_notes.md)