mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
Merge.
This commit is contained in:
@ -1828,4 +1828,37 @@ USA Miami Miami
|
||||
USA Miami Miami
|
||||
SET @@tmp_table_size=default;
|
||||
drop table t1,t2,t3;
|
||||
#
|
||||
# BUG#882994: Crash in QUICK_RANGE_SELECT::reset with derived_with_keys
|
||||
#
|
||||
CREATE TABLE t2 (
|
||||
pk varchar(33),
|
||||
col_varchar_key varchar(3) NOT NULL,
|
||||
col_varchar_nokey varchar(52) NOT NULL);
|
||||
INSERT INTO t2 VALUES ('NICSpanish','NIC','Spanish'),
|
||||
('NERHausa','NER','Hausa'),('NGAJoruba','NGA','Joruba'),
|
||||
('NIUNiue','NIU','Niue'),('NFKEnglish','NFK','English'),
|
||||
('NORNorwegian','NOR','Norwegian'),('CIVAkan','CIV','Akan'),
|
||||
('OMNArabic','OMN','Arabic'),('PAKPunjabi','PAK','Punjabi'),
|
||||
('PLWPalau','PLW','Palau'),('PANSpanish','PAN','Spanish'),
|
||||
('PNGPapuan Langua','PNG','Papuan Languages'), ('PRYSpanish','PRY','Spanish'),
|
||||
('PERSpanish','PER','Spanish'), ('PCNPitcairnese','PCN','Pitcairnese'),
|
||||
('MNPPhilippene La','MNP','Philippene Langu'),('PRTPortuguese','PRT','Portuguese'),
|
||||
('PRISpanish','PRI','Spanish'),('POLPolish','POL','Polish'),('GNQFang','GNQ','Fang');
|
||||
CREATE TABLE t1 ( col_varchar_nokey varchar(52) NOT NULL ) ;
|
||||
INSERT INTO t1 VALUES ('Chinese'),('English'),('French'),('German'),
|
||||
('Italian'),('Japanese'),('Korean'),('Polish'),('Portuguese'),('Spanish'),
|
||||
('Tagalog'),('Vietnamese');
|
||||
CREATE TABLE t3 ( col_varchar_key varchar(52)) ;
|
||||
INSERT INTO t3 VALUES ('United States');
|
||||
set @tmp_882994= @@max_heap_table_size;
|
||||
set max_heap_table_size=1;
|
||||
SELECT *
|
||||
FROM t3 JOIN
|
||||
( SELECT t2.* FROM t1, t2 ) AS alias2
|
||||
ON ( alias2.col_varchar_nokey = t3.col_varchar_key )
|
||||
ORDER BY CONCAT(alias2.col_varchar_nokey);
|
||||
col_varchar_key pk col_varchar_key col_varchar_nokey
|
||||
set max_heap_table_size= @tmp_882994;
|
||||
drop table t1,t2,t3;
|
||||
set optimizer_switch=@exit_optimizer_switch;
|
||||
|
@ -275,7 +275,7 @@ id select_type table type possible_keys key key_len ref rows filtered Extra
|
||||
1 PRIMARY t3 ALL NULL NULL NULL NULL 3 100.00 Using where
|
||||
2 SUBQUERY t2 ALL NULL NULL NULL NULL 3 100.00
|
||||
Warnings:
|
||||
Note 1003 select `test`.`t3`.`a` AS `a` from `test`.`t3` where <nop>(<in_optimizer>(`test`.`t3`.`a`,((select min(`test`.`t2`.`b`) from `test`.`t2`) <= `test`.`t3`.`a`)))
|
||||
Note 1003 select `test`.`t3`.`a` AS `a` from `test`.`t3` where <nop>(<in_optimizer>(`test`.`t3`.`a`,((select min(`test`.`t2`.`b`) from `test`.`t2`) <= <cache>(`test`.`t3`.`a`))))
|
||||
select * from t3 where a >= all (select b from t2);
|
||||
a
|
||||
7
|
||||
@ -1639,7 +1639,7 @@ id select_type table type possible_keys key key_len ref rows filtered Extra
|
||||
1 PRIMARY t3 ALL NULL NULL NULL NULL 3 100.00 Using where
|
||||
2 SUBQUERY t2 system NULL NULL NULL NULL 0 0.00 const row not found
|
||||
Warnings:
|
||||
Note 1003 select `test`.`t3`.`a` AS `a` from `test`.`t3` where <not>(<in_optimizer>(`test`.`t3`.`a`,((select max(NULL) from `test`.`t2`) > `test`.`t3`.`a`)))
|
||||
Note 1003 select `test`.`t3`.`a` AS `a` from `test`.`t3` where <not>(<in_optimizer>(`test`.`t3`.`a`,((select max(NULL) from `test`.`t2`) > <cache>(`test`.`t3`.`a`))))
|
||||
select * from t3 where a >= some (select b from t2);
|
||||
a
|
||||
explain extended select * from t3 where a >= some (select b from t2);
|
||||
@ -1647,7 +1647,7 @@ id select_type table type possible_keys key key_len ref rows filtered Extra
|
||||
1 PRIMARY t3 ALL NULL NULL NULL NULL 3 100.00 Using where
|
||||
2 SUBQUERY t2 system NULL NULL NULL NULL 0 0.00 const row not found
|
||||
Warnings:
|
||||
Note 1003 select `test`.`t3`.`a` AS `a` from `test`.`t3` where <nop>(<in_optimizer>(`test`.`t3`.`a`,((select min(NULL) from `test`.`t2`) <= `test`.`t3`.`a`)))
|
||||
Note 1003 select `test`.`t3`.`a` AS `a` from `test`.`t3` where <nop>(<in_optimizer>(`test`.`t3`.`a`,((select min(NULL) from `test`.`t2`) <= <cache>(`test`.`t3`.`a`))))
|
||||
select * from t3 where a >= all (select b from t2 group by 1);
|
||||
a
|
||||
6
|
||||
@ -1658,7 +1658,7 @@ id select_type table type possible_keys key key_len ref rows filtered Extra
|
||||
1 PRIMARY t3 ALL NULL NULL NULL NULL 3 100.00 Using where
|
||||
2 SUBQUERY t2 system NULL NULL NULL NULL 0 0.00 const row not found
|
||||
Warnings:
|
||||
Note 1003 select `test`.`t3`.`a` AS `a` from `test`.`t3` where <not>(<in_optimizer>(`test`.`t3`.`a`,(<max>(select NULL from `test`.`t2` group by 1) > `test`.`t3`.`a`)))
|
||||
Note 1003 select `test`.`t3`.`a` AS `a` from `test`.`t3` where <not>(<in_optimizer>(`test`.`t3`.`a`,(<max>(select NULL from `test`.`t2` group by 1) > <cache>(`test`.`t3`.`a`))))
|
||||
select * from t3 where a >= some (select b from t2 group by 1);
|
||||
a
|
||||
explain extended select * from t3 where a >= some (select b from t2 group by 1);
|
||||
@ -1666,7 +1666,7 @@ id select_type table type possible_keys key key_len ref rows filtered Extra
|
||||
1 PRIMARY t3 ALL NULL NULL NULL NULL 3 100.00 Using where
|
||||
2 SUBQUERY t2 system NULL NULL NULL NULL 0 0.00 const row not found
|
||||
Warnings:
|
||||
Note 1003 select `test`.`t3`.`a` AS `a` from `test`.`t3` where <nop>(<in_optimizer>(`test`.`t3`.`a`,(<min>(select NULL from `test`.`t2` group by 1) <= `test`.`t3`.`a`)))
|
||||
Note 1003 select `test`.`t3`.`a` AS `a` from `test`.`t3` where <nop>(<in_optimizer>(`test`.`t3`.`a`,(<min>(select NULL from `test`.`t2` group by 1) <= <cache>(`test`.`t3`.`a`))))
|
||||
select * from t3 where NULL >= any (select b from t2);
|
||||
a
|
||||
explain extended select * from t3 where NULL >= any (select b from t2);
|
||||
@ -1709,7 +1709,7 @@ id select_type table type possible_keys key key_len ref rows filtered Extra
|
||||
1 PRIMARY t3 ALL NULL NULL NULL NULL 3 100.00 Using where
|
||||
2 SUBQUERY t2 ALL NULL NULL NULL NULL 4 100.00 Using temporary
|
||||
Warnings:
|
||||
Note 1003 select `test`.`t3`.`a` AS `a` from `test`.`t3` where <not>(<in_optimizer>(`test`.`t3`.`a`,(<max>(select max(`test`.`t2`.`b`) from `test`.`t2` group by `test`.`t2`.`a`) >= `test`.`t3`.`a`)))
|
||||
Note 1003 select `test`.`t3`.`a` AS `a` from `test`.`t3` where <not>(<in_optimizer>(`test`.`t3`.`a`,(<max>(select max(`test`.`t2`.`b`) from `test`.`t2` group by `test`.`t2`.`a`) >= <cache>(`test`.`t3`.`a`))))
|
||||
drop table t2, t3;
|
||||
CREATE TABLE `t1` ( `id` mediumint(9) NOT NULL auto_increment, `taskid` bigint(20) NOT NULL default '0', `dbid` int(11) NOT NULL default '0', `create_date` datetime NOT NULL default '0000-00-00 00:00:00', `last_update` datetime NOT NULL default '0000-00-00 00:00:00', PRIMARY KEY (`id`)) ENGINE=MyISAM CHARSET=latin1 AUTO_INCREMENT=3 ;
|
||||
INSERT INTO `t1` (`id`, `taskid`, `dbid`, `create_date`,`last_update`) VALUES (1, 1, 15, '2003-09-29 10:31:36', '2003-09-29 10:31:36'), (2, 1, 21, now(), now());
|
||||
|
@ -2104,5 +2104,32 @@ NULL
|
||||
deallocate prepare st1;
|
||||
drop table t1, t2, t3;
|
||||
set optimizer_switch=@subselect4_tmp;
|
||||
#
|
||||
# LP BUG#833702 Wrong result with nested IN and singlerow subqueries and equality propagation
|
||||
#
|
||||
CREATE TABLE t2 (c int , a int, b int);
|
||||
INSERT INTO t2 VALUES (10,7,0);
|
||||
CREATE TABLE t3 (a int, b int) ;
|
||||
INSERT INTO t3 VALUES (5,0),(7,0);
|
||||
CREATE TABLE t4 (a int);
|
||||
INSERT INTO t4 VALUES (2),(8);
|
||||
set @@optimizer_switch='in_to_exists=on,materialization=off,subquery_cache=off';
|
||||
SELECT * FROM t2
|
||||
WHERE t2.b IN (SELECT b FROM t3 WHERE t3.a = t2.a AND a < SOME (SELECT * FROM t4))
|
||||
OR ( t2.c > 242 );
|
||||
c a b
|
||||
10 7 0
|
||||
EXPLAIN SELECT * FROM t2
|
||||
WHERE t2.b IN (SELECT t3.b FROM t3 WHERE t3.a < ANY (SELECT t4.a FROM t4) and t3.a = 7);
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 PRIMARY t2 system NULL NULL NULL NULL 1
|
||||
2 DEPENDENT SUBQUERY t3 ALL NULL NULL NULL NULL 2 Using where
|
||||
3 SUBQUERY t4 ALL NULL NULL NULL NULL 2
|
||||
SELECT * FROM t2
|
||||
WHERE t2.b IN (SELECT t3.b FROM t3 WHERE t3.a < ANY (SELECT t4.a FROM t4) and t3.a = 7);
|
||||
c a b
|
||||
10 7 0
|
||||
drop table t2, t3, t4;
|
||||
set optimizer_switch=@subselect4_tmp;
|
||||
SET optimizer_switch= @@global.optimizer_switch;
|
||||
set @@tmp_table_size= @@global.tmp_table_size;
|
||||
|
@ -280,7 +280,7 @@ id select_type table type possible_keys key key_len ref rows filtered Extra
|
||||
1 PRIMARY t3 ALL NULL NULL NULL NULL 3 100.00 Using where
|
||||
2 SUBQUERY t2 ALL NULL NULL NULL NULL 3 100.00
|
||||
Warnings:
|
||||
Note 1003 select `test`.`t3`.`a` AS `a` from `test`.`t3` where <nop>(<in_optimizer>(`test`.`t3`.`a`,((select min(`test`.`t2`.`b`) from `test`.`t2`) <= `test`.`t3`.`a`)))
|
||||
Note 1003 select `test`.`t3`.`a` AS `a` from `test`.`t3` where <nop>(<in_optimizer>(`test`.`t3`.`a`,((select min(`test`.`t2`.`b`) from `test`.`t2`) <= <cache>(`test`.`t3`.`a`))))
|
||||
select * from t3 where a >= all (select b from t2);
|
||||
a
|
||||
7
|
||||
@ -1644,7 +1644,7 @@ id select_type table type possible_keys key key_len ref rows filtered Extra
|
||||
1 PRIMARY t3 ALL NULL NULL NULL NULL 3 100.00 Using where
|
||||
2 SUBQUERY t2 system NULL NULL NULL NULL 0 0.00 const row not found
|
||||
Warnings:
|
||||
Note 1003 select `test`.`t3`.`a` AS `a` from `test`.`t3` where <not>(<in_optimizer>(`test`.`t3`.`a`,((select max(NULL) from `test`.`t2`) > `test`.`t3`.`a`)))
|
||||
Note 1003 select `test`.`t3`.`a` AS `a` from `test`.`t3` where <not>(<in_optimizer>(`test`.`t3`.`a`,((select max(NULL) from `test`.`t2`) > <cache>(`test`.`t3`.`a`))))
|
||||
select * from t3 where a >= some (select b from t2);
|
||||
a
|
||||
explain extended select * from t3 where a >= some (select b from t2);
|
||||
@ -1652,7 +1652,7 @@ id select_type table type possible_keys key key_len ref rows filtered Extra
|
||||
1 PRIMARY t3 ALL NULL NULL NULL NULL 3 100.00 Using where
|
||||
2 SUBQUERY t2 system NULL NULL NULL NULL 0 0.00 const row not found
|
||||
Warnings:
|
||||
Note 1003 select `test`.`t3`.`a` AS `a` from `test`.`t3` where <nop>(<in_optimizer>(`test`.`t3`.`a`,((select min(NULL) from `test`.`t2`) <= `test`.`t3`.`a`)))
|
||||
Note 1003 select `test`.`t3`.`a` AS `a` from `test`.`t3` where <nop>(<in_optimizer>(`test`.`t3`.`a`,((select min(NULL) from `test`.`t2`) <= <cache>(`test`.`t3`.`a`))))
|
||||
select * from t3 where a >= all (select b from t2 group by 1);
|
||||
a
|
||||
6
|
||||
@ -1663,7 +1663,7 @@ id select_type table type possible_keys key key_len ref rows filtered Extra
|
||||
1 PRIMARY t3 ALL NULL NULL NULL NULL 3 100.00 Using where
|
||||
2 SUBQUERY t2 system NULL NULL NULL NULL 0 0.00 const row not found
|
||||
Warnings:
|
||||
Note 1003 select `test`.`t3`.`a` AS `a` from `test`.`t3` where <not>(<in_optimizer>(`test`.`t3`.`a`,(<max>(select NULL from `test`.`t2` group by 1) > `test`.`t3`.`a`)))
|
||||
Note 1003 select `test`.`t3`.`a` AS `a` from `test`.`t3` where <not>(<in_optimizer>(`test`.`t3`.`a`,(<max>(select NULL from `test`.`t2` group by 1) > <cache>(`test`.`t3`.`a`))))
|
||||
select * from t3 where a >= some (select b from t2 group by 1);
|
||||
a
|
||||
explain extended select * from t3 where a >= some (select b from t2 group by 1);
|
||||
@ -1671,7 +1671,7 @@ id select_type table type possible_keys key key_len ref rows filtered Extra
|
||||
1 PRIMARY t3 ALL NULL NULL NULL NULL 3 100.00 Using where
|
||||
2 SUBQUERY t2 system NULL NULL NULL NULL 0 0.00 const row not found
|
||||
Warnings:
|
||||
Note 1003 select `test`.`t3`.`a` AS `a` from `test`.`t3` where <nop>(<in_optimizer>(`test`.`t3`.`a`,(<min>(select NULL from `test`.`t2` group by 1) <= `test`.`t3`.`a`)))
|
||||
Note 1003 select `test`.`t3`.`a` AS `a` from `test`.`t3` where <nop>(<in_optimizer>(`test`.`t3`.`a`,(<min>(select NULL from `test`.`t2` group by 1) <= <cache>(`test`.`t3`.`a`))))
|
||||
select * from t3 where NULL >= any (select b from t2);
|
||||
a
|
||||
explain extended select * from t3 where NULL >= any (select b from t2);
|
||||
@ -1714,7 +1714,7 @@ id select_type table type possible_keys key key_len ref rows filtered Extra
|
||||
1 PRIMARY t3 ALL NULL NULL NULL NULL 3 100.00 Using where
|
||||
2 SUBQUERY t2 ALL NULL NULL NULL NULL 4 100.00 Using temporary
|
||||
Warnings:
|
||||
Note 1003 select `test`.`t3`.`a` AS `a` from `test`.`t3` where <not>(<in_optimizer>(`test`.`t3`.`a`,(<max>(select max(`test`.`t2`.`b`) from `test`.`t2` group by `test`.`t2`.`a`) >= `test`.`t3`.`a`)))
|
||||
Note 1003 select `test`.`t3`.`a` AS `a` from `test`.`t3` where <not>(<in_optimizer>(`test`.`t3`.`a`,(<max>(select max(`test`.`t2`.`b`) from `test`.`t2` group by `test`.`t2`.`a`) >= <cache>(`test`.`t3`.`a`))))
|
||||
drop table t2, t3;
|
||||
CREATE TABLE `t1` ( `id` mediumint(9) NOT NULL auto_increment, `taskid` bigint(20) NOT NULL default '0', `dbid` int(11) NOT NULL default '0', `create_date` datetime NOT NULL default '0000-00-00 00:00:00', `last_update` datetime NOT NULL default '0000-00-00 00:00:00', PRIMARY KEY (`id`)) ENGINE=MyISAM CHARSET=latin1 AUTO_INCREMENT=3 ;
|
||||
INSERT INTO `t1` (`id`, `taskid`, `dbid`, `create_date`,`last_update`) VALUES (1, 1, 15, '2003-09-29 10:31:36', '2003-09-29 10:31:36'), (2, 1, 21, now(), now());
|
||||
|
@ -276,7 +276,7 @@ id select_type table type possible_keys key key_len ref rows filtered Extra
|
||||
1 PRIMARY t3 ALL NULL NULL NULL NULL 3 100.00 Using where
|
||||
2 SUBQUERY t2 ALL NULL NULL NULL NULL 3 100.00
|
||||
Warnings:
|
||||
Note 1003 select `test`.`t3`.`a` AS `a` from `test`.`t3` where <nop>(<in_optimizer>(`test`.`t3`.`a`,((select min(`test`.`t2`.`b`) from `test`.`t2`) <= `test`.`t3`.`a`)))
|
||||
Note 1003 select `test`.`t3`.`a` AS `a` from `test`.`t3` where <nop>(<in_optimizer>(`test`.`t3`.`a`,((select min(`test`.`t2`.`b`) from `test`.`t2`) <= <cache>(`test`.`t3`.`a`))))
|
||||
select * from t3 where a >= all (select b from t2);
|
||||
a
|
||||
7
|
||||
@ -1640,7 +1640,7 @@ id select_type table type possible_keys key key_len ref rows filtered Extra
|
||||
1 PRIMARY t3 ALL NULL NULL NULL NULL 3 100.00 Using where
|
||||
2 SUBQUERY t2 system NULL NULL NULL NULL 0 0.00 const row not found
|
||||
Warnings:
|
||||
Note 1003 select `test`.`t3`.`a` AS `a` from `test`.`t3` where <not>(<in_optimizer>(`test`.`t3`.`a`,((select max(NULL) from `test`.`t2`) > `test`.`t3`.`a`)))
|
||||
Note 1003 select `test`.`t3`.`a` AS `a` from `test`.`t3` where <not>(<in_optimizer>(`test`.`t3`.`a`,((select max(NULL) from `test`.`t2`) > <cache>(`test`.`t3`.`a`))))
|
||||
select * from t3 where a >= some (select b from t2);
|
||||
a
|
||||
explain extended select * from t3 where a >= some (select b from t2);
|
||||
@ -1648,7 +1648,7 @@ id select_type table type possible_keys key key_len ref rows filtered Extra
|
||||
1 PRIMARY t3 ALL NULL NULL NULL NULL 3 100.00 Using where
|
||||
2 SUBQUERY t2 system NULL NULL NULL NULL 0 0.00 const row not found
|
||||
Warnings:
|
||||
Note 1003 select `test`.`t3`.`a` AS `a` from `test`.`t3` where <nop>(<in_optimizer>(`test`.`t3`.`a`,((select min(NULL) from `test`.`t2`) <= `test`.`t3`.`a`)))
|
||||
Note 1003 select `test`.`t3`.`a` AS `a` from `test`.`t3` where <nop>(<in_optimizer>(`test`.`t3`.`a`,((select min(NULL) from `test`.`t2`) <= <cache>(`test`.`t3`.`a`))))
|
||||
select * from t3 where a >= all (select b from t2 group by 1);
|
||||
a
|
||||
6
|
||||
@ -1659,7 +1659,7 @@ id select_type table type possible_keys key key_len ref rows filtered Extra
|
||||
1 PRIMARY t3 ALL NULL NULL NULL NULL 3 100.00 Using where
|
||||
2 SUBQUERY t2 system NULL NULL NULL NULL 0 0.00 const row not found
|
||||
Warnings:
|
||||
Note 1003 select `test`.`t3`.`a` AS `a` from `test`.`t3` where <not>(<in_optimizer>(`test`.`t3`.`a`,(<max>(select NULL from `test`.`t2` group by 1) > `test`.`t3`.`a`)))
|
||||
Note 1003 select `test`.`t3`.`a` AS `a` from `test`.`t3` where <not>(<in_optimizer>(`test`.`t3`.`a`,(<max>(select NULL from `test`.`t2` group by 1) > <cache>(`test`.`t3`.`a`))))
|
||||
select * from t3 where a >= some (select b from t2 group by 1);
|
||||
a
|
||||
explain extended select * from t3 where a >= some (select b from t2 group by 1);
|
||||
@ -1667,7 +1667,7 @@ id select_type table type possible_keys key key_len ref rows filtered Extra
|
||||
1 PRIMARY t3 ALL NULL NULL NULL NULL 3 100.00 Using where
|
||||
2 SUBQUERY t2 system NULL NULL NULL NULL 0 0.00 const row not found
|
||||
Warnings:
|
||||
Note 1003 select `test`.`t3`.`a` AS `a` from `test`.`t3` where <nop>(<in_optimizer>(`test`.`t3`.`a`,(<min>(select NULL from `test`.`t2` group by 1) <= `test`.`t3`.`a`)))
|
||||
Note 1003 select `test`.`t3`.`a` AS `a` from `test`.`t3` where <nop>(<in_optimizer>(`test`.`t3`.`a`,(<min>(select NULL from `test`.`t2` group by 1) <= <cache>(`test`.`t3`.`a`))))
|
||||
select * from t3 where NULL >= any (select b from t2);
|
||||
a
|
||||
explain extended select * from t3 where NULL >= any (select b from t2);
|
||||
@ -1710,7 +1710,7 @@ id select_type table type possible_keys key key_len ref rows filtered Extra
|
||||
1 PRIMARY t3 ALL NULL NULL NULL NULL 3 100.00 Using where
|
||||
2 SUBQUERY t2 ALL NULL NULL NULL NULL 4 100.00 Using temporary
|
||||
Warnings:
|
||||
Note 1003 select `test`.`t3`.`a` AS `a` from `test`.`t3` where <not>(<in_optimizer>(`test`.`t3`.`a`,(<max>(select max(`test`.`t2`.`b`) from `test`.`t2` group by `test`.`t2`.`a`) >= `test`.`t3`.`a`)))
|
||||
Note 1003 select `test`.`t3`.`a` AS `a` from `test`.`t3` where <not>(<in_optimizer>(`test`.`t3`.`a`,(<max>(select max(`test`.`t2`.`b`) from `test`.`t2` group by `test`.`t2`.`a`) >= <cache>(`test`.`t3`.`a`))))
|
||||
drop table t2, t3;
|
||||
CREATE TABLE `t1` ( `id` mediumint(9) NOT NULL auto_increment, `taskid` bigint(20) NOT NULL default '0', `dbid` int(11) NOT NULL default '0', `create_date` datetime NOT NULL default '0000-00-00 00:00:00', `last_update` datetime NOT NULL default '0000-00-00 00:00:00', PRIMARY KEY (`id`)) ENGINE=MyISAM CHARSET=latin1 AUTO_INCREMENT=3 ;
|
||||
INSERT INTO `t1` (`id`, `taskid`, `dbid`, `create_date`,`last_update`) VALUES (1, 1, 15, '2003-09-29 10:31:36', '2003-09-29 10:31:36'), (2, 1, 21, now(), now());
|
||||
|
@ -279,7 +279,7 @@ id select_type table type possible_keys key key_len ref rows filtered Extra
|
||||
1 PRIMARY t3 ALL NULL NULL NULL NULL 3 100.00 Using where
|
||||
2 SUBQUERY t2 ALL NULL NULL NULL NULL 3 100.00
|
||||
Warnings:
|
||||
Note 1003 select `test`.`t3`.`a` AS `a` from `test`.`t3` where <nop>(<in_optimizer>(`test`.`t3`.`a`,((select min(`test`.`t2`.`b`) from `test`.`t2`) <= `test`.`t3`.`a`)))
|
||||
Note 1003 select `test`.`t3`.`a` AS `a` from `test`.`t3` where <nop>(<in_optimizer>(`test`.`t3`.`a`,((select min(`test`.`t2`.`b`) from `test`.`t2`) <= <cache>(`test`.`t3`.`a`))))
|
||||
select * from t3 where a >= all (select b from t2);
|
||||
a
|
||||
7
|
||||
@ -1643,7 +1643,7 @@ id select_type table type possible_keys key key_len ref rows filtered Extra
|
||||
1 PRIMARY t3 ALL NULL NULL NULL NULL 3 100.00 Using where
|
||||
2 SUBQUERY t2 system NULL NULL NULL NULL 0 0.00 const row not found
|
||||
Warnings:
|
||||
Note 1003 select `test`.`t3`.`a` AS `a` from `test`.`t3` where <not>(<in_optimizer>(`test`.`t3`.`a`,((select max(NULL) from `test`.`t2`) > `test`.`t3`.`a`)))
|
||||
Note 1003 select `test`.`t3`.`a` AS `a` from `test`.`t3` where <not>(<in_optimizer>(`test`.`t3`.`a`,((select max(NULL) from `test`.`t2`) > <cache>(`test`.`t3`.`a`))))
|
||||
select * from t3 where a >= some (select b from t2);
|
||||
a
|
||||
explain extended select * from t3 where a >= some (select b from t2);
|
||||
@ -1651,7 +1651,7 @@ id select_type table type possible_keys key key_len ref rows filtered Extra
|
||||
1 PRIMARY t3 ALL NULL NULL NULL NULL 3 100.00 Using where
|
||||
2 SUBQUERY t2 system NULL NULL NULL NULL 0 0.00 const row not found
|
||||
Warnings:
|
||||
Note 1003 select `test`.`t3`.`a` AS `a` from `test`.`t3` where <nop>(<in_optimizer>(`test`.`t3`.`a`,((select min(NULL) from `test`.`t2`) <= `test`.`t3`.`a`)))
|
||||
Note 1003 select `test`.`t3`.`a` AS `a` from `test`.`t3` where <nop>(<in_optimizer>(`test`.`t3`.`a`,((select min(NULL) from `test`.`t2`) <= <cache>(`test`.`t3`.`a`))))
|
||||
select * from t3 where a >= all (select b from t2 group by 1);
|
||||
a
|
||||
6
|
||||
@ -1662,7 +1662,7 @@ id select_type table type possible_keys key key_len ref rows filtered Extra
|
||||
1 PRIMARY t3 ALL NULL NULL NULL NULL 3 100.00 Using where
|
||||
2 SUBQUERY t2 system NULL NULL NULL NULL 0 0.00 const row not found
|
||||
Warnings:
|
||||
Note 1003 select `test`.`t3`.`a` AS `a` from `test`.`t3` where <not>(<in_optimizer>(`test`.`t3`.`a`,(<max>(select NULL from `test`.`t2` group by 1) > `test`.`t3`.`a`)))
|
||||
Note 1003 select `test`.`t3`.`a` AS `a` from `test`.`t3` where <not>(<in_optimizer>(`test`.`t3`.`a`,(<max>(select NULL from `test`.`t2` group by 1) > <cache>(`test`.`t3`.`a`))))
|
||||
select * from t3 where a >= some (select b from t2 group by 1);
|
||||
a
|
||||
explain extended select * from t3 where a >= some (select b from t2 group by 1);
|
||||
@ -1670,7 +1670,7 @@ id select_type table type possible_keys key key_len ref rows filtered Extra
|
||||
1 PRIMARY t3 ALL NULL NULL NULL NULL 3 100.00 Using where
|
||||
2 SUBQUERY t2 system NULL NULL NULL NULL 0 0.00 const row not found
|
||||
Warnings:
|
||||
Note 1003 select `test`.`t3`.`a` AS `a` from `test`.`t3` where <nop>(<in_optimizer>(`test`.`t3`.`a`,(<min>(select NULL from `test`.`t2` group by 1) <= `test`.`t3`.`a`)))
|
||||
Note 1003 select `test`.`t3`.`a` AS `a` from `test`.`t3` where <nop>(<in_optimizer>(`test`.`t3`.`a`,(<min>(select NULL from `test`.`t2` group by 1) <= <cache>(`test`.`t3`.`a`))))
|
||||
select * from t3 where NULL >= any (select b from t2);
|
||||
a
|
||||
explain extended select * from t3 where NULL >= any (select b from t2);
|
||||
@ -1713,7 +1713,7 @@ id select_type table type possible_keys key key_len ref rows filtered Extra
|
||||
1 PRIMARY t3 ALL NULL NULL NULL NULL 3 100.00 Using where
|
||||
2 SUBQUERY t2 ALL NULL NULL NULL NULL 4 100.00 Using temporary
|
||||
Warnings:
|
||||
Note 1003 select `test`.`t3`.`a` AS `a` from `test`.`t3` where <not>(<in_optimizer>(`test`.`t3`.`a`,(<max>(select max(`test`.`t2`.`b`) from `test`.`t2` group by `test`.`t2`.`a`) >= `test`.`t3`.`a`)))
|
||||
Note 1003 select `test`.`t3`.`a` AS `a` from `test`.`t3` where <not>(<in_optimizer>(`test`.`t3`.`a`,(<max>(select max(`test`.`t2`.`b`) from `test`.`t2` group by `test`.`t2`.`a`) >= <cache>(`test`.`t3`.`a`))))
|
||||
drop table t2, t3;
|
||||
CREATE TABLE `t1` ( `id` mediumint(9) NOT NULL auto_increment, `taskid` bigint(20) NOT NULL default '0', `dbid` int(11) NOT NULL default '0', `create_date` datetime NOT NULL default '0000-00-00 00:00:00', `last_update` datetime NOT NULL default '0000-00-00 00:00:00', PRIMARY KEY (`id`)) ENGINE=MyISAM CHARSET=latin1 AUTO_INCREMENT=3 ;
|
||||
INSERT INTO `t1` (`id`, `taskid`, `dbid`, `create_date`,`last_update`) VALUES (1, 1, 15, '2003-09-29 10:31:36', '2003-09-29 10:31:36'), (2, 1, 21, now(), now());
|
||||
|
@ -276,7 +276,7 @@ id select_type table type possible_keys key key_len ref rows filtered Extra
|
||||
1 PRIMARY t3 ALL NULL NULL NULL NULL 3 100.00 Using where
|
||||
2 SUBQUERY t2 ALL NULL NULL NULL NULL 3 100.00
|
||||
Warnings:
|
||||
Note 1003 select `test`.`t3`.`a` AS `a` from `test`.`t3` where <nop>(<in_optimizer>(`test`.`t3`.`a`,((select min(`test`.`t2`.`b`) from `test`.`t2`) <= `test`.`t3`.`a`)))
|
||||
Note 1003 select `test`.`t3`.`a` AS `a` from `test`.`t3` where <nop>(<in_optimizer>(`test`.`t3`.`a`,((select min(`test`.`t2`.`b`) from `test`.`t2`) <= <cache>(`test`.`t3`.`a`))))
|
||||
select * from t3 where a >= all (select b from t2);
|
||||
a
|
||||
7
|
||||
@ -1640,7 +1640,7 @@ id select_type table type possible_keys key key_len ref rows filtered Extra
|
||||
1 PRIMARY t3 ALL NULL NULL NULL NULL 3 100.00 Using where
|
||||
2 SUBQUERY t2 system NULL NULL NULL NULL 0 0.00 const row not found
|
||||
Warnings:
|
||||
Note 1003 select `test`.`t3`.`a` AS `a` from `test`.`t3` where <not>(<in_optimizer>(`test`.`t3`.`a`,((select max(NULL) from `test`.`t2`) > `test`.`t3`.`a`)))
|
||||
Note 1003 select `test`.`t3`.`a` AS `a` from `test`.`t3` where <not>(<in_optimizer>(`test`.`t3`.`a`,((select max(NULL) from `test`.`t2`) > <cache>(`test`.`t3`.`a`))))
|
||||
select * from t3 where a >= some (select b from t2);
|
||||
a
|
||||
explain extended select * from t3 where a >= some (select b from t2);
|
||||
@ -1648,7 +1648,7 @@ id select_type table type possible_keys key key_len ref rows filtered Extra
|
||||
1 PRIMARY t3 ALL NULL NULL NULL NULL 3 100.00 Using where
|
||||
2 SUBQUERY t2 system NULL NULL NULL NULL 0 0.00 const row not found
|
||||
Warnings:
|
||||
Note 1003 select `test`.`t3`.`a` AS `a` from `test`.`t3` where <nop>(<in_optimizer>(`test`.`t3`.`a`,((select min(NULL) from `test`.`t2`) <= `test`.`t3`.`a`)))
|
||||
Note 1003 select `test`.`t3`.`a` AS `a` from `test`.`t3` where <nop>(<in_optimizer>(`test`.`t3`.`a`,((select min(NULL) from `test`.`t2`) <= <cache>(`test`.`t3`.`a`))))
|
||||
select * from t3 where a >= all (select b from t2 group by 1);
|
||||
a
|
||||
6
|
||||
@ -1659,7 +1659,7 @@ id select_type table type possible_keys key key_len ref rows filtered Extra
|
||||
1 PRIMARY t3 ALL NULL NULL NULL NULL 3 100.00 Using where
|
||||
2 SUBQUERY t2 system NULL NULL NULL NULL 0 0.00 const row not found
|
||||
Warnings:
|
||||
Note 1003 select `test`.`t3`.`a` AS `a` from `test`.`t3` where <not>(<in_optimizer>(`test`.`t3`.`a`,(<max>(select NULL from `test`.`t2` group by 1) > `test`.`t3`.`a`)))
|
||||
Note 1003 select `test`.`t3`.`a` AS `a` from `test`.`t3` where <not>(<in_optimizer>(`test`.`t3`.`a`,(<max>(select NULL from `test`.`t2` group by 1) > <cache>(`test`.`t3`.`a`))))
|
||||
select * from t3 where a >= some (select b from t2 group by 1);
|
||||
a
|
||||
explain extended select * from t3 where a >= some (select b from t2 group by 1);
|
||||
@ -1667,7 +1667,7 @@ id select_type table type possible_keys key key_len ref rows filtered Extra
|
||||
1 PRIMARY t3 ALL NULL NULL NULL NULL 3 100.00 Using where
|
||||
2 SUBQUERY t2 system NULL NULL NULL NULL 0 0.00 const row not found
|
||||
Warnings:
|
||||
Note 1003 select `test`.`t3`.`a` AS `a` from `test`.`t3` where <nop>(<in_optimizer>(`test`.`t3`.`a`,(<min>(select NULL from `test`.`t2` group by 1) <= `test`.`t3`.`a`)))
|
||||
Note 1003 select `test`.`t3`.`a` AS `a` from `test`.`t3` where <nop>(<in_optimizer>(`test`.`t3`.`a`,(<min>(select NULL from `test`.`t2` group by 1) <= <cache>(`test`.`t3`.`a`))))
|
||||
select * from t3 where NULL >= any (select b from t2);
|
||||
a
|
||||
explain extended select * from t3 where NULL >= any (select b from t2);
|
||||
@ -1710,7 +1710,7 @@ id select_type table type possible_keys key key_len ref rows filtered Extra
|
||||
1 PRIMARY t3 ALL NULL NULL NULL NULL 3 100.00 Using where
|
||||
2 SUBQUERY t2 ALL NULL NULL NULL NULL 4 100.00 Using temporary
|
||||
Warnings:
|
||||
Note 1003 select `test`.`t3`.`a` AS `a` from `test`.`t3` where <not>(<in_optimizer>(`test`.`t3`.`a`,(<max>(select max(`test`.`t2`.`b`) from `test`.`t2` group by `test`.`t2`.`a`) >= `test`.`t3`.`a`)))
|
||||
Note 1003 select `test`.`t3`.`a` AS `a` from `test`.`t3` where <not>(<in_optimizer>(`test`.`t3`.`a`,(<max>(select max(`test`.`t2`.`b`) from `test`.`t2` group by `test`.`t2`.`a`) >= <cache>(`test`.`t3`.`a`))))
|
||||
drop table t2, t3;
|
||||
CREATE TABLE `t1` ( `id` mediumint(9) NOT NULL auto_increment, `taskid` bigint(20) NOT NULL default '0', `dbid` int(11) NOT NULL default '0', `create_date` datetime NOT NULL default '0000-00-00 00:00:00', `last_update` datetime NOT NULL default '0000-00-00 00:00:00', PRIMARY KEY (`id`)) ENGINE=MyISAM CHARSET=latin1 AUTO_INCREMENT=3 ;
|
||||
INSERT INTO `t1` (`id`, `taskid`, `dbid`, `create_date`,`last_update`) VALUES (1, 1, 15, '2003-09-29 10:31:36', '2003-09-29 10:31:36'), (2, 1, 21, now(), now());
|
||||
|
@ -270,7 +270,7 @@ id select_type table type possible_keys key key_len ref rows filtered Extra
|
||||
1 PRIMARY t3 ALL NULL NULL NULL NULL 3 100.00 Using where
|
||||
2 SUBQUERY t2 ALL NULL NULL NULL NULL 3 100.00
|
||||
Warnings:
|
||||
Note 1003 select `test`.`t3`.`a` AS `a` from `test`.`t3` where <nop>(<in_optimizer>(`test`.`t3`.`a`,((select min(`test`.`t2`.`b`) from `test`.`t2`) <= `test`.`t3`.`a`)))
|
||||
Note 1003 select `test`.`t3`.`a` AS `a` from `test`.`t3` where <nop>(<in_optimizer>(`test`.`t3`.`a`,((select min(`test`.`t2`.`b`) from `test`.`t2`) <= <cache>(`test`.`t3`.`a`))))
|
||||
select * from t3 where a >= all (select b from t2);
|
||||
a
|
||||
7
|
||||
@ -1504,7 +1504,7 @@ id select_type table type possible_keys key key_len ref rows filtered Extra
|
||||
1 PRIMARY t3 ALL NULL NULL NULL NULL 3 100.00 Using where
|
||||
2 SUBQUERY t2 ALL NULL NULL NULL NULL 0 0.00
|
||||
Warnings:
|
||||
Note 1003 select `test`.`t3`.`a` AS `a` from `test`.`t3` where <not>(<in_optimizer>(`test`.`t3`.`a`,((select max(`test`.`t2`.`b`) from `test`.`t2`) > `test`.`t3`.`a`)))
|
||||
Note 1003 select `test`.`t3`.`a` AS `a` from `test`.`t3` where <not>(<in_optimizer>(`test`.`t3`.`a`,((select max(`test`.`t2`.`b`) from `test`.`t2`) > <cache>(`test`.`t3`.`a`))))
|
||||
select * from t3 where a >= some (select b from t2);
|
||||
a
|
||||
explain extended select * from t3 where a >= some (select b from t2);
|
||||
@ -1512,7 +1512,7 @@ id select_type table type possible_keys key key_len ref rows filtered Extra
|
||||
1 PRIMARY t3 ALL NULL NULL NULL NULL 3 100.00 Using where
|
||||
2 SUBQUERY t2 ALL NULL NULL NULL NULL 0 0.00
|
||||
Warnings:
|
||||
Note 1003 select `test`.`t3`.`a` AS `a` from `test`.`t3` where <nop>(<in_optimizer>(`test`.`t3`.`a`,((select min(`test`.`t2`.`b`) from `test`.`t2`) <= `test`.`t3`.`a`)))
|
||||
Note 1003 select `test`.`t3`.`a` AS `a` from `test`.`t3` where <nop>(<in_optimizer>(`test`.`t3`.`a`,((select min(`test`.`t2`.`b`) from `test`.`t2`) <= <cache>(`test`.`t3`.`a`))))
|
||||
select * from t3 where a >= all (select b from t2 group by 1);
|
||||
a
|
||||
6
|
||||
@ -1523,7 +1523,7 @@ id select_type table type possible_keys key key_len ref rows filtered Extra
|
||||
1 PRIMARY t3 ALL NULL NULL NULL NULL 3 100.00 Using where
|
||||
2 SUBQUERY t2 ALL NULL NULL NULL NULL 0 0.00 Using temporary
|
||||
Warnings:
|
||||
Note 1003 select `test`.`t3`.`a` AS `a` from `test`.`t3` where <not>(<in_optimizer>(`test`.`t3`.`a`,(<max>(select `test`.`t2`.`b` from `test`.`t2` group by 1) > `test`.`t3`.`a`)))
|
||||
Note 1003 select `test`.`t3`.`a` AS `a` from `test`.`t3` where <not>(<in_optimizer>(`test`.`t3`.`a`,(<max>(select `test`.`t2`.`b` from `test`.`t2` group by 1) > <cache>(`test`.`t3`.`a`))))
|
||||
select * from t3 where a >= some (select b from t2 group by 1);
|
||||
a
|
||||
explain extended select * from t3 where a >= some (select b from t2 group by 1);
|
||||
@ -1531,7 +1531,7 @@ id select_type table type possible_keys key key_len ref rows filtered Extra
|
||||
1 PRIMARY t3 ALL NULL NULL NULL NULL 3 100.00 Using where
|
||||
2 SUBQUERY t2 ALL NULL NULL NULL NULL 0 0.00 Using temporary
|
||||
Warnings:
|
||||
Note 1003 select `test`.`t3`.`a` AS `a` from `test`.`t3` where <nop>(<in_optimizer>(`test`.`t3`.`a`,(<min>(select `test`.`t2`.`b` from `test`.`t2` group by 1) <= `test`.`t3`.`a`)))
|
||||
Note 1003 select `test`.`t3`.`a` AS `a` from `test`.`t3` where <nop>(<in_optimizer>(`test`.`t3`.`a`,(<min>(select `test`.`t2`.`b` from `test`.`t2` group by 1) <= <cache>(`test`.`t3`.`a`))))
|
||||
select * from t3 where NULL >= any (select b from t2);
|
||||
a
|
||||
explain extended select * from t3 where NULL >= any (select b from t2);
|
||||
@ -1574,7 +1574,7 @@ id select_type table type possible_keys key key_len ref rows filtered Extra
|
||||
1 PRIMARY t3 ALL NULL NULL NULL NULL 3 100.00 Using where
|
||||
2 SUBQUERY t2 ALL NULL NULL NULL NULL 4 100.00 Using temporary
|
||||
Warnings:
|
||||
Note 1003 select `test`.`t3`.`a` AS `a` from `test`.`t3` where <not>(<in_optimizer>(`test`.`t3`.`a`,(<max>(select max(`test`.`t2`.`b`) from `test`.`t2` group by `test`.`t2`.`a`) >= `test`.`t3`.`a`)))
|
||||
Note 1003 select `test`.`t3`.`a` AS `a` from `test`.`t3` where <not>(<in_optimizer>(`test`.`t3`.`a`,(<max>(select max(`test`.`t2`.`b`) from `test`.`t2` group by `test`.`t2`.`a`) >= <cache>(`test`.`t3`.`a`))))
|
||||
drop table t2, t3;
|
||||
CREATE TABLE `t1` ( `id` mediumint(9) NOT NULL auto_increment, `taskid` bigint(20) NOT NULL default '0', `dbid` int(11) NOT NULL default '0', `create_date` datetime NOT NULL default '0000-00-00 00:00:00', `last_update` datetime NOT NULL default '0000-00-00 00:00:00', PRIMARY KEY (`id`)) ENGINE=MyISAM CHARSET=latin1 AUTO_INCREMENT=3 ;
|
||||
INSERT INTO `t1` (`id`, `taskid`, `dbid`, `create_date`,`last_update`) VALUES (1, 1, 15, '2003-09-29 10:31:36', '2003-09-29 10:31:36'), (2, 1, 21, now(), now());
|
||||
|
@ -1221,5 +1221,45 @@ SET @@tmp_table_size=default;
|
||||
|
||||
drop table t1,t2,t3;
|
||||
|
||||
--echo #
|
||||
--echo # BUG#882994: Crash in QUICK_RANGE_SELECT::reset with derived_with_keys
|
||||
--echo #
|
||||
CREATE TABLE t2 (
|
||||
pk varchar(33),
|
||||
col_varchar_key varchar(3) NOT NULL,
|
||||
col_varchar_nokey varchar(52) NOT NULL);
|
||||
|
||||
INSERT INTO t2 VALUES ('NICSpanish','NIC','Spanish'),
|
||||
('NERHausa','NER','Hausa'),('NGAJoruba','NGA','Joruba'),
|
||||
('NIUNiue','NIU','Niue'),('NFKEnglish','NFK','English'),
|
||||
('NORNorwegian','NOR','Norwegian'),('CIVAkan','CIV','Akan'),
|
||||
('OMNArabic','OMN','Arabic'),('PAKPunjabi','PAK','Punjabi'),
|
||||
('PLWPalau','PLW','Palau'),('PANSpanish','PAN','Spanish'),
|
||||
('PNGPapuan Langua','PNG','Papuan Languages'), ('PRYSpanish','PRY','Spanish'),
|
||||
('PERSpanish','PER','Spanish'), ('PCNPitcairnese','PCN','Pitcairnese'),
|
||||
('MNPPhilippene La','MNP','Philippene Langu'),('PRTPortuguese','PRT','Portuguese'),
|
||||
('PRISpanish','PRI','Spanish'),('POLPolish','POL','Polish'),('GNQFang','GNQ','Fang');
|
||||
|
||||
CREATE TABLE t1 ( col_varchar_nokey varchar(52) NOT NULL ) ;
|
||||
INSERT INTO t1 VALUES ('Chinese'),('English'),('French'),('German'),
|
||||
('Italian'),('Japanese'),('Korean'),('Polish'),('Portuguese'),('Spanish'),
|
||||
('Tagalog'),('Vietnamese');
|
||||
CREATE TABLE t3 ( col_varchar_key varchar(52)) ;
|
||||
INSERT INTO t3 VALUES ('United States');
|
||||
|
||||
set @tmp_882994= @@max_heap_table_size;
|
||||
--disable_warnings
|
||||
set max_heap_table_size=1;
|
||||
--enable_warnings
|
||||
|
||||
SELECT *
|
||||
FROM t3 JOIN
|
||||
( SELECT t2.* FROM t1, t2 ) AS alias2
|
||||
ON ( alias2.col_varchar_nokey = t3.col_varchar_key )
|
||||
ORDER BY CONCAT(alias2.col_varchar_nokey);
|
||||
|
||||
set max_heap_table_size= @tmp_882994;
|
||||
drop table t1,t2,t3;
|
||||
|
||||
# The following command must be the last one the file
|
||||
set optimizer_switch=@exit_optimizer_switch;
|
||||
|
@ -1736,5 +1736,33 @@ drop table t1, t2, t3;
|
||||
|
||||
set optimizer_switch=@subselect4_tmp;
|
||||
|
||||
--echo #
|
||||
--echo # LP BUG#833702 Wrong result with nested IN and singlerow subqueries and equality propagation
|
||||
--echo #
|
||||
|
||||
CREATE TABLE t2 (c int , a int, b int);
|
||||
INSERT INTO t2 VALUES (10,7,0);
|
||||
|
||||
CREATE TABLE t3 (a int, b int) ;
|
||||
INSERT INTO t3 VALUES (5,0),(7,0);
|
||||
|
||||
CREATE TABLE t4 (a int);
|
||||
INSERT INTO t4 VALUES (2),(8);
|
||||
|
||||
set @@optimizer_switch='in_to_exists=on,materialization=off,subquery_cache=off';
|
||||
|
||||
SELECT * FROM t2
|
||||
WHERE t2.b IN (SELECT b FROM t3 WHERE t3.a = t2.a AND a < SOME (SELECT * FROM t4))
|
||||
OR ( t2.c > 242 );
|
||||
|
||||
EXPLAIN SELECT * FROM t2
|
||||
WHERE t2.b IN (SELECT t3.b FROM t3 WHERE t3.a < ANY (SELECT t4.a FROM t4) and t3.a = 7);
|
||||
SELECT * FROM t2
|
||||
WHERE t2.b IN (SELECT t3.b FROM t3 WHERE t3.a < ANY (SELECT t4.a FROM t4) and t3.a = 7);
|
||||
|
||||
drop table t2, t3, t4;
|
||||
|
||||
set optimizer_switch=@subselect4_tmp;
|
||||
|
||||
SET optimizer_switch= @@global.optimizer_switch;
|
||||
set @@tmp_table_size= @@global.tmp_table_size;
|
||||
|
@ -1,7 +1,8 @@
|
||||
#
|
||||
# Table elimination (MWL#17) tests that need debug build
|
||||
#
|
||||
--source include/have_debug.inc
|
||||
# In MariaDB 5.3, one can switch table_elimination on/off without debug, too:
|
||||
## --source include/have_debug.inc
|
||||
|
||||
--disable_warnings
|
||||
drop table if exists t1, t2;
|
||||
|
Reference in New Issue
Block a user