Skip to content

Commit

Permalink
comments
Browse files Browse the repository at this point in the history
Signed-off-by: Shlomi Noach <[email protected]>
  • Loading branch information
shlomi-noach committed Mar 18, 2024
1 parent c2dd2f2 commit 4673113
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions go/vt/vttablet/tabletmanager/rpc_query.go
Original file line number Diff line number Diff line change
Expand Up @@ -187,8 +187,10 @@ func (tm *TabletManager) ExecuteFetchAsDba(ctx context.Context, req *tabletmanag
func(queries []string, countCreate int) error {
// Up to v19, we allow multi-statement SQL in ExecuteFetchAsDba, but only for the specific case
// where all statements are CREATE TABLE or CREATE VIEW. This is to support `ApplySchema --batch-size`.
// In v20, we will not support multi statements whatsoever.
// v20 will throw an error by virtua of using ExecuteFetch instead of ExecuteFetchMulti.
// In v20, we still support multi-statement SQL, but again only if all statements are CREATE TABLE or CREATE VIEW.
// We then also add ExecuteMultiFetchAsDba for future use of multiple statements.
// In v21 we will not tolerate multi-statement SQL in ExecuteFetchAsDba at all, and
// ExecuteMultiFetchAsDba will be the only way to execute multiple statements.
if len(queries) > 1 && len(queries) != countCreate {
return vterrors.Errorf(vtrpc.Code_INVALID_ARGUMENT, "multi statement queries are not supported in ExecuteFetchAsDba unless all are CREATE TABLE or CREATE VIEW")
}
Expand Down

0 comments on commit 4673113

Please sign in to comment.