mirror of
https://github.com/MariaDB/server.git
synced 2026-05-16 03:47:17 +02:00
BUG#906385: EXPLAIN EXTENDED crashes in TABLE_LIST::print with limited max_join_size
- Take into account that subquery's optimization can fail because of @@max_join_size error.
This commit is contained in:
parent
be3e52984f
commit
15ea7238e4
3 changed files with 61 additions and 1 deletions
|
|
@ -8,3 +8,32 @@ set optimizer_switch='mrr=on,mrr_sort_keys=on,index_condition_pushdown=on';
|
|||
|
||||
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;
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue