diff --git a/pkg/expression/contextstatic/exprctx.go b/pkg/expression/contextstatic/exprctx.go index af6d903b2232e..f6adac24c4436 100644 --- a/pkg/expression/contextstatic/exprctx.go +++ b/pkg/expression/contextstatic/exprctx.go @@ -162,7 +162,7 @@ func NewStaticExprContext(opts ...StaticExprCtxOption) *StaticExprContext { staticExprCtxState: staticExprCtxState{ charset: cs.Name, collation: cs.DefaultCollation, - defaultCollationForUTF8MB4: variable.DefaultCollationForUTF8MB4, + defaultCollationForUTF8MB4: mysql.DefaultCollationName, blockEncryptionMode: variable.DefBlockEncryptionMode, sysDateIsNow: variable.DefSysdateIsNow, noopFuncsMode: variable.TiDBOptOnOffWarn(variable.DefTiDBEnableNoopFuncs), diff --git a/pkg/expression/contextstatic/exprctx_test.go b/pkg/expression/contextstatic/exprctx_test.go index 0924ef73a4f1a..fa358402f1ed3 100644 --- a/pkg/expression/contextstatic/exprctx_test.go +++ b/pkg/expression/contextstatic/exprctx_test.go @@ -70,7 +70,7 @@ func checkDefaultStaticExprCtx(t *testing.T, ctx *StaticExprContext) { require.NoError(t, err) require.Equal(t, charsetName, cs.Name) require.Equal(t, cs.DefaultCollation, collation) - require.Equal(t, variable.DefaultCollationForUTF8MB4, ctx.GetDefaultCollationForUTF8MB4()) + require.Equal(t, mysql.DefaultCollationName, ctx.GetDefaultCollationForUTF8MB4()) require.Equal(t, variable.DefBlockEncryptionMode, ctx.GetBlockEncryptionMode()) require.Equal(t, variable.DefSysdateIsNow, ctx.GetSysdateIsNow()) require.Equal(t, variable.TiDBOptOnOffWarn(variable.DefTiDBEnableNoopFuncs), ctx.GetNoopFuncsMode())