Skip to content

Commit

Permalink
fixup
Browse files Browse the repository at this point in the history
  • Loading branch information
qw4990 committed Dec 29, 2022
1 parent 7192868 commit 1184997
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion planner/core/plan_cache.go
Original file line number Diff line number Diff line change
Expand Up @@ -280,7 +280,7 @@ func generateNewPlan(ctx context.Context, sctx sessionctx.Context, isNonPrepared
if containTableDual(p) && paramNum > 0 {
stmtCtx.SetSkipPlanCache(errors.New("skip plan-cache: get a TableDual plan"))
}
if stmtAst.UseCache && !ignorePlanCache {
if stmtCtx.UseCache && !ignorePlanCache {
// rebuild key to exclude kv.TiFlash when stmt is not read only
if _, isolationReadContainTiFlash := sessVars.IsolationReadEngines[kv.TiFlash]; isolationReadContainTiFlash && !IsReadOnly(stmtAst.Stmt, sessVars) {
delete(sessVars.IsolationReadEngines, kv.TiFlash)
Expand Down

0 comments on commit 1184997

Please sign in to comment.