diff --git a/go/test/endtoend/vtgate/foreignkey/main_test.go b/go/test/endtoend/vtgate/foreignkey/main_test.go index cf01ca37de0..eaeae4eeb9b 100644 --- a/go/test/endtoend/vtgate/foreignkey/main_test.go +++ b/go/test/endtoend/vtgate/foreignkey/main_test.go @@ -35,8 +35,8 @@ var ( clusterInstance *cluster.LocalProcessCluster vtParams mysql.ConnParams shardedKs = "ks" - shardedKsShards = []string{"-19a0", "19a0-20", "20-20c0", "20c0-"} Cell = "test" + //go:embed sharded_schema.sql shardedSchemaSQL string @@ -65,12 +65,7 @@ func TestMain(m *testing.M) { VSchema: shardedVSchema, } - err = clusterInstance.StartKeyspace(*sKs, shardedKsShards, 0, false) - if err != nil { - return 1 - } - - err = clusterInstance.VtctlclientProcess.ExecuteCommand("RebuildVSchemaGraph") + err = clusterInstance.StartKeyspace(*sKs, []string{"-80", "80-"}, 0, false) if err != nil { return 1 } diff --git a/go/vt/sqlparser/ast_funcs.go b/go/vt/sqlparser/ast_funcs.go index a88883339f4..3c8e917bb5d 100644 --- a/go/vt/sqlparser/ast_funcs.go +++ b/go/vt/sqlparser/ast_funcs.go @@ -2495,8 +2495,8 @@ func (ty KillType) ToString() string { } } -// Indexes returns true, -// if the list of columns contains all the elements in the other list provided along with their indexes. +// Indexes returns true, if the list of columns contains all the elements in the other list. +// It also returns the indexes of the columns in the list. func (cols Columns) Indexes(subSetCols Columns) (bool, []int) { var indexes []int for _, subSetCol := range subSetCols { diff --git a/go/vt/vtgate/planbuilder/plan_test.go b/go/vt/vtgate/planbuilder/plan_test.go index c15e7074190..c8cdfbf7a0a 100644 --- a/go/vt/vtgate/planbuilder/plan_test.go +++ b/go/vt/vtgate/planbuilder/plan_test.go @@ -112,7 +112,7 @@ func TestForeignKeyPlanning(t *testing.T) { } testOutputTempDir := makeTestOutput(t) - testFile(t, "fk_cases.json", testOutputTempDir, vschemaWrapper, false) + testFile(t, "foreignkey_cases.json", testOutputTempDir, vschemaWrapper, false) } func TestSystemTables57(t *testing.T) { diff --git a/go/vt/vtgate/planbuilder/testdata/fk_cases.json b/go/vt/vtgate/planbuilder/testdata/foreignkey_cases.json similarity index 100% rename from go/vt/vtgate/planbuilder/testdata/fk_cases.json rename to go/vt/vtgate/planbuilder/testdata/foreignkey_cases.json