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

planner: fix small regression caused by #53094 #53646

Merged
merged 4 commits into from
May 29, 2024
Merged
Changes from 1 commit
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
Prev Previous commit
Next Next commit
fixup
qw4990 committed May 29, 2024
commit b13a21970b851a54e035b22d43aa612891c5f9f9
11 changes: 3 additions & 8 deletions pkg/planner/core/plan_cache.go
Original file line number Diff line number Diff line change
@@ -238,14 +238,9 @@ func GetPlanFromSessionPlanCache(ctx context.Context, sctx sessionctx.Context,
return generateNewPlan(ctx, sctx, isNonPrepared, is, stmt, cacheKey, latestSchemaVersion, bindSQL, matchOpts)
}

func adjustCachedPlan(
sctx sessionctx.Context,
cachedVal *PlanCacheValue,
isNonPrepared bool,
cacheKey kvcache.Key,
bindSQL string,
is infoschema.InfoSchema, stmt *PlanCacheStmt) (
base.Plan, []*types.FieldName, bool, error) {
func adjustCachedPlan(sctx sessionctx.Context, cachedVal *PlanCacheValue, isNonPrepared bool,
cacheKey kvcache.Key, bindSQL string, is infoschema.InfoSchema, stmt *PlanCacheStmt) (base.Plan,
[]*types.FieldName, bool, error) {
sessVars := sctx.GetSessionVars()
stmtCtx := sessVars.StmtCtx
if err := checkPreparedPriv(sctx, stmt, is); err != nil {