From 08f689f368a209596600bfae9c1d86f7af1d6408 Mon Sep 17 00:00:00 2001 From: utk9 Date: Thu, 16 Sep 2021 16:52:00 -0700 Subject: [PATCH] Use vt_dba user for online schema migration cutover phase Signed-off-by: utk9 --- go/vt/vttablet/onlineddl/executor.go | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/go/vt/vttablet/onlineddl/executor.go b/go/vt/vttablet/onlineddl/executor.go index e8e850f7cae..7ee27c8d572 100644 --- a/go/vt/vttablet/onlineddl/executor.go +++ b/go/vt/vttablet/onlineddl/executor.go @@ -679,7 +679,12 @@ func (e *Executor) cutOverVReplMigration(ctx context.Context, s *VReplStream) er vreplTable, onlineDDL.Table, swapTable, vreplTable, ) - if _, err = e.execQuery(ctx, parsed.Query); err != nil { + conn, err := dbconnpool.NewDBConnection(ctx, e.env.Config().DB.DbaWithDB()) + if err != nil { + return err + } + defer conn.Close() + if _, err = conn.ExecuteFetch(parsed.Query, 0, false); err != nil { return err } }