Skip to content

Commit

Permalink
test non-vector mode
Browse files Browse the repository at this point in the history
  • Loading branch information
mengxin9014 committed Nov 23, 2022
1 parent 1403e0c commit 3a44b62
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion expression/integration_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -7847,6 +7847,8 @@ func TestIssue39146(t *testing.T) {
tk.MustExec("CREATE TABLE `sun` ( `dest` varchar(10) DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin;")
tk.MustExec("insert into sun values('20231020');")
tk.MustExec("set @@sql_mode = 'ONLY_FULL_GROUP_BY,STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION';")
tk.MustExec("set @@tidb_enable_vectorized_expression = on;")
tk.MustQuery(`select str_to_date(substr(dest,1,6),'%H%i%s') from sun;`).Check(testkit.Rows("20:23:10"))
tk.MustExec("set @@tidb_enable_vectorized_expression = off;")
tk.MustQuery(`select str_to_date(substr(dest,1,6),'%H%i%s') from sun;`).Check(testkit.Rows("20:23:10"))
tk.MustQuery(`select str_to_date("202310",'%H%i%s') from sun;`).Check(testkit.Rows("20:23:10"))
}

0 comments on commit 3a44b62

Please sign in to comment.