diff --git a/pkg/session/bootstraptest/BUILD.bazel b/pkg/session/bootstraptest/BUILD.bazel index 67477675738cf..f63cc64645392 100644 --- a/pkg/session/bootstraptest/BUILD.bazel +++ b/pkg/session/bootstraptest/BUILD.bazel @@ -8,7 +8,7 @@ go_test( "main_test.go", ], flaky = True, - shard_count = 11, + shard_count = 12, deps = [ "//pkg/config", "//pkg/ddl", @@ -17,6 +17,7 @@ go_test( "//pkg/meta", "//pkg/parser/model", "//pkg/parser/terror", + "//pkg/planner/core", "//pkg/server/handler", "//pkg/session", #keep "//pkg/sessionctx", diff --git a/pkg/session/bootstraptest/bootstrap_upgrade_test.go b/pkg/session/bootstraptest/bootstrap_upgrade_test.go index da38f275afe76..31832bcae9f09 100644 --- a/pkg/session/bootstraptest/bootstrap_upgrade_test.go +++ b/pkg/session/bootstraptest/bootstrap_upgrade_test.go @@ -31,6 +31,7 @@ import ( "github.com/pingcap/tidb/pkg/meta" "github.com/pingcap/tidb/pkg/parser/model" "github.com/pingcap/tidb/pkg/parser/terror" + plannercore "github.com/pingcap/tidb/pkg/planner/core" "github.com/pingcap/tidb/pkg/server/handler" "github.com/pingcap/tidb/pkg/session" "github.com/pingcap/tidb/pkg/sessionctx" @@ -848,3 +849,19 @@ func TestUpgradeWithPauseDDL(t *testing.T) { " PARTITION `p3` VALUES LESS THAN (4096),\n" + " PARTITION `p4` VALUES LESS THAN (7096))")) } + +func TestUpgradeWithCrossJoinDisabled(t *testing.T) { + session.SupportUpgradeHTTPOpVer-- + ddl.SetWaitTimeWhenErrorOccurred(1 * time.Microsecond) + backup := plannercore.AllowCartesianProduct.Load() + t.Cleanup(func() { + plannercore.AllowCartesianProduct.Store(backup) + }) + plannercore.AllowCartesianProduct.Store(false) + + store, dom := session.CreateStoreAndBootstrap(t) + defer func() { + dom.Close() + require.NoError(t, store.Close()) + }() +}