diff --git a/br/pkg/lightning/mydump/BUILD.bazel b/br/pkg/lightning/mydump/BUILD.bazel index 1736f87af679f..24d3545571ac2 100644 --- a/br/pkg/lightning/mydump/BUILD.bazel +++ b/br/pkg/lightning/mydump/BUILD.bazel @@ -31,6 +31,7 @@ go_library( "//util/slice", "//util/table-filter", "@com_github_pingcap_errors//:errors", + "@com_github_pingcap_failpoint//:failpoint", "@com_github_xitongsys_parquet_go//parquet", "@com_github_xitongsys_parquet_go//reader", "@com_github_xitongsys_parquet_go//source", diff --git a/br/pkg/storage/BUILD.bazel b/br/pkg/storage/BUILD.bazel index 775bf93f5e56d..46150497b872b 100644 --- a/br/pkg/storage/BUILD.bazel +++ b/br/pkg/storage/BUILD.bazel @@ -11,6 +11,7 @@ go_library( "local.go", "local_unix.go", "local_windows.go", + "memstore.go", "noop.go", "parse.go", "s3.go", @@ -43,6 +44,7 @@ go_library( "@org_golang_google_api//iterator", "@org_golang_google_api//option", "@org_golang_x_oauth2//google", + "@org_uber_go_atomic//:atomic", "@org_uber_go_zap//:zap", ], ) @@ -54,6 +56,7 @@ go_test( "compress_test.go", "gcs_test.go", "local_test.go", + "memstore_test.go", "parse_test.go", "s3_test.go", "writer_test.go", diff --git a/ddl/BUILD.bazel b/ddl/BUILD.bazel index 510671699ae9d..324d39bc469ec 100644 --- a/ddl/BUILD.bazel +++ b/ddl/BUILD.bazel @@ -16,6 +16,7 @@ go_library( "generated_column.go", "index.go", "mock.go", + "multi_schema_change.go", "options.go", "partition.go", "placement_policy.go", @@ -129,6 +130,7 @@ go_test( "db_table_test.go", "db_test.go", "ddl_algorithm_test.go", + "ddl_api_test.go", "ddl_error_test.go", "ddl_test.go", "ddl_tiflash_test.go", diff --git a/ddl/failtest/BUILD.bazel b/ddl/failtest/BUILD.bazel index 21761d923b46d..97a57282e20d6 100644 --- a/ddl/failtest/BUILD.bazel +++ b/ddl/failtest/BUILD.bazel @@ -6,6 +6,7 @@ go_test( "fail_db_test.go", "main_test.go", ], + flaky = True, deps = [ "//config", "//ddl", diff --git a/ddl/placement/BUILD.bazel b/ddl/placement/BUILD.bazel index f4a888843a646..f9ece52b485fc 100644 --- a/ddl/placement/BUILD.bazel +++ b/ddl/placement/BUILD.bazel @@ -32,6 +32,7 @@ go_test( "rule_test.go", ], embed = [":placement"], + flaky = True, deps = [ "//kv", "//meta", diff --git a/ddl/util/BUILD.bazel b/ddl/util/BUILD.bazel index b741727fbc163..0047d55be5430 100644 --- a/ddl/util/BUILD.bazel +++ b/ddl/util/BUILD.bazel @@ -39,6 +39,7 @@ go_test( "syncer_test.go", ], embed = [":util"], + flaky = True, deps = [ "//ddl", "//infoschema", diff --git a/expression/aggregation/BUILD.bazel b/expression/aggregation/BUILD.bazel index d616c51d7da39..d46e4f30e9383 100644 --- a/expression/aggregation/BUILD.bazel +++ b/expression/aggregation/BUILD.bazel @@ -58,6 +58,7 @@ go_test( flaky = True, deps = [ "//expression", + "//kv", "//parser/ast", "//parser/mysql", "//sessionctx", diff --git a/parser/types/BUILD.bazel b/parser/types/BUILD.bazel index 2ef8d95e0dcd3..a771b96fced49 100644 --- a/parser/types/BUILD.bazel +++ b/parser/types/BUILD.bazel @@ -14,6 +14,7 @@ go_library( "//parser/format", "//parser/mysql", "//parser/terror", + "@com_github_cznic_mathutil//:mathutil", ], ) diff --git a/session/BUILD.bazel b/session/BUILD.bazel index 18a3620f9cf67..e6cfe0f898682 100644 --- a/session/BUILD.bazel +++ b/session/BUILD.bazel @@ -44,6 +44,7 @@ go_library( "//session/txninfo", "//sessionctx", "//sessionctx/binloginfo", + "//sessionctx/sessionstates", "//sessionctx/stmtctx", "//sessionctx/variable", "//sessiontxn", diff --git a/sessionctx/BUILD.bazel b/sessionctx/BUILD.bazel index 7b7b12b864064..3b542b3e8b0bd 100644 --- a/sessionctx/BUILD.bazel +++ b/sessionctx/BUILD.bazel @@ -9,6 +9,7 @@ go_library( "//kv", "//metrics", "//parser/model", + "//sessionctx/sessionstates", "//sessionctx/variable", "//util", "//util/kvcache", diff --git a/sessionctx/sessionstates/BUILD.bazel b/sessionctx/sessionstates/BUILD.bazel new file mode 100644 index 0000000000000..cb421dfeac1ec --- /dev/null +++ b/sessionctx/sessionstates/BUILD.bazel @@ -0,0 +1,22 @@ +load("@io_bazel_rules_go//go:def.bzl", "go_library", "go_test") + +go_library( + name = "sessionstates", + srcs = ["session_states.go"], + importpath = "github.com/pingcap/tidb/sessionctx/sessionstates", + visibility = ["//visibility:public"], + deps = [ + "//parser/types", + "//types", + ], +) + +go_test( + name = "sessionstates_test", + srcs = ["session_states_test.go"], + deps = [ + "//errno", + "//testkit", + "@com_github_stretchr_testify//require", + ], +) diff --git a/sessionctx/variable/BUILD.bazel b/sessionctx/variable/BUILD.bazel index 4d0d669a43d22..c1bfa81623030 100644 --- a/sessionctx/variable/BUILD.bazel +++ b/sessionctx/variable/BUILD.bazel @@ -30,6 +30,8 @@ go_library( "//parser/model", "//parser/mysql", "//parser/terror", + "//parser/types", + "//sessionctx/sessionstates", "//sessionctx/stmtctx", "//tidb-binlog/pump_client", "//types", diff --git a/sessiontxn/isolation/BUILD.bazel b/sessiontxn/isolation/BUILD.bazel index fe87319e1f3f1..4bdfef8220721 100644 --- a/sessiontxn/isolation/BUILD.bazel +++ b/sessiontxn/isolation/BUILD.bazel @@ -35,7 +35,7 @@ go_test( srcs = [ "main_test.go", "readcommitted_test.go", - "repeatable_reat_test.go", + "repeatable_read_test.go", "serializable_test.go", ], deps = [ diff --git a/store/mockstore/mockcopr/BUILD.bazel b/store/mockstore/mockcopr/BUILD.bazel index ba1e69c579069..1b46f031d104c 100644 --- a/store/mockstore/mockcopr/BUILD.bazel +++ b/store/mockstore/mockcopr/BUILD.bazel @@ -64,6 +64,7 @@ go_test( "//testkit/testmain", "//testkit/testsetup", "@com_github_pingcap_errors//:errors", + "@com_github_pingcap_failpoint//:failpoint", "@com_github_pingcap_kvproto//pkg/kvrpcpb", "@com_github_stretchr_testify//require", "@com_github_tikv_client_go_v2//oracle", diff --git a/util/mock/BUILD.bazel b/util/mock/BUILD.bazel index 419c942abd234..a438de7ec2cb5 100644 --- a/util/mock/BUILD.bazel +++ b/util/mock/BUILD.bazel @@ -16,6 +16,7 @@ go_library( "//parser/model", "//parser/terror", "//sessionctx", + "//sessionctx/sessionstates", "//sessionctx/variable", "//util", "//util/disk",