Skip to content

Commit

Permalink
expression, executor: correct the funcName for wrapWithIsTrue… (#14516)
Browse files Browse the repository at this point in the history
  • Loading branch information
sre-bot authored and zz-jason committed Jan 19, 2020
1 parent 50963e7 commit 69dc332
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
8 changes: 8 additions & 0 deletions executor/join_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1427,3 +1427,11 @@ func (s *testSuite2) TestIssue11390(c *C) {
tk.MustExec("insert into 11390t values(1, 1)")
tk.MustQuery("select /*+ TIDB_INLJ(t1, t2) */ * from 11390t t1, 11390t t2 where t1.k2 > 0 and t1.k2 = t2.k2 and t2.k1=1;").Check(testkit.Rows("1 1 1 1"))
}

func (s *testSuite2) TestIssue14514(c *C) {
tk := testkit.NewTestKit(c, s.store)
tk.MustExec("use test")
tk.MustExec("drop table if exists t")
tk.MustExec("create table t (pk varchar(14) primary key, a varchar(12));")
tk.MustQuery("select * from (select t1.pk or '/' as c from t as t1 left join t as t2 on t1.a = t2.pk) as t where t.c = 1;").Check(testkit.Rows())
}
2 changes: 1 addition & 1 deletion expression/expression.go
Original file line number Diff line number Diff line change
Expand Up @@ -398,7 +398,7 @@ func wrapWithIsTrue(ctx sessionctx.Context, keepNull bool, arg Expression) (Expr
return nil, err
}
sf := &ScalarFunction{
FuncName: model.NewCIStr(fmt.Sprintf("sig_%T", f)),
FuncName: model.NewCIStr(ast.IsTruth),
Function: f,
RetType: f.getRetTp(),
}
Expand Down

0 comments on commit 69dc332

Please sign in to comment.