You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
tk.MustExec("create table t1(a int not null, b int not null)")
159
+
tk.MustExec("insert into t1 values (1,1)")
160
+
tk.MustExec("create table t2(a int not null, b int not null)")
161
+
tk.MustExec("insert into t2 values (2,2)")
162
+
163
+
tk.MustQuery("select * from t1 where t1.a not in (select a from t2 where t2.a = t1.a and t2.a > 1)").Check(testkit.Rows(
164
+
"1 1",
165
+
))
166
+
tk.MustQuery("select * from t1 where t1.a not in (select a from t2 where t2.b = t1.b and t2.a > 1)").Check(testkit.Rows(
167
+
"1 1",
168
+
))
169
+
tk.MustQuery("select * from t1 where t1.a not in (select a from t2 where t2.b = t1.b and t2.b > 1)").Check(testkit.Rows(
170
+
"1 1",
171
+
))
172
+
tk.MustQuery("select q.a in (select count(*) from t1 s where not exists (select 1 from t1 p where q.a > 1 and p.a = s.a)) from t1 q").Check(testkit.Rows(
173
+
"1",
174
+
))
175
+
tk.MustQuery("select q.a in (select not exists (select 1 from t1 p where q.a > 1 and p.a = s.a) from t1 s) from t1 q").Check(testkit.Rows(
176
+
"1",
177
+
))
178
+
179
+
tk.MustExec("drop table t1, t2")
180
+
tk.MustExec("create table t1(a int not null, b int)")
181
+
tk.MustExec("insert into t1 values (1,null)")
182
+
tk.MustExec("create table t2(a int not null, b int)")
183
+
tk.MustExec("insert into t2 values (2,2)")
184
+
185
+
tk.MustQuery("select * from t1 where t1.a not in (select a from t2 where t2.b > t1.b)").Check(testkit.Rows(
186
+
"1 <nil>",
187
+
))
188
+
tk.MustQuery("select * from t1 where t1.a not in (select a from t2 where t1.a = 2)").Check(testkit.Rows(
0 commit comments