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:
@ -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;
|
||||
|
||||
|
Reference in New Issue
Block a user