diff --git a/go/test/endtoend/onlineddl/vtgate_util.go b/go/test/endtoend/onlineddl/vtgate_util.go index 6c26320b472..639b3ce8eb4 100644 --- a/go/test/endtoend/onlineddl/vtgate_util.go +++ b/go/test/endtoend/onlineddl/vtgate_util.go @@ -257,7 +257,8 @@ func CheckForceMigrationCutOver(t *testing.T, vtParams *mysql.ConnParams, shards // CheckMigrationStatus verifies that the migration indicated by given UUID has the given expected status func CheckMigrationStatus(t *testing.T, vtParams *mysql.ConnParams, shards []cluster.Shard, uuid string, expectStatuses ...schema.OnlineDDLStatus) bool { - query, err := sqlparser.ParseAndBind("show vitess_migrations like %a", + ksName := shards[0].PrimaryTablet().VttabletProcess.Keyspace + query, err := sqlparser.ParseAndBind(fmt.Sprintf("show vitess_migrations from %s like %%a", ksName), sqltypes.StringBindVariable(uuid), ) require.NoError(t, err) diff --git a/go/test/endtoend/transaction/twopc/stress/stress_test.go b/go/test/endtoend/transaction/twopc/stress/stress_test.go index 56b6832d1c7..5baee342bec 100644 --- a/go/test/endtoend/transaction/twopc/stress/stress_test.go +++ b/go/test/endtoend/transaction/twopc/stress/stress_test.go @@ -338,7 +338,7 @@ func waitForMigrationStatus(t *testing.T, vtParams *mysql.ConnParams, shards []c for _, shard := range shards { shardNames[shard.Name] = true } - query := fmt.Sprintf("show vitess_migrations like '%s'", uuid) + query := fmt.Sprintf("show vitess_migrations from %s like '%s'", keyspaceName, uuid) statusesMap := map[string]bool{} for _, status := range expectStatuses {