Skip to content

Commit 460ea84

Browse files
committed
Unwrap inputs to find_in_set
1 parent 0457998 commit 460ea84

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

sql/expression/function/find_in_set.go

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,10 @@ func (f *FindInSet) Eval(ctx *sql.Context, row sql.Row) (interface{}, error) {
9191
return nil, nil
9292
}
9393

94+
left, err = sql.UnwrapAny(ctx, left)
95+
if err != nil {
96+
return nil, err
97+
}
9498
lVal, _, err := types.LongText.Convert(ctx, left)
9599
if err != nil {
96100
return nil, err
@@ -103,6 +107,10 @@ func (f *FindInSet) Eval(ctx *sql.Context, row sql.Row) (interface{}, error) {
103107
}
104108

105109
var r string
110+
right, err = sql.UnwrapAny(ctx, right)
111+
if err != nil {
112+
return nil, err
113+
}
106114
rType := f.RightChild.Type()
107115
if setType, ok := rType.(types.SetType); ok {
108116
// TODO: set type should take advantage of bit arithmetic

0 commit comments

Comments
 (0)