diff options
author | Sergei Petrunia <psergey@askmonty.org> | 2017-07-21 19:06:01 +0300 |
---|---|---|
committer | Sergei Petrunia <psergey@askmonty.org> | 2017-07-21 19:06:01 +0300 |
commit | e2afdb1ee430cb9d030aeeedc85eb903cda5e5d1 (patch) | |
tree | 21505ddc494247c7046044b33b2b84159b1adcff | |
parent | 17fc288b3054514f139b32c89c62905d374968e4 (diff) | |
download | mariadb-git-e2afdb1ee430cb9d030aeeedc85eb903cda5e5d1.tar.gz |
MDEV-13344: Server crashes in in AGGR_OP::put_record on subquery
Add a testcase
-rw-r--r-- | mysql-test/r/win.result | 11 | ||||
-rw-r--r-- | mysql-test/t/win.test | 9 |
2 files changed, 20 insertions, 0 deletions
diff --git a/mysql-test/r/win.result b/mysql-test/r/win.result index 862d711bce7..71521e747ab 100644 --- a/mysql-test/r/win.result +++ b/mysql-test/r/win.result @@ -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; diff --git a/mysql-test/t/win.test b/mysql-test/t/win.test index 1db2354a442..be7049af8b4 100644 --- a/mysql-test/t/win.test +++ b/mysql-test/t/win.test @@ -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; |