From 3969e51e093ead827be345f34cc7185790209937 Mon Sep 17 00:00:00 2001 From: qw4990 Date: Wed, 29 Mar 2023 17:59:36 +0800 Subject: [PATCH] fixup --- planner/core/cache.go | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/planner/core/cache.go b/planner/core/cache.go index d544f9ac7719a..8bcc99ac577bf 100644 --- a/planner/core/cache.go +++ b/planner/core/cache.go @@ -157,9 +157,7 @@ func (s FieldSlice) CheckTypesCompatibility4PC(tps []*types.FieldType) bool { // string types will show up here, and (2) we don't need flen and decimal to be matched exactly to use plan cache tpEqual := (s[i].GetType() == tps[i].GetType()) || (s[i].GetType() == mysql.TypeVarchar && tps[i].GetType() == mysql.TypeVarString) || - (s[i].GetType() == mysql.TypeVarString && tps[i].GetType() == mysql.TypeVarchar) || - // TypeNull should be considered the same as other types. - (s[i].GetType() == mysql.TypeNull || tps[i].GetType() == mysql.TypeNull) + (s[i].GetType() == mysql.TypeVarString && tps[i].GetType() == mysql.TypeVarchar) if !tpEqual || s[i].GetCharset() != tps[i].GetCharset() || s[i].GetCollate() != tps[i].GetCollate() || (s[i].EvalType() == types.ETInt && mysql.HasUnsignedFlag(s[i].GetFlag()) != mysql.HasUnsignedFlag(tps[i].GetFlag())) { return false