From b3a802a5be478121a2682d7d1cdb57e623c70678 Mon Sep 17 00:00:00 2001 From: yi-xmu Date: Tue, 10 Mar 2026 22:42:25 +0800 Subject: [PATCH 1/3] sharding keys on one range partition into on core update mtr test case update subm update mtr test result update subm based mar2 update mtr test update subm --- data_substrate | 2 +- .../mysql-test/mono_main/r/compress.result | 42 +++++++++--------- .../eloq/mysql-test/mono_main/r/select.result | 44 +++++++++---------- .../mysql-test/mono_main/r/select_jcl6.result | 44 +++++++++---------- .../mono_main/r/select_pkeycache.result | 44 +++++++++---------- .../eloq/mysql-test/mono_main/r/ssl.result | 42 +++++++++--------- .../mono_main/r/ssl_compress.result | 42 +++++++++--------- .../mysql-test/mono_main/t/subselect_sj.test | 2 + 8 files changed, 132 insertions(+), 130 deletions(-) diff --git a/data_substrate b/data_substrate index 65caaadd93d..5eb0b7ac217 160000 --- a/data_substrate +++ b/data_substrate @@ -1 +1 @@ -Subproject commit 65caaadd93da33fcfb6ee1a1cca73e89cb7529f7 +Subproject commit 5eb0b7ac217628a4f1af3ca1ebd94d518bcfc5ff diff --git a/storage/eloq/mysql-test/mono_main/r/compress.result b/storage/eloq/mysql-test/mono_main/r/compress.result index af7a7e00f37..16705ce80ff 100644 --- a/storage/eloq/mysql-test/mono_main/r/compress.result +++ b/storage/eloq/mysql-test/mono_main/r/compress.result @@ -138,10 +138,10 @@ id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t2 ref fld3 fld3 30 const 1 Using where; Using index explain select fld3 from t2 ignore index (fld3) where fld3 = 'honeysuckle'; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t2 ALL NULL NULL NULL NULL 1199 Using where +1 SIMPLE t2 ALL NULL NULL NULL NULL 1198 Using where explain select fld3 from t2 use index (fld1) where fld3 = 'honeysuckle'; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t2 ALL NULL NULL NULL NULL 1199 Using where +1 SIMPLE t2 ALL NULL NULL NULL NULL 1198 Using where explain select fld3 from t2 use index (fld3) where fld3 = 'honeysuckle'; id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t2 ref fld3 fld3 30 const 1 Using where; Using index @@ -1264,52 +1264,52 @@ id select_type table type possible_keys key key_len ref rows Extra delete from t2 where fld1=999999; explain select t2.companynr,companyname from t4 left join t2 using (companynr) where t2.companynr > 0; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t2 ALL NULL NULL NULL NULL 1199 Using where +1 SIMPLE t2 ALL NULL NULL NULL NULL 1200 Using where 1 SIMPLE t4 eq_ref PRIMARY PRIMARY 1 test.t2.companynr 1 explain select t2.companynr,companyname from t4 left join t2 using (companynr) where t2.companynr > 0 or t2.companynr < 0; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t2 ALL NULL NULL NULL NULL 1199 Using where +1 SIMPLE t2 ALL NULL NULL NULL NULL 1200 Using where 1 SIMPLE t4 eq_ref PRIMARY PRIMARY 1 test.t2.companynr 1 explain select t2.companynr,companyname from t4 left join t2 using (companynr) where t2.companynr > 0 and t4.companynr > 0; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t2 ALL NULL NULL NULL NULL 1199 Using where +1 SIMPLE t2 ALL NULL NULL NULL NULL 1200 Using where 1 SIMPLE t4 eq_ref PRIMARY PRIMARY 1 test.t2.companynr 1 explain select companynr,companyname from t4 left join t2 using (companynr) where companynr > 0; id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t4 index PRIMARY companyname 30 NULL 12 Using where; Using index -1 SIMPLE t2 ALL NULL NULL NULL NULL 1199 Using where +1 SIMPLE t2 ALL NULL NULL NULL NULL 1200 Using where explain select companynr,companyname from t4 left join t2 using (companynr) where companynr > 0 or companynr < 0; id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t4 index PRIMARY companyname 30 NULL 12 Using where; Using index -1 SIMPLE t2 ALL NULL NULL NULL NULL 1199 Using where +1 SIMPLE t2 ALL NULL NULL NULL NULL 1200 Using where explain select companynr,companyname from t4 left join t2 using (companynr) where companynr > 0 and companynr > 0; id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t4 index PRIMARY companyname 30 NULL 12 Using where; Using index -1 SIMPLE t2 ALL NULL NULL NULL NULL 1199 Using where +1 SIMPLE t2 ALL NULL NULL NULL NULL 1200 Using where explain select t2.companynr,companyname from t4 left join t2 using (companynr) where t2.companynr > 0 or t2.companynr is null; id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t4 index NULL companyname 30 NULL 12 Using index -1 SIMPLE t2 ALL NULL NULL NULL NULL 1199 Using where +1 SIMPLE t2 ALL NULL NULL NULL NULL 1200 Using where explain select t2.companynr,companyname from t4 left join t2 using (companynr) where t2.companynr > 0 or t2.companynr < 0 or t4.companynr > 0; id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t4 index PRIMARY companyname 30 NULL 12 Using index -1 SIMPLE t2 ALL NULL NULL NULL NULL 1199 Using where +1 SIMPLE t2 ALL NULL NULL NULL NULL 1200 Using where explain select t2.companynr,companyname from t4 left join t2 using (companynr) where ifnull(t2.companynr,1)>0; id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t4 index NULL companyname 30 NULL 12 Using index -1 SIMPLE t2 ALL NULL NULL NULL NULL 1199 Using where +1 SIMPLE t2 ALL NULL NULL NULL NULL 1200 Using where explain select companynr,companyname from t4 left join t2 using (companynr) where companynr > 0 or companynr is null; id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t4 index PRIMARY companyname 30 NULL 12 Using where; Using index -1 SIMPLE t2 ALL NULL NULL NULL NULL 1199 Using where +1 SIMPLE t2 ALL NULL NULL NULL NULL 1200 Using where explain select companynr,companyname from t4 left join t2 using (companynr) where companynr > 0 or companynr < 0 or companynr > 0; id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t4 index PRIMARY companyname 30 NULL 12 Using where; Using index -1 SIMPLE t2 ALL NULL NULL NULL NULL 1199 Using where +1 SIMPLE t2 ALL NULL NULL NULL NULL 1200 Using where explain select companynr,companyname from t4 left join t2 using (companynr) where ifnull(companynr,1)>0; id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t4 index NULL companyname 30 NULL 12 Using where; Using index -1 SIMPLE t2 ALL NULL NULL NULL NULL 1199 Using where +1 SIMPLE t2 ALL NULL NULL NULL NULL 1200 Using where SET @@optimizer_switch=@local_optimizer_switch; select distinct t2.companynr,t4.companynr from t2,t4 where t2.companynr=t4.companynr+1; companynr companynr @@ -1318,7 +1318,7 @@ companynr companynr explain select distinct t2.companynr,t4.companynr from t2,t4 where t2.companynr=t4.companynr+1; id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t4 index NULL companyname 30 NULL 12 Using index; Using temporary -1 SIMPLE t2 ALL NULL NULL NULL NULL 1199 Using where; Using join buffer (flat, BNL join) +1 SIMPLE t2 ALL NULL NULL NULL NULL 1200 Using where; Using join buffer (flat, BNL join) SET @@join_cache_level=@local_join_cache_level; select period from t1 where (((period > 0) or period < 10000 or (period = 1900)) and (period=1900 and period <= 1901) or (period=1903 and (period=1903)) and period>=1902) or ((period=1904 or period=1905) or (period=1906 or period>1907)) or (period=1908 and period = 1909); period @@ -1372,7 +1372,7 @@ count(*) min(fld4) max(fld4) sum(fld1) avg(fld1) std(fld1) variance(fld1) 70 Blythe vest 17788966 254128.0857 3272.5940 10709871.3069 explain extended select count(*),min(fld4),max(fld4),sum(fld1),avg(fld1),std(fld1),variance(fld1) from t2 where companynr = 34 and fld4<>""; id select_type table type possible_keys key key_len ref rows filtered Extra -1 SIMPLE t2 ALL NULL NULL NULL NULL 1199 100.00 Using where +1 SIMPLE t2 ALL NULL NULL NULL NULL 1200 100.00 Using where Warnings: Note 1003 select count(0) AS `count(*)`,min(`test`.`t2`.`fld4`) AS `min(fld4)`,max(`test`.`t2`.`fld4`) AS `max(fld4)`,sum(`test`.`t2`.`fld1`) AS `sum(fld1)`,avg(`test`.`t2`.`fld1`) AS `avg(fld1)`,std(`test`.`t2`.`fld1`) AS `std(fld1)`,variance(`test`.`t2`.`fld1`) AS `variance(fld1)` from `test`.`t2` where `test`.`t2`.`companynr` = 34 and `test`.`t2`.`fld4` <> '' select companynr,count(*),min(fld4),max(fld4),sum(fld1),avg(fld1),std(fld1),variance(fld1) from t2 group by companynr limit 3; @@ -1613,7 +1613,7 @@ id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE NULL NULL NULL NULL NULL NULL NULL Impossible WHERE explain select fld3 from t2 where fld1=fld1; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t2 ALL NULL NULL NULL NULL 1199 +1 SIMPLE t2 ALL NULL NULL NULL NULL 1200 select companynr,fld1 from t2 HAVING fld1=250501 or fld1=250502; companynr fld1 34 250501 @@ -1665,7 +1665,7 @@ count(*) 4181 explain select min(fld1),max(fld1),count(*) from t2; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t2 index NULL fld1 4 NULL 1199 Using index +1 SIMPLE t2 index NULL fld1 4 NULL 1200 Using index select min(fld1),max(fld1),count(*) from t2; min(fld1) max(fld1) count(*) 0 1232609 1199 @@ -1745,9 +1745,9 @@ show full columns from t2 from test like 's%'; Field Type Collation Null Key Default Extra Privileges Comment show keys from t2; Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment Index_comment Ignored -t2 0 PRIMARY 1 auto A 1199 NULL NULL BTREE NO -t2 1 fld1 1 fld1 A 1199 NULL NULL BTREE NO -t2 1 fld3 1 fld3 A 1199 NULL NULL BTREE NO +t2 0 PRIMARY 1 auto A 1200 NULL NULL BTREE NO +t2 1 fld1 1 fld1 A 1200 NULL NULL BTREE NO +t2 1 fld3 1 fld3 A 1200 NULL NULL BTREE NO drop table t4, t3, t2, t1; CREATE TABLE t1 ( cont_nr int(11) NOT NULL auto_increment, diff --git a/storage/eloq/mysql-test/mono_main/r/select.result b/storage/eloq/mysql-test/mono_main/r/select.result index fe9cd5645d0..8ff82eb3055 100644 --- a/storage/eloq/mysql-test/mono_main/r/select.result +++ b/storage/eloq/mysql-test/mono_main/r/select.result @@ -135,10 +135,10 @@ id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t2 ref fld3 fld3 30 const 1 Using where; Using index explain select fld3 from t2 ignore index (fld3) where fld3 = 'honeysuckle'; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t2 ALL NULL NULL NULL NULL 1199 Using where +1 SIMPLE t2 ALL NULL NULL NULL NULL 1198 Using where explain select fld3 from t2 use index (fld1) where fld3 = 'honeysuckle'; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t2 ALL NULL NULL NULL NULL 1199 Using where +1 SIMPLE t2 ALL NULL NULL NULL NULL 1198 Using where explain select fld3 from t2 use index (fld3) where fld3 = 'honeysuckle'; id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t2 ref fld3 fld3 30 const 1 Using where; Using index @@ -547,7 +547,7 @@ select distinct fld3 from t2,t3 where t2.companynr = 34 and t2.fld1=t3.t2nr orde fld3 explain select t3.t2nr,fld3 from t2,t3 where t2.companynr = 34 and t2.fld1=t3.t2nr order by t3.t2nr,fld3; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t2 ALL fld1 NULL NULL NULL 1199 Using where; Using temporary; Using filesort +1 SIMPLE t2 ALL fld1 NULL NULL NULL 1198 Using where; Using temporary; Using filesort 1 SIMPLE t3 eq_ref PRIMARY PRIMARY 4 test.t2.fld1 1 Using where; Using index explain select * from t3 as t1,t3 where t1.period=t3.period order by t3.period; id select_type table type possible_keys key key_len ref rows Extra @@ -1257,52 +1257,52 @@ id select_type table type possible_keys key key_len ref rows Extra delete from t2 where fld1=999999; explain select t2.companynr,companyname from t4 left join t2 using (companynr) where t2.companynr > 0; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t2 ALL NULL NULL NULL NULL 1199 Using where +1 SIMPLE t2 ALL NULL NULL NULL NULL 1200 Using where 1 SIMPLE t4 eq_ref PRIMARY PRIMARY 1 test.t2.companynr 1 explain select t2.companynr,companyname from t4 left join t2 using (companynr) where t2.companynr > 0 or t2.companynr < 0; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t2 ALL NULL NULL NULL NULL 1199 Using where +1 SIMPLE t2 ALL NULL NULL NULL NULL 1200 Using where 1 SIMPLE t4 eq_ref PRIMARY PRIMARY 1 test.t2.companynr 1 explain select t2.companynr,companyname from t4 left join t2 using (companynr) where t2.companynr > 0 and t4.companynr > 0; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t2 ALL NULL NULL NULL NULL 1199 Using where +1 SIMPLE t2 ALL NULL NULL NULL NULL 1200 Using where 1 SIMPLE t4 eq_ref PRIMARY PRIMARY 1 test.t2.companynr 1 explain select companynr,companyname from t4 left join t2 using (companynr) where companynr > 0; id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t4 index PRIMARY companyname 30 NULL 12 Using where; Using index -1 SIMPLE t2 ALL NULL NULL NULL NULL 1199 Using where +1 SIMPLE t2 ALL NULL NULL NULL NULL 1200 Using where explain select companynr,companyname from t4 left join t2 using (companynr) where companynr > 0 or companynr < 0; id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t4 index PRIMARY companyname 30 NULL 12 Using where; Using index -1 SIMPLE t2 ALL NULL NULL NULL NULL 1199 Using where +1 SIMPLE t2 ALL NULL NULL NULL NULL 1200 Using where explain select companynr,companyname from t4 left join t2 using (companynr) where companynr > 0 and companynr > 0; id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t4 index PRIMARY companyname 30 NULL 12 Using where; Using index -1 SIMPLE t2 ALL NULL NULL NULL NULL 1199 Using where +1 SIMPLE t2 ALL NULL NULL NULL NULL 1200 Using where explain select t2.companynr,companyname from t4 left join t2 using (companynr) where t2.companynr > 0 or t2.companynr is null; id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t4 index NULL companyname 30 NULL 12 Using index -1 SIMPLE t2 ALL NULL NULL NULL NULL 1199 Using where +1 SIMPLE t2 ALL NULL NULL NULL NULL 1200 Using where explain select t2.companynr,companyname from t4 left join t2 using (companynr) where t2.companynr > 0 or t2.companynr < 0 or t4.companynr > 0; id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t4 index PRIMARY companyname 30 NULL 12 Using index -1 SIMPLE t2 ALL NULL NULL NULL NULL 1199 Using where +1 SIMPLE t2 ALL NULL NULL NULL NULL 1200 Using where explain select t2.companynr,companyname from t4 left join t2 using (companynr) where ifnull(t2.companynr,1)>0; id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t4 index NULL companyname 30 NULL 12 Using index -1 SIMPLE t2 ALL NULL NULL NULL NULL 1199 Using where +1 SIMPLE t2 ALL NULL NULL NULL NULL 1200 Using where explain select companynr,companyname from t4 left join t2 using (companynr) where companynr > 0 or companynr is null; id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t4 index PRIMARY companyname 30 NULL 12 Using where; Using index -1 SIMPLE t2 ALL NULL NULL NULL NULL 1199 Using where +1 SIMPLE t2 ALL NULL NULL NULL NULL 1200 Using where explain select companynr,companyname from t4 left join t2 using (companynr) where companynr > 0 or companynr < 0 or companynr > 0; id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t4 index PRIMARY companyname 30 NULL 12 Using where; Using index -1 SIMPLE t2 ALL NULL NULL NULL NULL 1199 Using where +1 SIMPLE t2 ALL NULL NULL NULL NULL 1200 Using where explain select companynr,companyname from t4 left join t2 using (companynr) where ifnull(companynr,1)>0; id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t4 index NULL companyname 30 NULL 12 Using where; Using index -1 SIMPLE t2 ALL NULL NULL NULL NULL 1199 Using where +1 SIMPLE t2 ALL NULL NULL NULL NULL 1200 Using where select distinct t2.companynr,t4.companynr from t2,t4 where t2.companynr=t4.companynr+1; companynr companynr 37 36 @@ -1310,7 +1310,7 @@ companynr companynr explain select distinct t2.companynr,t4.companynr from t2,t4 where t2.companynr=t4.companynr+1; id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t4 index NULL companyname 30 NULL 12 Using index; Using temporary -1 SIMPLE t2 ALL NULL NULL NULL NULL 1199 Using where; Using join buffer (flat, BNL join) +1 SIMPLE t2 ALL NULL NULL NULL NULL 1200 Using where; Using join buffer (flat, BNL join) select period from t1 where (((period > 0) or period < 10000 or (period = 1900)) and (period=1900 and period <= 1901) or (period=1903 and (period=1903)) and period>=1902) or ((period=1904 or period=1905) or (period=1906 or period>1907)) or (period=1908 and period = 1909); period 9410 @@ -1363,7 +1363,7 @@ count(*) min(fld4) max(fld4) sum(fld1) avg(fld1) std(fld1) variance(fld1) 70 Blythe vest 17788966 254128.0857 3272.5940 10709871.3069 explain extended select count(*),min(fld4),max(fld4),sum(fld1),avg(fld1),std(fld1),variance(fld1) from t2 where companynr = 34 and fld4<>""; id select_type table type possible_keys key key_len ref rows filtered Extra -1 SIMPLE t2 ALL NULL NULL NULL NULL 1199 100.00 Using where +1 SIMPLE t2 ALL NULL NULL NULL NULL 1200 100.00 Using where Warnings: Note 1003 select count(0) AS `count(*)`,min(`test`.`t2`.`fld4`) AS `min(fld4)`,max(`test`.`t2`.`fld4`) AS `max(fld4)`,sum(`test`.`t2`.`fld1`) AS `sum(fld1)`,avg(`test`.`t2`.`fld1`) AS `avg(fld1)`,std(`test`.`t2`.`fld1`) AS `std(fld1)`,variance(`test`.`t2`.`fld1`) AS `variance(fld1)` from `test`.`t2` where `test`.`t2`.`companynr` = 34 and `test`.`t2`.`fld4` <> '' select companynr,count(*),min(fld4),max(fld4),sum(fld1),avg(fld1),std(fld1),variance(fld1) from t2 group by companynr limit 3; @@ -1604,7 +1604,7 @@ id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE NULL NULL NULL NULL NULL NULL NULL Impossible WHERE explain select fld3 from t2 where fld1=fld1; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t2 ALL NULL NULL NULL NULL 1199 +1 SIMPLE t2 ALL NULL NULL NULL NULL 1200 select companynr,fld1 from t2 HAVING fld1=250501 or fld1=250502; companynr fld1 34 250501 @@ -1656,7 +1656,7 @@ count(*) 4181 explain select min(fld1),max(fld1),count(*) from t2; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t2 index NULL fld1 4 NULL 1199 Using index +1 SIMPLE t2 index NULL fld1 4 NULL 1200 Using index select min(fld1),max(fld1),count(*) from t2; min(fld1) max(fld1) count(*) 0 1232609 1199 @@ -1714,9 +1714,9 @@ show full columns from t2 from test like 's%'; Field Type Collation Null Key Default Extra Privileges Comment show keys from t2; Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment Index_comment Ignored -t2 0 PRIMARY 1 auto A 1199 NULL NULL BTREE NO -t2 1 fld1 1 fld1 A 1199 NULL NULL BTREE NO -t2 1 fld3 1 fld3 A 1199 NULL NULL BTREE NO +t2 0 PRIMARY 1 auto A 1200 NULL NULL BTREE NO +t2 1 fld1 1 fld1 A 1200 NULL NULL BTREE NO +t2 1 fld3 1 fld3 A 1200 NULL NULL BTREE NO drop table t4, t3, t2, t1; DO 1; DO benchmark(100,1+1),1,1; diff --git a/storage/eloq/mysql-test/mono_main/r/select_jcl6.result b/storage/eloq/mysql-test/mono_main/r/select_jcl6.result index 5a984acdaec..b812b83c65e 100644 --- a/storage/eloq/mysql-test/mono_main/r/select_jcl6.result +++ b/storage/eloq/mysql-test/mono_main/r/select_jcl6.result @@ -146,10 +146,10 @@ id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t2 ref fld3 fld3 30 const 1 Using where; Using index explain select fld3 from t2 ignore index (fld3) where fld3 = 'honeysuckle'; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t2 ALL NULL NULL NULL NULL 1199 Using where +1 SIMPLE t2 ALL NULL NULL NULL NULL 1198 Using where explain select fld3 from t2 use index (fld1) where fld3 = 'honeysuckle'; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t2 ALL NULL NULL NULL NULL 1199 Using where +1 SIMPLE t2 ALL NULL NULL NULL NULL 1198 Using where explain select fld3 from t2 use index (fld3) where fld3 = 'honeysuckle'; id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t2 ref fld3 fld3 30 const 1 Using where; Using index @@ -558,7 +558,7 @@ select distinct fld3 from t2,t3 where t2.companynr = 34 and t2.fld1=t3.t2nr orde fld3 explain select t3.t2nr,fld3 from t2,t3 where t2.companynr = 34 and t2.fld1=t3.t2nr order by t3.t2nr,fld3; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t2 ALL fld1 NULL NULL NULL 1199 Using where; Using temporary; Using filesort +1 SIMPLE t2 ALL fld1 NULL NULL NULL 1198 Using where; Using temporary; Using filesort 1 SIMPLE t3 eq_ref PRIMARY PRIMARY 4 test.t2.fld1 1 Using where; Using index explain select * from t3 as t1,t3 where t1.period=t3.period order by t3.period; id select_type table type possible_keys key key_len ref rows Extra @@ -1268,52 +1268,52 @@ id select_type table type possible_keys key key_len ref rows Extra delete from t2 where fld1=999999; explain select t2.companynr,companyname from t4 left join t2 using (companynr) where t2.companynr > 0; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t2 ALL NULL NULL NULL NULL 1199 Using where +1 SIMPLE t2 ALL NULL NULL NULL NULL 1200 Using where 1 SIMPLE t4 eq_ref PRIMARY PRIMARY 1 test.t2.companynr 1 Using join buffer (flat, BKA join); Key-ordered scan explain select t2.companynr,companyname from t4 left join t2 using (companynr) where t2.companynr > 0 or t2.companynr < 0; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t2 ALL NULL NULL NULL NULL 1199 Using where +1 SIMPLE t2 ALL NULL NULL NULL NULL 1200 Using where 1 SIMPLE t4 eq_ref PRIMARY PRIMARY 1 test.t2.companynr 1 Using join buffer (flat, BKA join); Key-ordered scan explain select t2.companynr,companyname from t4 left join t2 using (companynr) where t2.companynr > 0 and t4.companynr > 0; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t2 ALL NULL NULL NULL NULL 1199 Using where +1 SIMPLE t2 ALL NULL NULL NULL NULL 1200 Using where 1 SIMPLE t4 eq_ref PRIMARY PRIMARY 1 test.t2.companynr 1 Using join buffer (flat, BKA join); Key-ordered scan explain select companynr,companyname from t4 left join t2 using (companynr) where companynr > 0; id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t4 index PRIMARY companyname 30 NULL 12 Using where; Using index -1 SIMPLE t2 hash_ALL NULL #hash#$hj 1 test.t4.companynr 1199 Using where; Using join buffer (flat, BNLH join) +1 SIMPLE t2 hash_ALL NULL #hash#$hj 1 test.t4.companynr 1200 Using where; Using join buffer (flat, BNLH join) explain select companynr,companyname from t4 left join t2 using (companynr) where companynr > 0 or companynr < 0; id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t4 index PRIMARY companyname 30 NULL 12 Using where; Using index -1 SIMPLE t2 hash_ALL NULL #hash#$hj 1 test.t4.companynr 1199 Using where; Using join buffer (flat, BNLH join) +1 SIMPLE t2 hash_ALL NULL #hash#$hj 1 test.t4.companynr 1200 Using where; Using join buffer (flat, BNLH join) explain select companynr,companyname from t4 left join t2 using (companynr) where companynr > 0 and companynr > 0; id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t4 index PRIMARY companyname 30 NULL 12 Using where; Using index -1 SIMPLE t2 hash_ALL NULL #hash#$hj 1 test.t4.companynr 1199 Using where; Using join buffer (flat, BNLH join) +1 SIMPLE t2 hash_ALL NULL #hash#$hj 1 test.t4.companynr 1200 Using where; Using join buffer (flat, BNLH join) explain select t2.companynr,companyname from t4 left join t2 using (companynr) where t2.companynr > 0 or t2.companynr is null; id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t4 index NULL companyname 30 NULL 12 Using index -1 SIMPLE t2 hash_ALL NULL #hash#$hj 1 test.t4.companynr 1199 Using where; Using join buffer (flat, BNLH join) +1 SIMPLE t2 hash_ALL NULL #hash#$hj 1 test.t4.companynr 1200 Using where; Using join buffer (flat, BNLH join) explain select t2.companynr,companyname from t4 left join t2 using (companynr) where t2.companynr > 0 or t2.companynr < 0 or t4.companynr > 0; id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t4 index PRIMARY companyname 30 NULL 12 Using index -1 SIMPLE t2 hash_ALL NULL #hash#$hj 1 test.t4.companynr 1199 Using where; Using join buffer (flat, BNLH join) +1 SIMPLE t2 hash_ALL NULL #hash#$hj 1 test.t4.companynr 1200 Using where; Using join buffer (flat, BNLH join) explain select t2.companynr,companyname from t4 left join t2 using (companynr) where ifnull(t2.companynr,1)>0; id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t4 index NULL companyname 30 NULL 12 Using index -1 SIMPLE t2 hash_ALL NULL #hash#$hj 1 test.t4.companynr 1199 Using where; Using join buffer (flat, BNLH join) +1 SIMPLE t2 hash_ALL NULL #hash#$hj 1 test.t4.companynr 1200 Using where; Using join buffer (flat, BNLH join) explain select companynr,companyname from t4 left join t2 using (companynr) where companynr > 0 or companynr is null; id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t4 index PRIMARY companyname 30 NULL 12 Using where; Using index -1 SIMPLE t2 hash_ALL NULL #hash#$hj 1 test.t4.companynr 1199 Using where; Using join buffer (flat, BNLH join) +1 SIMPLE t2 hash_ALL NULL #hash#$hj 1 test.t4.companynr 1200 Using where; Using join buffer (flat, BNLH join) explain select companynr,companyname from t4 left join t2 using (companynr) where companynr > 0 or companynr < 0 or companynr > 0; id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t4 index PRIMARY companyname 30 NULL 12 Using where; Using index -1 SIMPLE t2 hash_ALL NULL #hash#$hj 1 test.t4.companynr 1199 Using where; Using join buffer (flat, BNLH join) +1 SIMPLE t2 hash_ALL NULL #hash#$hj 1 test.t4.companynr 1200 Using where; Using join buffer (flat, BNLH join) explain select companynr,companyname from t4 left join t2 using (companynr) where ifnull(companynr,1)>0; id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t4 index NULL companyname 30 NULL 12 Using where; Using index -1 SIMPLE t2 hash_ALL NULL #hash#$hj 1 test.t4.companynr 1199 Using where; Using join buffer (flat, BNLH join) +1 SIMPLE t2 hash_ALL NULL #hash#$hj 1 test.t4.companynr 1200 Using where; Using join buffer (flat, BNLH join) select distinct t2.companynr,t4.companynr from t2,t4 where t2.companynr=t4.companynr+1; companynr companynr 37 36 @@ -1321,7 +1321,7 @@ companynr companynr explain select distinct t2.companynr,t4.companynr from t2,t4 where t2.companynr=t4.companynr+1; id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t4 index NULL companyname 30 NULL 12 Using index; Using temporary -1 SIMPLE t2 hash_ALL NULL #hash#$hj 1 func 1199 Using where; Using join buffer (flat, BNLH join) +1 SIMPLE t2 hash_ALL NULL #hash#$hj 1 func 1200 Using where; Using join buffer (flat, BNLH join) select period from t1 where (((period > 0) or period < 10000 or (period = 1900)) and (period=1900 and period <= 1901) or (period=1903 and (period=1903)) and period>=1902) or ((period=1904 or period=1905) or (period=1906 or period>1907)) or (period=1908 and period = 1909); period 9410 @@ -1374,7 +1374,7 @@ count(*) min(fld4) max(fld4) sum(fld1) avg(fld1) std(fld1) variance(fld1) 70 Blythe vest 17788966 254128.0857 3272.5940 10709871.3069 explain extended select count(*),min(fld4),max(fld4),sum(fld1),avg(fld1),std(fld1),variance(fld1) from t2 where companynr = 34 and fld4<>""; id select_type table type possible_keys key key_len ref rows filtered Extra -1 SIMPLE t2 ALL NULL NULL NULL NULL 1199 100.00 Using where +1 SIMPLE t2 ALL NULL NULL NULL NULL 1200 100.00 Using where Warnings: Note 1003 select count(0) AS `count(*)`,min(`test`.`t2`.`fld4`) AS `min(fld4)`,max(`test`.`t2`.`fld4`) AS `max(fld4)`,sum(`test`.`t2`.`fld1`) AS `sum(fld1)`,avg(`test`.`t2`.`fld1`) AS `avg(fld1)`,std(`test`.`t2`.`fld1`) AS `std(fld1)`,variance(`test`.`t2`.`fld1`) AS `variance(fld1)` from `test`.`t2` where `test`.`t2`.`companynr` = 34 and `test`.`t2`.`fld4` <> '' select companynr,count(*),min(fld4),max(fld4),sum(fld1),avg(fld1),std(fld1),variance(fld1) from t2 group by companynr limit 3; @@ -1615,7 +1615,7 @@ id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE NULL NULL NULL NULL NULL NULL NULL Impossible WHERE explain select fld3 from t2 where fld1=fld1; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t2 ALL NULL NULL NULL NULL 1199 +1 SIMPLE t2 ALL NULL NULL NULL NULL 1200 select companynr,fld1 from t2 HAVING fld1=250501 or fld1=250502; companynr fld1 34 250501 @@ -1667,7 +1667,7 @@ count(*) 4181 explain select min(fld1),max(fld1),count(*) from t2; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t2 index NULL fld1 4 NULL 1199 Using index +1 SIMPLE t2 index NULL fld1 4 NULL 1200 Using index select min(fld1),max(fld1),count(*) from t2; min(fld1) max(fld1) count(*) 0 1232609 1199 @@ -1725,9 +1725,9 @@ show full columns from t2 from test like 's%'; Field Type Collation Null Key Default Extra Privileges Comment show keys from t2; Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment Index_comment Ignored -t2 0 PRIMARY 1 auto A 1199 NULL NULL BTREE NO -t2 1 fld1 1 fld1 A 1199 NULL NULL BTREE NO -t2 1 fld3 1 fld3 A 1199 NULL NULL BTREE NO +t2 0 PRIMARY 1 auto A 1200 NULL NULL BTREE NO +t2 1 fld1 1 fld1 A 1200 NULL NULL BTREE NO +t2 1 fld3 1 fld3 A 1200 NULL NULL BTREE NO drop table t4, t3, t2, t1; DO 1; DO benchmark(100,1+1),1,1; diff --git a/storage/eloq/mysql-test/mono_main/r/select_pkeycache.result b/storage/eloq/mysql-test/mono_main/r/select_pkeycache.result index fe9cd5645d0..8ff82eb3055 100644 --- a/storage/eloq/mysql-test/mono_main/r/select_pkeycache.result +++ b/storage/eloq/mysql-test/mono_main/r/select_pkeycache.result @@ -135,10 +135,10 @@ id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t2 ref fld3 fld3 30 const 1 Using where; Using index explain select fld3 from t2 ignore index (fld3) where fld3 = 'honeysuckle'; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t2 ALL NULL NULL NULL NULL 1199 Using where +1 SIMPLE t2 ALL NULL NULL NULL NULL 1198 Using where explain select fld3 from t2 use index (fld1) where fld3 = 'honeysuckle'; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t2 ALL NULL NULL NULL NULL 1199 Using where +1 SIMPLE t2 ALL NULL NULL NULL NULL 1198 Using where explain select fld3 from t2 use index (fld3) where fld3 = 'honeysuckle'; id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t2 ref fld3 fld3 30 const 1 Using where; Using index @@ -547,7 +547,7 @@ select distinct fld3 from t2,t3 where t2.companynr = 34 and t2.fld1=t3.t2nr orde fld3 explain select t3.t2nr,fld3 from t2,t3 where t2.companynr = 34 and t2.fld1=t3.t2nr order by t3.t2nr,fld3; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t2 ALL fld1 NULL NULL NULL 1199 Using where; Using temporary; Using filesort +1 SIMPLE t2 ALL fld1 NULL NULL NULL 1198 Using where; Using temporary; Using filesort 1 SIMPLE t3 eq_ref PRIMARY PRIMARY 4 test.t2.fld1 1 Using where; Using index explain select * from t3 as t1,t3 where t1.period=t3.period order by t3.period; id select_type table type possible_keys key key_len ref rows Extra @@ -1257,52 +1257,52 @@ id select_type table type possible_keys key key_len ref rows Extra delete from t2 where fld1=999999; explain select t2.companynr,companyname from t4 left join t2 using (companynr) where t2.companynr > 0; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t2 ALL NULL NULL NULL NULL 1199 Using where +1 SIMPLE t2 ALL NULL NULL NULL NULL 1200 Using where 1 SIMPLE t4 eq_ref PRIMARY PRIMARY 1 test.t2.companynr 1 explain select t2.companynr,companyname from t4 left join t2 using (companynr) where t2.companynr > 0 or t2.companynr < 0; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t2 ALL NULL NULL NULL NULL 1199 Using where +1 SIMPLE t2 ALL NULL NULL NULL NULL 1200 Using where 1 SIMPLE t4 eq_ref PRIMARY PRIMARY 1 test.t2.companynr 1 explain select t2.companynr,companyname from t4 left join t2 using (companynr) where t2.companynr > 0 and t4.companynr > 0; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t2 ALL NULL NULL NULL NULL 1199 Using where +1 SIMPLE t2 ALL NULL NULL NULL NULL 1200 Using where 1 SIMPLE t4 eq_ref PRIMARY PRIMARY 1 test.t2.companynr 1 explain select companynr,companyname from t4 left join t2 using (companynr) where companynr > 0; id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t4 index PRIMARY companyname 30 NULL 12 Using where; Using index -1 SIMPLE t2 ALL NULL NULL NULL NULL 1199 Using where +1 SIMPLE t2 ALL NULL NULL NULL NULL 1200 Using where explain select companynr,companyname from t4 left join t2 using (companynr) where companynr > 0 or companynr < 0; id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t4 index PRIMARY companyname 30 NULL 12 Using where; Using index -1 SIMPLE t2 ALL NULL NULL NULL NULL 1199 Using where +1 SIMPLE t2 ALL NULL NULL NULL NULL 1200 Using where explain select companynr,companyname from t4 left join t2 using (companynr) where companynr > 0 and companynr > 0; id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t4 index PRIMARY companyname 30 NULL 12 Using where; Using index -1 SIMPLE t2 ALL NULL NULL NULL NULL 1199 Using where +1 SIMPLE t2 ALL NULL NULL NULL NULL 1200 Using where explain select t2.companynr,companyname from t4 left join t2 using (companynr) where t2.companynr > 0 or t2.companynr is null; id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t4 index NULL companyname 30 NULL 12 Using index -1 SIMPLE t2 ALL NULL NULL NULL NULL 1199 Using where +1 SIMPLE t2 ALL NULL NULL NULL NULL 1200 Using where explain select t2.companynr,companyname from t4 left join t2 using (companynr) where t2.companynr > 0 or t2.companynr < 0 or t4.companynr > 0; id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t4 index PRIMARY companyname 30 NULL 12 Using index -1 SIMPLE t2 ALL NULL NULL NULL NULL 1199 Using where +1 SIMPLE t2 ALL NULL NULL NULL NULL 1200 Using where explain select t2.companynr,companyname from t4 left join t2 using (companynr) where ifnull(t2.companynr,1)>0; id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t4 index NULL companyname 30 NULL 12 Using index -1 SIMPLE t2 ALL NULL NULL NULL NULL 1199 Using where +1 SIMPLE t2 ALL NULL NULL NULL NULL 1200 Using where explain select companynr,companyname from t4 left join t2 using (companynr) where companynr > 0 or companynr is null; id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t4 index PRIMARY companyname 30 NULL 12 Using where; Using index -1 SIMPLE t2 ALL NULL NULL NULL NULL 1199 Using where +1 SIMPLE t2 ALL NULL NULL NULL NULL 1200 Using where explain select companynr,companyname from t4 left join t2 using (companynr) where companynr > 0 or companynr < 0 or companynr > 0; id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t4 index PRIMARY companyname 30 NULL 12 Using where; Using index -1 SIMPLE t2 ALL NULL NULL NULL NULL 1199 Using where +1 SIMPLE t2 ALL NULL NULL NULL NULL 1200 Using where explain select companynr,companyname from t4 left join t2 using (companynr) where ifnull(companynr,1)>0; id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t4 index NULL companyname 30 NULL 12 Using where; Using index -1 SIMPLE t2 ALL NULL NULL NULL NULL 1199 Using where +1 SIMPLE t2 ALL NULL NULL NULL NULL 1200 Using where select distinct t2.companynr,t4.companynr from t2,t4 where t2.companynr=t4.companynr+1; companynr companynr 37 36 @@ -1310,7 +1310,7 @@ companynr companynr explain select distinct t2.companynr,t4.companynr from t2,t4 where t2.companynr=t4.companynr+1; id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t4 index NULL companyname 30 NULL 12 Using index; Using temporary -1 SIMPLE t2 ALL NULL NULL NULL NULL 1199 Using where; Using join buffer (flat, BNL join) +1 SIMPLE t2 ALL NULL NULL NULL NULL 1200 Using where; Using join buffer (flat, BNL join) select period from t1 where (((period > 0) or period < 10000 or (period = 1900)) and (period=1900 and period <= 1901) or (period=1903 and (period=1903)) and period>=1902) or ((period=1904 or period=1905) or (period=1906 or period>1907)) or (period=1908 and period = 1909); period 9410 @@ -1363,7 +1363,7 @@ count(*) min(fld4) max(fld4) sum(fld1) avg(fld1) std(fld1) variance(fld1) 70 Blythe vest 17788966 254128.0857 3272.5940 10709871.3069 explain extended select count(*),min(fld4),max(fld4),sum(fld1),avg(fld1),std(fld1),variance(fld1) from t2 where companynr = 34 and fld4<>""; id select_type table type possible_keys key key_len ref rows filtered Extra -1 SIMPLE t2 ALL NULL NULL NULL NULL 1199 100.00 Using where +1 SIMPLE t2 ALL NULL NULL NULL NULL 1200 100.00 Using where Warnings: Note 1003 select count(0) AS `count(*)`,min(`test`.`t2`.`fld4`) AS `min(fld4)`,max(`test`.`t2`.`fld4`) AS `max(fld4)`,sum(`test`.`t2`.`fld1`) AS `sum(fld1)`,avg(`test`.`t2`.`fld1`) AS `avg(fld1)`,std(`test`.`t2`.`fld1`) AS `std(fld1)`,variance(`test`.`t2`.`fld1`) AS `variance(fld1)` from `test`.`t2` where `test`.`t2`.`companynr` = 34 and `test`.`t2`.`fld4` <> '' select companynr,count(*),min(fld4),max(fld4),sum(fld1),avg(fld1),std(fld1),variance(fld1) from t2 group by companynr limit 3; @@ -1604,7 +1604,7 @@ id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE NULL NULL NULL NULL NULL NULL NULL Impossible WHERE explain select fld3 from t2 where fld1=fld1; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t2 ALL NULL NULL NULL NULL 1199 +1 SIMPLE t2 ALL NULL NULL NULL NULL 1200 select companynr,fld1 from t2 HAVING fld1=250501 or fld1=250502; companynr fld1 34 250501 @@ -1656,7 +1656,7 @@ count(*) 4181 explain select min(fld1),max(fld1),count(*) from t2; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t2 index NULL fld1 4 NULL 1199 Using index +1 SIMPLE t2 index NULL fld1 4 NULL 1200 Using index select min(fld1),max(fld1),count(*) from t2; min(fld1) max(fld1) count(*) 0 1232609 1199 @@ -1714,9 +1714,9 @@ show full columns from t2 from test like 's%'; Field Type Collation Null Key Default Extra Privileges Comment show keys from t2; Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment Index_comment Ignored -t2 0 PRIMARY 1 auto A 1199 NULL NULL BTREE NO -t2 1 fld1 1 fld1 A 1199 NULL NULL BTREE NO -t2 1 fld3 1 fld3 A 1199 NULL NULL BTREE NO +t2 0 PRIMARY 1 auto A 1200 NULL NULL BTREE NO +t2 1 fld1 1 fld1 A 1200 NULL NULL BTREE NO +t2 1 fld3 1 fld3 A 1200 NULL NULL BTREE NO drop table t4, t3, t2, t1; DO 1; DO benchmark(100,1+1),1,1; diff --git a/storage/eloq/mysql-test/mono_main/r/ssl.result b/storage/eloq/mysql-test/mono_main/r/ssl.result index 5ec2935a009..0446a38d635 100644 --- a/storage/eloq/mysql-test/mono_main/r/ssl.result +++ b/storage/eloq/mysql-test/mono_main/r/ssl.result @@ -141,10 +141,10 @@ id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t2 ref fld3 fld3 30 const 1 Using where; Using index explain select fld3 from t2 ignore index (fld3) where fld3 = 'honeysuckle'; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t2 ALL NULL NULL NULL NULL 1199 Using where +1 SIMPLE t2 ALL NULL NULL NULL NULL 1198 Using where explain select fld3 from t2 use index (fld1) where fld3 = 'honeysuckle'; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t2 ALL NULL NULL NULL NULL 1199 Using where +1 SIMPLE t2 ALL NULL NULL NULL NULL 1198 Using where explain select fld3 from t2 use index (fld3) where fld3 = 'honeysuckle'; id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t2 ref fld3 fld3 30 const 1 Using where; Using index @@ -1267,52 +1267,52 @@ id select_type table type possible_keys key key_len ref rows Extra delete from t2 where fld1=999999; explain select t2.companynr,companyname from t4 left join t2 using (companynr) where t2.companynr > 0; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t2 ALL NULL NULL NULL NULL 1199 Using where +1 SIMPLE t2 ALL NULL NULL NULL NULL 1200 Using where 1 SIMPLE t4 eq_ref PRIMARY PRIMARY 1 test.t2.companynr 1 explain select t2.companynr,companyname from t4 left join t2 using (companynr) where t2.companynr > 0 or t2.companynr < 0; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t2 ALL NULL NULL NULL NULL 1199 Using where +1 SIMPLE t2 ALL NULL NULL NULL NULL 1200 Using where 1 SIMPLE t4 eq_ref PRIMARY PRIMARY 1 test.t2.companynr 1 explain select t2.companynr,companyname from t4 left join t2 using (companynr) where t2.companynr > 0 and t4.companynr > 0; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t2 ALL NULL NULL NULL NULL 1199 Using where +1 SIMPLE t2 ALL NULL NULL NULL NULL 1200 Using where 1 SIMPLE t4 eq_ref PRIMARY PRIMARY 1 test.t2.companynr 1 explain select companynr,companyname from t4 left join t2 using (companynr) where companynr > 0; id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t4 index PRIMARY companyname 30 NULL 12 Using where; Using index -1 SIMPLE t2 ALL NULL NULL NULL NULL 1199 Using where +1 SIMPLE t2 ALL NULL NULL NULL NULL 1200 Using where explain select companynr,companyname from t4 left join t2 using (companynr) where companynr > 0 or companynr < 0; id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t4 index PRIMARY companyname 30 NULL 12 Using where; Using index -1 SIMPLE t2 ALL NULL NULL NULL NULL 1199 Using where +1 SIMPLE t2 ALL NULL NULL NULL NULL 1200 Using where explain select companynr,companyname from t4 left join t2 using (companynr) where companynr > 0 and companynr > 0; id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t4 index PRIMARY companyname 30 NULL 12 Using where; Using index -1 SIMPLE t2 ALL NULL NULL NULL NULL 1199 Using where +1 SIMPLE t2 ALL NULL NULL NULL NULL 1200 Using where explain select t2.companynr,companyname from t4 left join t2 using (companynr) where t2.companynr > 0 or t2.companynr is null; id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t4 index NULL companyname 30 NULL 12 Using index -1 SIMPLE t2 ALL NULL NULL NULL NULL 1199 Using where +1 SIMPLE t2 ALL NULL NULL NULL NULL 1200 Using where explain select t2.companynr,companyname from t4 left join t2 using (companynr) where t2.companynr > 0 or t2.companynr < 0 or t4.companynr > 0; id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t4 index PRIMARY companyname 30 NULL 12 Using index -1 SIMPLE t2 ALL NULL NULL NULL NULL 1199 Using where +1 SIMPLE t2 ALL NULL NULL NULL NULL 1200 Using where explain select t2.companynr,companyname from t4 left join t2 using (companynr) where ifnull(t2.companynr,1)>0; id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t4 index NULL companyname 30 NULL 12 Using index -1 SIMPLE t2 ALL NULL NULL NULL NULL 1199 Using where +1 SIMPLE t2 ALL NULL NULL NULL NULL 1200 Using where explain select companynr,companyname from t4 left join t2 using (companynr) where companynr > 0 or companynr is null; id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t4 index PRIMARY companyname 30 NULL 12 Using where; Using index -1 SIMPLE t2 ALL NULL NULL NULL NULL 1199 Using where +1 SIMPLE t2 ALL NULL NULL NULL NULL 1200 Using where explain select companynr,companyname from t4 left join t2 using (companynr) where companynr > 0 or companynr < 0 or companynr > 0; id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t4 index PRIMARY companyname 30 NULL 12 Using where; Using index -1 SIMPLE t2 ALL NULL NULL NULL NULL 1199 Using where +1 SIMPLE t2 ALL NULL NULL NULL NULL 1200 Using where explain select companynr,companyname from t4 left join t2 using (companynr) where ifnull(companynr,1)>0; id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t4 index NULL companyname 30 NULL 12 Using where; Using index -1 SIMPLE t2 ALL NULL NULL NULL NULL 1199 Using where +1 SIMPLE t2 ALL NULL NULL NULL NULL 1200 Using where SET @@optimizer_switch=@local_optimizer_switch; select distinct t2.companynr,t4.companynr from t2,t4 where t2.companynr=t4.companynr+1; companynr companynr @@ -1321,7 +1321,7 @@ companynr companynr explain select distinct t2.companynr,t4.companynr from t2,t4 where t2.companynr=t4.companynr+1; id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t4 index NULL companyname 30 NULL 12 Using index; Using temporary -1 SIMPLE t2 ALL NULL NULL NULL NULL 1199 Using where; Using join buffer (flat, BNL join) +1 SIMPLE t2 ALL NULL NULL NULL NULL 1200 Using where; Using join buffer (flat, BNL join) SET @@join_cache_level=@local_join_cache_level; select period from t1 where (((period > 0) or period < 10000 or (period = 1900)) and (period=1900 and period <= 1901) or (period=1903 and (period=1903)) and period>=1902) or ((period=1904 or period=1905) or (period=1906 or period>1907)) or (period=1908 and period = 1909); period @@ -1375,7 +1375,7 @@ count(*) min(fld4) max(fld4) sum(fld1) avg(fld1) std(fld1) variance(fld1) 70 Blythe vest 17788966 254128.0857 3272.5940 10709871.3069 explain extended select count(*),min(fld4),max(fld4),sum(fld1),avg(fld1),std(fld1),variance(fld1) from t2 where companynr = 34 and fld4<>""; id select_type table type possible_keys key key_len ref rows filtered Extra -1 SIMPLE t2 ALL NULL NULL NULL NULL 1199 100.00 Using where +1 SIMPLE t2 ALL NULL NULL NULL NULL 1200 100.00 Using where Warnings: Note 1003 select count(0) AS `count(*)`,min(`test`.`t2`.`fld4`) AS `min(fld4)`,max(`test`.`t2`.`fld4`) AS `max(fld4)`,sum(`test`.`t2`.`fld1`) AS `sum(fld1)`,avg(`test`.`t2`.`fld1`) AS `avg(fld1)`,std(`test`.`t2`.`fld1`) AS `std(fld1)`,variance(`test`.`t2`.`fld1`) AS `variance(fld1)` from `test`.`t2` where `test`.`t2`.`companynr` = 34 and `test`.`t2`.`fld4` <> '' select companynr,count(*),min(fld4),max(fld4),sum(fld1),avg(fld1),std(fld1),variance(fld1) from t2 group by companynr limit 3; @@ -1616,7 +1616,7 @@ id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE NULL NULL NULL NULL NULL NULL NULL Impossible WHERE explain select fld3 from t2 where fld1=fld1; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t2 ALL NULL NULL NULL NULL 1199 +1 SIMPLE t2 ALL NULL NULL NULL NULL 1200 select companynr,fld1 from t2 HAVING fld1=250501 or fld1=250502; companynr fld1 34 250501 @@ -1668,7 +1668,7 @@ count(*) 4181 explain select min(fld1),max(fld1),count(*) from t2; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t2 index NULL fld1 4 NULL 1199 Using index +1 SIMPLE t2 index NULL fld1 4 NULL 1200 Using index select min(fld1),max(fld1),count(*) from t2; min(fld1) max(fld1) count(*) 0 1232609 1199 @@ -1748,9 +1748,9 @@ show full columns from t2 from test like 's%'; Field Type Collation Null Key Default Extra Privileges Comment show keys from t2; Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment Index_comment Ignored -t2 0 PRIMARY 1 auto A 1199 NULL NULL BTREE NO -t2 1 fld1 1 fld1 A 1199 NULL NULL BTREE NO -t2 1 fld3 1 fld3 A 1199 NULL NULL BTREE NO +t2 0 PRIMARY 1 auto A 1200 NULL NULL BTREE NO +t2 1 fld1 1 fld1 A 1200 NULL NULL BTREE NO +t2 1 fld3 1 fld3 A 1200 NULL NULL BTREE NO drop table t4, t3, t2, t1; CREATE TABLE t1 ( cont_nr int(11) NOT NULL auto_increment, diff --git a/storage/eloq/mysql-test/mono_main/r/ssl_compress.result b/storage/eloq/mysql-test/mono_main/r/ssl_compress.result index bf1c9fcde31..638c3c37248 100644 --- a/storage/eloq/mysql-test/mono_main/r/ssl_compress.result +++ b/storage/eloq/mysql-test/mono_main/r/ssl_compress.result @@ -138,10 +138,10 @@ id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t2 ref fld3 fld3 30 const 1 Using where; Using index explain select fld3 from t2 ignore index (fld3) where fld3 = 'honeysuckle'; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t2 ALL NULL NULL NULL NULL 1199 Using where +1 SIMPLE t2 ALL NULL NULL NULL NULL 1198 Using where explain select fld3 from t2 use index (fld1) where fld3 = 'honeysuckle'; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t2 ALL NULL NULL NULL NULL 1199 Using where +1 SIMPLE t2 ALL NULL NULL NULL NULL 1198 Using where explain select fld3 from t2 use index (fld3) where fld3 = 'honeysuckle'; id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t2 ref fld3 fld3 30 const 1 Using where; Using index @@ -1264,52 +1264,52 @@ id select_type table type possible_keys key key_len ref rows Extra delete from t2 where fld1=999999; explain select t2.companynr,companyname from t4 left join t2 using (companynr) where t2.companynr > 0; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t2 ALL NULL NULL NULL NULL 1199 Using where +1 SIMPLE t2 ALL NULL NULL NULL NULL 1200 Using where 1 SIMPLE t4 eq_ref PRIMARY PRIMARY 1 test.t2.companynr 1 explain select t2.companynr,companyname from t4 left join t2 using (companynr) where t2.companynr > 0 or t2.companynr < 0; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t2 ALL NULL NULL NULL NULL 1199 Using where +1 SIMPLE t2 ALL NULL NULL NULL NULL 1200 Using where 1 SIMPLE t4 eq_ref PRIMARY PRIMARY 1 test.t2.companynr 1 explain select t2.companynr,companyname from t4 left join t2 using (companynr) where t2.companynr > 0 and t4.companynr > 0; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t2 ALL NULL NULL NULL NULL 1199 Using where +1 SIMPLE t2 ALL NULL NULL NULL NULL 1200 Using where 1 SIMPLE t4 eq_ref PRIMARY PRIMARY 1 test.t2.companynr 1 explain select companynr,companyname from t4 left join t2 using (companynr) where companynr > 0; id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t4 index PRIMARY companyname 30 NULL 12 Using where; Using index -1 SIMPLE t2 ALL NULL NULL NULL NULL 1199 Using where +1 SIMPLE t2 ALL NULL NULL NULL NULL 1200 Using where explain select companynr,companyname from t4 left join t2 using (companynr) where companynr > 0 or companynr < 0; id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t4 index PRIMARY companyname 30 NULL 12 Using where; Using index -1 SIMPLE t2 ALL NULL NULL NULL NULL 1199 Using where +1 SIMPLE t2 ALL NULL NULL NULL NULL 1200 Using where explain select companynr,companyname from t4 left join t2 using (companynr) where companynr > 0 and companynr > 0; id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t4 index PRIMARY companyname 30 NULL 12 Using where; Using index -1 SIMPLE t2 ALL NULL NULL NULL NULL 1199 Using where +1 SIMPLE t2 ALL NULL NULL NULL NULL 1200 Using where explain select t2.companynr,companyname from t4 left join t2 using (companynr) where t2.companynr > 0 or t2.companynr is null; id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t4 index NULL companyname 30 NULL 12 Using index -1 SIMPLE t2 ALL NULL NULL NULL NULL 1199 Using where +1 SIMPLE t2 ALL NULL NULL NULL NULL 1200 Using where explain select t2.companynr,companyname from t4 left join t2 using (companynr) where t2.companynr > 0 or t2.companynr < 0 or t4.companynr > 0; id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t4 index PRIMARY companyname 30 NULL 12 Using index -1 SIMPLE t2 ALL NULL NULL NULL NULL 1199 Using where +1 SIMPLE t2 ALL NULL NULL NULL NULL 1200 Using where explain select t2.companynr,companyname from t4 left join t2 using (companynr) where ifnull(t2.companynr,1)>0; id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t4 index NULL companyname 30 NULL 12 Using index -1 SIMPLE t2 ALL NULL NULL NULL NULL 1199 Using where +1 SIMPLE t2 ALL NULL NULL NULL NULL 1200 Using where explain select companynr,companyname from t4 left join t2 using (companynr) where companynr > 0 or companynr is null; id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t4 index PRIMARY companyname 30 NULL 12 Using where; Using index -1 SIMPLE t2 ALL NULL NULL NULL NULL 1199 Using where +1 SIMPLE t2 ALL NULL NULL NULL NULL 1200 Using where explain select companynr,companyname from t4 left join t2 using (companynr) where companynr > 0 or companynr < 0 or companynr > 0; id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t4 index PRIMARY companyname 30 NULL 12 Using where; Using index -1 SIMPLE t2 ALL NULL NULL NULL NULL 1199 Using where +1 SIMPLE t2 ALL NULL NULL NULL NULL 1200 Using where explain select companynr,companyname from t4 left join t2 using (companynr) where ifnull(companynr,1)>0; id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t4 index NULL companyname 30 NULL 12 Using where; Using index -1 SIMPLE t2 ALL NULL NULL NULL NULL 1199 Using where +1 SIMPLE t2 ALL NULL NULL NULL NULL 1200 Using where SET @@optimizer_switch=@local_optimizer_switch; select distinct t2.companynr,t4.companynr from t2,t4 where t2.companynr=t4.companynr+1; companynr companynr @@ -1318,7 +1318,7 @@ companynr companynr explain select distinct t2.companynr,t4.companynr from t2,t4 where t2.companynr=t4.companynr+1; id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t4 index NULL companyname 30 NULL 12 Using index; Using temporary -1 SIMPLE t2 ALL NULL NULL NULL NULL 1199 Using where; Using join buffer (flat, BNL join) +1 SIMPLE t2 ALL NULL NULL NULL NULL 1200 Using where; Using join buffer (flat, BNL join) SET @@join_cache_level=@local_join_cache_level; select period from t1 where (((period > 0) or period < 10000 or (period = 1900)) and (period=1900 and period <= 1901) or (period=1903 and (period=1903)) and period>=1902) or ((period=1904 or period=1905) or (period=1906 or period>1907)) or (period=1908 and period = 1909); period @@ -1372,7 +1372,7 @@ count(*) min(fld4) max(fld4) sum(fld1) avg(fld1) std(fld1) variance(fld1) 70 Blythe vest 17788966 254128.0857 3272.5940 10709871.3069 explain extended select count(*),min(fld4),max(fld4),sum(fld1),avg(fld1),std(fld1),variance(fld1) from t2 where companynr = 34 and fld4<>""; id select_type table type possible_keys key key_len ref rows filtered Extra -1 SIMPLE t2 ALL NULL NULL NULL NULL 1199 100.00 Using where +1 SIMPLE t2 ALL NULL NULL NULL NULL 1200 100.00 Using where Warnings: Note 1003 select count(0) AS `count(*)`,min(`test`.`t2`.`fld4`) AS `min(fld4)`,max(`test`.`t2`.`fld4`) AS `max(fld4)`,sum(`test`.`t2`.`fld1`) AS `sum(fld1)`,avg(`test`.`t2`.`fld1`) AS `avg(fld1)`,std(`test`.`t2`.`fld1`) AS `std(fld1)`,variance(`test`.`t2`.`fld1`) AS `variance(fld1)` from `test`.`t2` where `test`.`t2`.`companynr` = 34 and `test`.`t2`.`fld4` <> '' select companynr,count(*),min(fld4),max(fld4),sum(fld1),avg(fld1),std(fld1),variance(fld1) from t2 group by companynr limit 3; @@ -1613,7 +1613,7 @@ id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE NULL NULL NULL NULL NULL NULL NULL Impossible WHERE explain select fld3 from t2 where fld1=fld1; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t2 ALL NULL NULL NULL NULL 1199 +1 SIMPLE t2 ALL NULL NULL NULL NULL 1200 select companynr,fld1 from t2 HAVING fld1=250501 or fld1=250502; companynr fld1 34 250501 @@ -1665,7 +1665,7 @@ count(*) 4181 explain select min(fld1),max(fld1),count(*) from t2; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t2 index NULL fld1 4 NULL 1199 Using index +1 SIMPLE t2 index NULL fld1 4 NULL 1200 Using index select min(fld1),max(fld1),count(*) from t2; min(fld1) max(fld1) count(*) 0 1232609 1199 @@ -1745,9 +1745,9 @@ show full columns from t2 from test like 's%'; Field Type Collation Null Key Default Extra Privileges Comment show keys from t2; Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment Index_comment Ignored -t2 0 PRIMARY 1 auto A 1199 NULL NULL BTREE NO -t2 1 fld1 1 fld1 A 1199 NULL NULL BTREE NO -t2 1 fld3 1 fld3 A 1199 NULL NULL BTREE NO +t2 0 PRIMARY 1 auto A 1200 NULL NULL BTREE NO +t2 1 fld1 1 fld1 A 1200 NULL NULL BTREE NO +t2 1 fld3 1 fld3 A 1200 NULL NULL BTREE NO drop table t4, t3, t2, t1; CREATE TABLE t1 ( cont_nr int(11) NOT NULL auto_increment, diff --git a/storage/eloq/mysql-test/mono_main/t/subselect_sj.test b/storage/eloq/mysql-test/mono_main/t/subselect_sj.test index 18047335789..51a110717a5 100644 --- a/storage/eloq/mysql-test/mono_main/t/subselect_sj.test +++ b/storage/eloq/mysql-test/mono_main/t/subselect_sj.test @@ -2906,6 +2906,8 @@ select a from t1, t2 where b between 1 and 2 and a in (select b from t2); explain select a from t1 join t2 on b between 1 and 2 and a in (select b from t2); +# FIXME: Temporary. To avoid deadlock caused by split range and drop table. +--sleep 3 drop table t1,t2; set optimizer_switch= @tmp_mdev12675; From 2242d96ea4dcc5716e4134db40de802295f56cf5 Mon Sep 17 00:00:00 2001 From: yi-xmu Date: Mon, 16 Mar 2026 12:35:31 +0800 Subject: [PATCH 2/3] update submodule --- data_substrate | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/data_substrate b/data_substrate index 5eb0b7ac217..39b6d077988 160000 --- a/data_substrate +++ b/data_substrate @@ -1 +1 @@ -Subproject commit 5eb0b7ac217628a4f1af3ca1ebd94d518bcfc5ff +Subproject commit 39b6d077988e99b8a2965149ce4f08d79a14371c From ae6c51fcce759a2fb4ca06c6905f13fcd3de6909 Mon Sep 17 00:00:00 2001 From: yi-xmu Date: Tue, 17 Mar 2026 10:32:40 +0800 Subject: [PATCH 3/3] update subm --- data_substrate | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/data_substrate b/data_substrate index 39b6d077988..a64a31d7b5e 160000 --- a/data_substrate +++ b/data_substrate @@ -1 +1 @@ -Subproject commit 39b6d077988e99b8a2965149ce4f08d79a14371c +Subproject commit a64a31d7b5e87df17365794b995a325cdf153cb2