Closed
Description
Bug Report
Please answer these questions before submitting your issue. Thanks!
1. Minimal reproduce step (Required)
Run the unit test below:
func TestUnknown1InWhereClause(t *testing.T) {
store := testkit.CreateMockStore(t)
tk := testkit.NewTestKit(t, store)
tk.MustExec("use test")
tk.MustExec("create table t(a varchar(32) NOT NULL primary key,b varchar(22) not null,key idx_a (a))")
go func() {
tkk := testkit.NewTestKit(t, store)
tkk.MustExec(`use test`)
for k := 0; k < 10000; k++ {
tkk.ExecToErr("select * from xw.t1 where 1=1 a. ")
}
}()
for k := 0; k < 10000; k++ {
tk.MustQuery(`select count(1) from t where a = 'Q13'`).Check(testkit.Rows("0"))
}
}
2. What did you expect to see? (Required)
No error.
3. What did you see instead (Required)
Error: Received unexpected error:
[planner:1054]Unknown column '1' in 'where clause'