Unverified Commit 0e043c67 authored by Song Gao's avatar Song Gao Committed by GitHub
Browse files

expr: fix instr function get stuck (#33380)

close pingcap/tidb#33367
parent 5a176047
Showing with 1 addition and 10 deletions
+1 -10
......@@ -1386,11 +1386,6 @@ func TestExprPushDownToTiKV(t *testing.T) {
retType: types.NewFieldType(mysql.TypeString),
args: []Expression{stringColumn, stringColumn, intColumn},
},
{
functionName: ast.Instr,
retType: types.NewFieldType(mysql.TypeInt24),
args: []Expression{stringColumn, stringColumn},
},
{
functionName: ast.Quote,
retType: types.NewFieldType(mysql.TypeString),
......
......@@ -970,7 +970,7 @@ func scalarExprSupportedByTiKV(sf *ScalarFunction) bool {
// string functions.
ast.Bin, ast.Unhex, ast.Locate, ast.Ord, ast.Lpad, ast.Rpad,
ast.Trim, ast.FromBase64, ast.ToBase64, ast.Upper, ast.Lower, ast.InsertFunc,
ast.MakeSet, ast.SubstringIndex, ast.Instr, ast.Quote, ast.Oct,
ast.MakeSet, ast.SubstringIndex /* ast.Instr */, ast.Quote, ast.Oct,
ast.FindInSet, ast.Repeat,
ast.Length, ast.BitLength, ast.Concat, ast.ConcatWS, ast.Replace, ast.ASCII, ast.Hex,
ast.Reverse, ast.LTrim, ast.RTrim, ast.Strcmp, ast.Space, ast.Elt, ast.Field,
......
......@@ -2912,10 +2912,6 @@ func TestScalarFunctionPushDown(t *testing.T) {
tk.MustQuery("explain analyze select /*+read_from_storage(tikv[t])*/ * from t where substring_index(c,c,1)").
CheckAt([]int{0, 3, 6}, rows)
rows[1][2] = "instr(test.t.c, test.t.c)"
tk.MustQuery("explain analyze select /*+read_from_storage(tikv[t])*/ * from t where instr(c,c)").
CheckAt([]int{0, 3, 6}, rows)
rows[1][2] = "quote(test.t.c)"
tk.MustQuery("explain analyze select /*+read_from_storage(tikv[t])*/ * from t where quote(c)").
CheckAt([]int{0, 3, 6}, rows)
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment