300
300
select oref, a, b, (a,b) in (select ie1,ie2 from t1 where oref=t2.oref) Z from t2 where a=10 and b=10;
301
301
id select_type table type possible_keys key key_len ref rows filtered Extra
302
302
1 PRIMARY t2 ALL NULL NULL NULL NULL 8 100.00 Using where
305
305
Note 1276 Field or reference 'test.t2.oref' of SELECT #2 was resolved in SELECT #1
306
Note 1003 select "test"."t2"."oref" AS "oref","test"."t2"."a" AS "a","test"."t2"."b" AS "b",<in_optimizer>(("test"."t2"."a","test"."t2"."b"),<exists>(<index_lookup>(<cache>("test"."t2"."a") in t1 on idx checking NULL where (("test"."t1"."oref" = "test"."t2"."oref") and trigcond(((<cache>("test"."t2"."a") = "test"."t1"."ie1") or isnull("test"."t1"."ie1"))) and trigcond(((<cache>("test"."t2"."b") = "test"."t1"."ie2") or isnull("test"."t1"."ie2")))) having (trigcond(<is_not_null_test>("test"."t1"."ie1")) and trigcond(<is_not_null_test>("test"."t1"."ie2")))))) AS "Z" from "test"."t2" where (("test"."t2"."b" = 10) and ("test"."t2"."a" = 10))
306
Note 1003 select "test"."t2"."oref" AS "oref","test"."t2"."a" AS "a","test"."t2"."b" AS "b",<in_optimizer>(("test"."t2"."a","test"."t2"."b"),<exists>(select "test"."t1"."ie1" AS "ie1","test"."t1"."ie2" AS "ie2" from "test"."t1" where (("test"."t1"."oref" = "test"."t2"."oref") and trigcond(((<cache>("test"."t2"."a") = "test"."t1"."ie1") or isnull("test"."t1"."ie1"))) and trigcond(((<cache>("test"."t2"."b") = "test"."t1"."ie2") or isnull("test"."t1"."ie2")))) having (trigcond(<is_not_null_test>("test"."t1"."ie1")) and trigcond(<is_not_null_test>("test"."t1"."ie2"))))) AS "Z" from "test"."t2" where (("test"."t2"."b" = 10) and ("test"."t2"."a" = 10))
308
308
create table t1 (oref char(4), grp int, ie int);
309
309
insert into t1 (oref, grp, ie) values