Commit e2afdb1e authored by Sergei Petrunia's avatar Sergei Petrunia

MDEV-13344: Server crashes in in AGGR_OP::put_record on subquery

Add a testcase
parent 17fc288b
......@@ -3149,3 +3149,14 @@ ROW_NUMBER() OVER() i
SELECT ROW_NUMBER() OVER(), i FROM t1 WHERE 0;
ROW_NUMBER() OVER() i
DROP TABLE t1;
#
# MDEV-13344: Server crashes in in AGGR_OP::put_record on subquery
# with window function and constant table
# (Testcase only)
#
CREATE TABLE t1 (c CHAR(8)) ENGINE=MyISAM;
INSERT IGNORE INTO t1 VALUES ('foo');
SELECT ('bar',1) IN ( SELECT c, ROW_NUMBER() OVER (PARTITION BY c) FROM t1);
('bar',1) IN ( SELECT c, ROW_NUMBER() OVER (PARTITION BY c) FROM t1)
0
DROP TABLE t1;
......@@ -1933,4 +1933,13 @@ SELECT DISTINCT ROW_NUMBER() OVER(), i FROM t1 WHERE 0;
SELECT ROW_NUMBER() OVER(), i FROM t1 WHERE 0;
DROP TABLE t1;
--echo #
--echo # MDEV-13344: Server crashes in in AGGR_OP::put_record on subquery
--echo # with window function and constant table
--echo # (Testcase only)
--echo #
CREATE TABLE t1 (c CHAR(8)) ENGINE=MyISAM;
INSERT IGNORE INTO t1 VALUES ('foo');
SELECT ('bar',1) IN ( SELECT c, ROW_NUMBER() OVER (PARTITION BY c) FROM t1);
DROP TABLE t1;
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment