Skip to content
Merged
Show file tree
Hide file tree
Changes from 16 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 3 additions & 8 deletions pkg/planner/core/planbuilder.go
Original file line number Diff line number Diff line change
Expand Up @@ -792,7 +792,6 @@ func (b *PlanBuilder) buildDropBindPlan(v *ast.DropBindingStmt) (base.Plan, erro
b.visitInfo = appendVisitInfo(b.visitInfo, mysql.SuperPriv, "", "", "", nil)
return p, nil
}

func (b *PlanBuilder) buildSetBindingStatusPlan(v *ast.SetBindingStmt) (base.Plan, error) {
var p *SQLBindPlan
if v.OriginNode != nil {
Expand Down Expand Up @@ -1299,7 +1298,7 @@ func getPossibleAccessPaths(ctx base.PlanContext, tableHints *hint.PlanHints, in

hasScanHint = true

// It is syntactically valid to omit index_list for USE INDEX, which means use no indexes.
// It is syntactically valid to omit index_list for USE INDEX, which means "use no indexes".
// Omitting index_list for FORCE INDEX or IGNORE INDEX is a syntax error.
// See https://dev.mysql.com/doc/refman/8.0/en/index-hints.html.
if !isolationReadEnginesHasTiKV && hint.IndexNames == nil {
Expand Down Expand Up @@ -1471,7 +1470,6 @@ func (b *PlanBuilder) buildPrepare(x *ast.PrepareStmt) base.Plan {
}
return p
}

func (b *PlanBuilder) buildAdmin(ctx context.Context, as *ast.AdminStmt) (base.Plan, error) {
var ret base.Plan
var err error
Expand Down Expand Up @@ -2253,7 +2251,6 @@ func (b *PlanBuilder) getFullAnalyzeColumnsInfo(

return nil, nil, nil
}

func (b *PlanBuilder) getColumnsBasedOnPredicateColumns(
tbl *resolve.TableNameW,
predicateCols, mustAnalyzedCols *calcOnceMap,
Expand Down Expand Up @@ -3041,8 +3038,8 @@ var analyzeOptionDefault = map[ast.AnalyzeOptionType]uint64{
// TopN reduced from 500 to 100 due to concerns over large number of TopN values collected for customers with many tables.
// 100 is more inline with other databases. 100-256 is also common for NumBuckets with other databases.
var analyzeOptionDefaultV2 = map[ast.AnalyzeOptionType]uint64{
ast.AnalyzeOptNumBuckets: 256,
ast.AnalyzeOptNumTopN: 100,
ast.AnalyzeOptNumBuckets: statistics.DefaultHistogramBuckets,
ast.AnalyzeOptNumTopN: statistics.DefaultTopNValue,
ast.AnalyzeOptCMSketchWidth: 2048,
ast.AnalyzeOptCMSketchDepth: 5,
ast.AnalyzeOptNumSamples: 0,
Expand Down Expand Up @@ -3818,7 +3815,6 @@ func (b *PlanBuilder) buildSimple(ctx context.Context, node ast.StmtNode) (base.
}
return p, nil
}

func collectVisitInfoFromRevokeStmt(ctx context.Context, sctx base.PlanContext, vi []visitInfo, stmt *ast.RevokeStmt) ([]visitInfo, error) {
// To use REVOKE, you must have the GRANT OPTION privilege,
// and you must have the privileges that you are granting.
Expand Down Expand Up @@ -5205,7 +5201,6 @@ func checkForUserVariables(in ast.Node) error {
}
return nil
}

func (b *PlanBuilder) buildDDL(ctx context.Context, node ast.DDLNode) (base.Plan, error) {
var authErr error
switch v := node.(type) {
Expand Down
4 changes: 3 additions & 1 deletion pkg/statistics/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ go_library(
"cmsketch.go",
"cmsketch_util.go",
"column.go",
"constants.go",
"debugtrace.go",
"estimate.go",
"fmsketch.go",
Expand Down Expand Up @@ -47,6 +48,7 @@ go_library(
"//pkg/util/context",
"//pkg/util/dbterror",
"//pkg/util/fastrand",
"//pkg/util/generic",
"//pkg/util/hack",
"//pkg/util/intest",
"//pkg/util/logutil",
Expand Down Expand Up @@ -83,7 +85,7 @@ go_test(
data = glob(["testdata/**"]),
embed = [":statistics"],
flaky = True,
shard_count = 42,
shard_count = 43,
deps = [
"//pkg/config",
"//pkg/config/kerneltype",
Expand Down
Loading