mirror of
https://github.com/MariaDB/server.git
synced 2025-01-19 13:32:33 +01:00
15ea7238e4
- Take into account that subquery's optimization can fail because of @@max_join_size error.
39 lines
910 B
Text
39 lines
910 B
Text
#
|
|
# Run subselect_sj2.test with subquery materialization.
|
|
#
|
|
set optimizer_switch='materialization=on';
|
|
set optimizer_switch='mrr=on,mrr_sort_keys=on,index_condition_pushdown=on';
|
|
|
|
--source t/subselect_sj2.test
|
|
|
|
set optimizer_switch=default;
|
|
select @@optimizer_switch like '%materialization=on%';
|
|
|
|
--echo #
|
|
--echo # BUG#906385: EXPLAIN EXTENDED crashes in TABLE_LIST::print with limited max_join_size
|
|
--echo #
|
|
CREATE TABLE t1 ( a INT );
|
|
CREATE TABLE t2 ( b INT );
|
|
|
|
INSERT INTO t1 VALUES (1),(2);
|
|
INSERT INTO t2 VALUES
|
|
(1),(2),(3),(4),(5),
|
|
(6),(7),(8),(9),(10),
|
|
(11),(12),(13),(14),(15),
|
|
(16),(17),(18),(19),(20);
|
|
|
|
set @tmp_906385=@@max_join_size;
|
|
SET max_join_size = 80;
|
|
|
|
--error ER_TOO_BIG_SELECT
|
|
EXPLAIN EXTENDED
|
|
SELECT COUNT(*) FROM t1
|
|
WHERE a IN
|
|
( SELECT b FROM t2 GROUP BY b )
|
|
AND ( 6 ) IN
|
|
( SELECT MIN( t2.b ) FROM t2 alias1, t2 );
|
|
|
|
DROP TABLE t1, t2;
|
|
set max_join_size= @tmp_906385;
|
|
|
|
|