Skip to content

Commit

Permalink
executor: remove useless parameter (#30043)
Browse files Browse the repository at this point in the history
  • Loading branch information
hawkingrei committed Nov 23, 2021
1 parent efd6c5e commit 759aab5
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions executor/adapter.go
Original file line number Diff line number Diff line change
Expand Up @@ -1083,7 +1083,7 @@ func getPlanTree(sctx sessionctx.Context, p plannercore.Plan) string {
if atomic.LoadUint32(&cfg.Log.RecordPlanInSlowLog) == 0 {
return ""
}
planTree, _ := getEncodedPlan(sctx, p, false, nil)
planTree, _ := getEncodedPlan(sctx, p, false)
if len(planTree) == 0 {
return planTree
}
Expand All @@ -1103,7 +1103,7 @@ func getPlanDigest(sctx sessionctx.Context, p plannercore.Plan) (string, *parser
}

// getEncodedPlan gets the encoded plan, and generates the hint string if indicated.
func getEncodedPlan(sctx sessionctx.Context, p plannercore.Plan, genHint bool, n ast.StmtNode) (encodedPlan, hintStr string) {
func getEncodedPlan(sctx sessionctx.Context, p plannercore.Plan, genHint bool) (encodedPlan, hintStr string) {
var hintSet bool
encodedPlan = sctx.GetSessionVars().StmtCtx.GetEncodedPlan()
hintStr, hintSet = sctx.GetSessionVars().StmtCtx.GetPlanHint()
Expand Down Expand Up @@ -1161,7 +1161,7 @@ func (a *ExecStmt) SummaryStmt(succ bool) {

// No need to encode every time, so encode lazily.
planGenerator := func() (string, string) {
return getEncodedPlan(a.Ctx, a.Plan, !sessVars.InRestrictedSQL, a.StmtNode)
return getEncodedPlan(a.Ctx, a.Plan, !sessVars.InRestrictedSQL)
}
// Generating plan digest is slow, only generate it once if it's 'Point_Get'.
// If it's a point get, different SQLs leads to different plans, so SQL digest
Expand Down

0 comments on commit 759aab5

Please sign in to comment.