Skip to content

Commit

Permalink
expression: fix default value of GetDefaultCollationForUTF8MB4 of `…
Browse files Browse the repository at this point in the history
…StaticExprContext` (#53391)

close #53390
  • Loading branch information
lcwangchao authored May 20, 2024
1 parent b7e32bc commit 044f113
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion pkg/expression/contextstatic/exprctx.go
Original file line number Diff line number Diff line change
Expand Up @@ -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),
Expand Down
2 changes: 1 addition & 1 deletion pkg/expression/contextstatic/exprctx_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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())
Expand Down

0 comments on commit 044f113

Please sign in to comment.