From 081a9f061d060deb53317d07980c3a45167e8016 Mon Sep 17 00:00:00 2001 From: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> Date: Tue, 23 Jan 2024 11:51:36 +0200 Subject: [PATCH 1/4] 16.0.8 release notes: ExecuteFetchAsDBA breaking change Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> --- changelog/16.0/16.0.8/changelog.md | 1 + changelog/16.0/16.0.8/release_notes.md | 16 ++++++++++++++++ 2 files changed, 17 insertions(+) create mode 100644 changelog/16.0/16.0.8/changelog.md create mode 100644 changelog/16.0/16.0.8/release_notes.md diff --git a/changelog/16.0/16.0.8/changelog.md b/changelog/16.0/16.0.8/changelog.md new file mode 100644 index 00000000000..af79593ccae --- /dev/null +++ b/changelog/16.0/16.0.8/changelog.md @@ -0,0 +1 @@ +# Changelog of Vitess v16.0.8 diff --git a/changelog/16.0/16.0.8/release_notes.md b/changelog/16.0/16.0.8/release_notes.md new file mode 100644 index 00000000000..0194c6bb956 --- /dev/null +++ b/changelog/16.0/16.0.8/release_notes.md @@ -0,0 +1,16 @@ +# Release of Vitess v16.0.8 +The entire changelog for this release can be found [here](https://github.com/vitessio/vitess/blob/main/changelog/16.0/16.0.8/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. From 05248c60f8326b9ec8b1e6293ebb97a7eb77580d Mon Sep 17 00:00:00 2001 From: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> Date: Tue, 23 Jan 2024 11:53:29 +0200 Subject: [PATCH 2/4] releases Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> --- changelog/16.0/README.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/changelog/16.0/README.md b/changelog/16.0/README.md index 86fd6e15961..6efba2f8494 100644 --- a/changelog/16.0/README.md +++ b/changelog/16.0/README.md @@ -1,5 +1,9 @@ ## v16.0 The dedicated team for this release can be found [here](team.md). +* **[16.0.8](16.0.8)** + * [Changelog](16.0.8/changelog.md) + * [Release Notes](16.0.8/release_notes.md) + * **[16.0.7](16.0.7)** * [Changelog](16.0.7/changelog.md) * [Release Notes](16.0.7/release_notes.md) From ff9787c79ff0413d4c91c94bf5850f09bdadee3a Mon Sep 17 00:00:00 2001 From: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> Date: Tue, 23 Jan 2024 16:44:30 +0200 Subject: [PATCH 3/4] summary.md Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> --- changelog/16.0/16.0.8/changelog.md | 1 - .../16.0/16.0.8/{release_notes.md => summary.md} | 13 +++++++++++-- changelog/16.0/README.md | 2 -- 3 files changed, 11 insertions(+), 5 deletions(-) delete mode 100644 changelog/16.0/16.0.8/changelog.md rename changelog/16.0/16.0.8/{release_notes.md => summary.md} (78%) diff --git a/changelog/16.0/16.0.8/changelog.md b/changelog/16.0/16.0.8/changelog.md deleted file mode 100644 index af79593ccae..00000000000 --- a/changelog/16.0/16.0.8/changelog.md +++ /dev/null @@ -1 +0,0 @@ -# Changelog of Vitess v16.0.8 diff --git a/changelog/16.0/16.0.8/release_notes.md b/changelog/16.0/16.0.8/summary.md similarity index 78% rename from changelog/16.0/16.0.8/release_notes.md rename to changelog/16.0/16.0.8/summary.md index 0194c6bb956..43d2464fdfe 100644 --- a/changelog/16.0/16.0.8/release_notes.md +++ b/changelog/16.0/16.0.8/summary.md @@ -1,8 +1,17 @@ -# Release of Vitess v16.0.8 -The entire changelog for this release can be found [here](https://github.com/vitessio/vitess/blob/main/changelog/16.0/16.0.8/changelog.md). +## Summary + +### Table of Contents + +- **[Major Changes](#major-changes)** + - **[Breaking Changes](#breaking-changes)** + - [ExecuteFetchAsDBA rejects multi-statement SQL](#execute-fetch-as-dba-reject-multi) + +## Major Changes ### Breaking Changes +#### ExecuteFetchAsDBA rejects multi-statement SQL + `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. diff --git a/changelog/16.0/README.md b/changelog/16.0/README.md index 6efba2f8494..49840b049bb 100644 --- a/changelog/16.0/README.md +++ b/changelog/16.0/README.md @@ -1,8 +1,6 @@ ## v16.0 The dedicated team for this release can be found [here](team.md). * **[16.0.8](16.0.8)** - * [Changelog](16.0.8/changelog.md) - * [Release Notes](16.0.8/release_notes.md) * **[16.0.7](16.0.7)** * [Changelog](16.0.7/changelog.md) From cf4812120f15007e74ce3b042e08153de3702f47 Mon Sep 17 00:00:00 2001 From: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> Date: Wed, 24 Jan 2024 10:46:38 +0200 Subject: [PATCH 4/4] Update changelog/16.0/16.0.8/summary.md Co-authored-by: Deepthi Sigireddi Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> --- changelog/16.0/16.0.8/summary.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/changelog/16.0/16.0.8/summary.md b/changelog/16.0/16.0.8/summary.md index 43d2464fdfe..947aabd3f68 100644 --- a/changelog/16.0/16.0.8/summary.md +++ b/changelog/16.0/16.0.8/summary.md @@ -20,6 +20,6 @@ Previously, `ExecuteFetchAsDBA` silently accepted multi statement SQL. It would - 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. +- As another side effect, multi-statement schema changes would cause schema to be reloaded with only the first 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.