load("@io_bazel_rules_go//go:def.bzl", "go_library", "go_test") go_library( name = "bindinfo", srcs = [ "bind_cache.go", "bind_record.go", "handle.go", "session_handle.go", "stat.go", ], importpath = "github.com/pingcap/tidb/bindinfo", visibility = ["//visibility:public"], deps = [ "//kv", "//metrics", "//parser", "//parser/ast", "//parser/format", "//parser/mysql", "//parser/terror", "//sessionctx", "//sessionctx/sessionstates", "//sessionctx/stmtctx", "//sessionctx/variable", "//types", "//types/parser_driver", "//util/chunk", "//util/hack", "//util/hint", "//util/kvcache", "//util/logutil", "//util/mathutil", "//util/memory", "//util/parser", "//util/sqlexec", "//util/stmtsummary", "//util/table-filter", "//util/timeutil", "@org_golang_x_exp//maps", "@org_uber_go_zap//:zap", ], ) go_test( name = "bindinfo_test", timeout = "short", srcs = [ "bind_cache_test.go", "bind_test.go", "capture_test.go", "handle_test.go", "main_test.go", "optimize_test.go", "session_handle_test.go", "temptable_test.go", ], embed = [":bindinfo"], flaky = True, race = "on", shard_count = 50, deps = [ "//config", "//domain", "//errno", "//metrics", "//parser", "//parser/auth", "//parser/model", "//parser/terror", "//server", "//sessionctx/variable", "//testkit", "//testkit/testsetup", "//util", "//util/hack", "//util/parser", "//util/stmtsummary", "@com_github_pingcap_failpoint//:failpoint", "@com_github_prometheus_client_model//go", "@com_github_stretchr_testify//require", "@io_opencensus_go//stats/view", "@org_uber_go_goleak//:goleak", ], )