Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

executor: remove useless parameter #30043

Merged
merged 1 commit into from
Nov 23, 2021
Merged
Changes from all 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
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