1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-30 16:24:05 +03:00

MDEV-13351: Server crashes in st_select_lex::set_explain_type upon UNION with window function

Make st_select_lex::set_explain_type() take into account that JOIN_TABs
it is traversing may be also post-join aggregation JOIN_TABs (which
have pos_in_table_list=NULL, etc).
This commit is contained in:
Sergei Petrunia
2017-07-21 20:09:19 +03:00
parent e2afdb1ee4
commit 2a1035b004
3 changed files with 33 additions and 3 deletions

View File

@ -1943,3 +1943,14 @@ INSERT IGNORE INTO t1 VALUES ('foo');
SELECT ('bar',1) IN ( SELECT c, ROW_NUMBER() OVER (PARTITION BY c) FROM t1);
DROP TABLE t1;
--echo #
--echo # MDEV-13351: Server crashes in st_select_lex::set_explain_type upon UNION with window function
--echo #
CREATE TABLE t1 (i INT);
INSERT INTO t1 VALUES (1),(2);
SELECT Nth_value(i,1) OVER() FROM t1
UNION ALL
( SELECT Nth_value(i,2) OVER() FROM t1 LIMIT 0 )
;
DROP TABLE t1;