Skip to content

Commit cc346e2

Browse files
[release-18.0] 18.0.3 release notes: ExecuteFetchAsDBA breaking change (#15013)
Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> Co-authored-by: Deepthi Sigireddi <deepthi.sigireddi@gmail.com>
1 parent fdc8d1b commit cc346e2

File tree

2 files changed

+27
-0
lines changed

2 files changed

+27
-0
lines changed

changelog/18.0/18.0.3/summary.md

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
## Summary
2+
3+
### Table of Contents
4+
5+
- **[Major Changes](#major-changes)**
6+
- **[Breaking Changes](#breaking-changes)**
7+
- [ExecuteFetchAsDBA rejects multi-statement SQL](#execute-fetch-as-dba-reject-multi)
8+
9+
## <a id="major-changes"/>Major Changes
10+
11+
### <a id="breaking-changes"/>Breaking Changes
12+
13+
#### <a id="execute-fetch-as-dba-reject-multi"/>ExecuteFetchAsDBA rejects multi-statement SQL
14+
15+
`vtctldclient ExecuteFetchAsDBA` (and similarly the `vtctl` and `vtctlclient` commands) now reject multi-statement SQL with error.
16+
17+
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.
18+
19+
Previously, `ExecuteFetchAsDBA` silently accepted multi statement SQL. It would (attempt to) execute all of them, but:
20+
21+
- It would only indicate error for the first statement. Errors on 2nd, 3rd, ... statements were silently ignored.
22+
- 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.
23+
- 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.
24+
25+
`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.

changelog/18.0/README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
## v18.0
2+
* **[18.0.3](18.0.3)**
3+
24
* **[18.0.2](18.0.2)**
35
* [Changelog](18.0.2/changelog.md)
46
* [Release Notes](18.0.2/release_notes.md)

0 commit comments

Comments
 (0)