Skip to content

Commit 5ff7f0a

Browse files
qw4990ti-chi-bot
authored andcommitted
This is an automated cherry-pick of pingcap#53681
Signed-off-by: ti-chi-bot <[email protected]>
1 parent 21791f4 commit 5ff7f0a

File tree

2 files changed

+1832
-1
lines changed

2 files changed

+1832
-1
lines changed

expression/builtin_math.go

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1186,7 +1186,11 @@ func (b *builtinConvSig) evalString(row chunk.Row) (res string, isNull bool, err
11861186
switch x := b.args[0].(type) {
11871187
case *Constant:
11881188
if x.Value.Kind() == types.KindBinaryLiteral {
1189-
str = x.Value.GetBinaryLiteral().ToBitLiteralString(true)
1189+
datum, err := x.Eval(ctx, row)
1190+
if err != nil {
1191+
return "", false, err
1192+
}
1193+
str = datum.GetBinaryLiteral().ToBitLiteralString(true)
11901194
}
11911195
case *ScalarFunction:
11921196
if x.FuncName.L == ast.Cast {

0 commit comments

Comments
 (0)