mirror of
https://github.com/MariaDB/server.git
synced 2026-01-06 05:22:24 +03:00
MDEV-430: Server crashes in select_describe on EXPLAIN with materialization+semijoin, etc
- Don't do early cleanup of uncorrelated subqueries if we're running an EXPLAIN.
This commit is contained in:
@@ -5721,5 +5721,19 @@ set global userstat=@tmp_mdev410;
|
||||
|
||||
DROP TABLE t1,t2,t3,t4;
|
||||
|
||||
--echo #
|
||||
--echo # MDEV-430: Server crashes in select_describe on EXPLAIN with
|
||||
--echo # materialization+semijoin, 2 nested subqueries, aggregate functions
|
||||
--echo #
|
||||
CREATE TABLE t1 (a INT, KEY(a));
|
||||
INSERT INTO t1 VALUES (1),(8);
|
||||
|
||||
CREATE TABLE t2 (b INT, KEY(b));
|
||||
INSERT INTO t2 VALUES (45),(17),(20);
|
||||
|
||||
EXPLAIN SELECT * FROM t1 WHERE EXISTS ( SELECT a FROM t1, t2 WHERE b = a GROUP BY a HAVING a <> 1 ) ;
|
||||
|
||||
DROP TABLE t1,t2;
|
||||
|
||||
--echo # return optimizer switch changed in the beginning of this test
|
||||
set optimizer_switch=@subselect_tmp;
|
||||
|
||||
Reference in New Issue
Block a user