Skip to content

Commit

Permalink
fixup
Browse files Browse the repository at this point in the history
  • Loading branch information
qw4990 committed Jan 28, 2023
1 parent d371b27 commit 59bfe4e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion expression/builtin_compare.go
Original file line number Diff line number Diff line change
Expand Up @@ -1638,7 +1638,7 @@ func (c *compareFunctionClass) refineArgs(ctx sessionctx.Context, args []Express
}
// year type [cmp] int constant
if arg1IsCon && arg1IsInt && arg0Type.GetType() == mysql.TypeYear && !arg1.Value.IsNull() {
if MaybeOverOptimized4PlanCache(ctx, []Expression{arg0}) {
if MaybeOverOptimized4PlanCache(ctx, []Expression{arg1}) {
ctx.GetSessionVars().StmtCtx.SetSkipPlanCache(errors.Errorf("skip plan-cache: '%v' may be converted to YEAR", arg1.String()))
RemoveMutableConst(ctx, args)
}
Expand Down

0 comments on commit 59bfe4e

Please sign in to comment.