-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
Protect ExecuteFetchAsDBA
against multi-statements, excluding a sequence of CREATE TABLE|VIEW
.
#14954
Protect ExecuteFetchAsDBA
against multi-statements, excluding a sequence of CREATE TABLE|VIEW
.
#14954
Conversation
Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com>
Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com>
…LE and CREATE VIEW sequence. Fix allowZeroInDate Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com>
Review ChecklistHello reviewers! 👋 Please follow this checklist when reviewing this Pull Request. General
Tests
Documentation
New flags
If a workflow is added or modified:
Backward compatibility
|
This PR solves the issue for |
There's a coupe of tests running |
Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com>
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## main #14954 +/- ##
==========================================
- Coverage 47.29% 47.25% -0.05%
==========================================
Files 1137 1138 +1
Lines 238684 238898 +214
==========================================
- Hits 112895 112883 -12
- Misses 117168 117407 +239
+ Partials 8621 8608 -13 ☔ View full report in Codecov by Sentry. |
Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com>
Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com>
Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com>
Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com>
Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com>
Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com>
Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com>
Looking for a 2nd review 🙏 |
Backporting was expected to have merge conflicts. Will fix one by one. |
…excluding a sequence of `CREATE TABLE|VIEW`. (#14954) (#14984) Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> Co-authored-by: vitess-bot[bot] <108069721+vitess-bot[bot]@users.noreply.github.com> Co-authored-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com>
…excluding a sequence of `CREATE TABLE|VIEW`. (#14954) (#14983) Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> Co-authored-by: vitess-bot[bot] <108069721+vitess-bot[bot]@users.noreply.github.com> Co-authored-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com>
…excluding a sequence of `CREATE TABLE|VIEW`. (#14954) (#14982) Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> Co-authored-by: vitess-bot[bot] <108069721+vitess-bot[bot]@users.noreply.github.com> Co-authored-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com>
Description
Addresses #14952 and to some extent #14949.
In this PR:
ExecuteFetchAsDBA
generally rejects any multi-statement SQL. For example, the following returns an error:CREATE TABLE
orCREATE VIEW
. This is to accommodate the already existing use case ofApplySchema --batch-size
.allowZeroInDate
parsing error as per Bug Report:ApplySchema --batch-size
fails to apply zero-date and causes prematureReloadSchema
#14952Today, it is possible to send multiple queries in
vtctldclient ExecuteFetchAsDBA
. This potentially makes the connection pool dirty, as connections in the pool could have undrained result sets from previous calls.Added tests.
This should be backported to:
v18
to fixApplySchema --batch-size
, as well as to fix the dirty connection pool issue.v17
andv16
to fix the dirty connection pool issue.Related Issue(s)
ApplySchema --batch-size
fails to apply zero-date and causes prematureReloadSchema
#14952Checklist
Deployment Notes