@@ -789,7 +789,6 @@ func (b *PlanBuilder) buildDropBindPlan(v *ast.DropBindingStmt) (base.Plan, erro
789789 b .visitInfo = appendVisitInfo (b .visitInfo , mysql .SuperPriv , "" , "" , "" , nil )
790790 return p , nil
791791}
792-
793792func (b * PlanBuilder ) buildSetBindingStatusPlan (v * ast.SetBindingStmt ) (base.Plan , error ) {
794793 var p * SQLBindPlan
795794 if v .OriginNode != nil {
@@ -1276,7 +1275,7 @@ func getPossibleAccessPaths(ctx base.PlanContext, tableHints *hint.PlanHints, in
12761275
12771276 hasScanHint = true
12781277
1279- // It is syntactically valid to omit index_list for USE INDEX, which means “ use no indexes” .
1278+ // It is syntactically valid to omit index_list for USE INDEX, which means " use no indexes" .
12801279 // Omitting index_list for FORCE INDEX or IGNORE INDEX is a syntax error.
12811280 // See https://dev.mysql.com/doc/refman/8.0/en/index-hints.html.
12821281 if ! isolationReadEnginesHasTiKV && hint .IndexNames == nil {
@@ -1489,7 +1488,6 @@ func (b *PlanBuilder) buildPrepare(x *ast.PrepareStmt) base.Plan {
14891488 }
14901489 return p
14911490}
1492-
14931491func (b * PlanBuilder ) buildAdmin (ctx context.Context , as * ast.AdminStmt ) (base.Plan , error ) {
14941492 var ret base.Plan
14951493 var err error
@@ -2273,7 +2271,6 @@ func (b *PlanBuilder) getFullAnalyzeColumnsInfo(
22732271
22742272 return nil , nil , nil
22752273}
2276-
22772274func (b * PlanBuilder ) getColumnsBasedOnPredicateColumns (
22782275 tbl * resolve.TableNameW ,
22792276 predicateCols , mustAnalyzedCols * calcOnceMap ,
@@ -3067,8 +3064,8 @@ var analyzeOptionDefault = map[ast.AnalyzeOptionType]uint64{
30673064// TopN reduced from 500 to 100 due to concerns over large number of TopN values collected for customers with many tables.
30683065// 100 is more inline with other databases. 100-256 is also common for NumBuckets with other databases.
30693066var analyzeOptionDefaultV2 = map [ast.AnalyzeOptionType ]uint64 {
3070- ast .AnalyzeOptNumBuckets : 256 ,
3071- ast .AnalyzeOptNumTopN : 100 ,
3067+ ast .AnalyzeOptNumBuckets : statistics . DefaultHistogramBuckets ,
3068+ ast .AnalyzeOptNumTopN : statistics . DefaultTopNValue ,
30723069 ast .AnalyzeOptCMSketchWidth : 2048 ,
30733070 ast .AnalyzeOptCMSketchDepth : 5 ,
30743071 ast .AnalyzeOptNumSamples : 0 ,
@@ -3820,8 +3817,12 @@ func (b *PlanBuilder) buildSimple(ctx context.Context, node ast.StmtNode) (base.
38203817 }
38213818 return p , nil
38223819}
3820+ << << << < HEAD
38233821
38243822func collectVisitInfoFromRevokeStmt (sctx base.PlanContext , vi []visitInfo , stmt * ast.RevokeStmt ) ([]visitInfo , error ) {
3823+ == == == =
3824+ func collectVisitInfoFromRevokeStmt (ctx context .Context , sctx base .PlanContext , vi []visitInfo , stmt * ast.RevokeStmt ) ([]visitInfo , error ) {
3825+ >> >> >> > b75bdd1257e (stats : optimize build topn and histogram (#63285 ))
38253826 // To use REVOKE, you must have the GRANT OPTION privilege,
38263827 // and you must have the privileges that you are granting.
38273828 dbName := stmt .Level .DBName
@@ -5133,7 +5134,6 @@ func checkForUserVariables(in ast.Node) error {
51335134 }
51345135 return nil
51355136}
5136-
51375137func (b * PlanBuilder ) buildDDL (ctx context.Context , node ast.DDLNode ) (base.Plan , error ) {
51385138 var authErr error
51395139 switch v := node .(type ) {
0 commit comments