diff options
author | Sergei Golubchik <sergii@pisem.net> | 2013-12-16 13:02:21 +0100 |
---|---|---|
committer | Sergei Golubchik <sergii@pisem.net> | 2013-12-16 13:02:21 +0100 |
commit | d28d3ba40dc8ebef87199a2567ec96e9c5d744e2 (patch) | |
tree | c6b9ab1d8193fa2a26c5e376d43e536abd3a47ce /mysql-test/t/ps.test | |
parent | ff485d2dc4d5adaf5eef0ccd03ce62adf3bd30b3 (diff) | |
parent | 6bf10fac445d73fb796d4863612c87bff5f28b66 (diff) | |
download | mariadb-git-d28d3ba40dc8ebef87199a2567ec96e9c5d744e2.tar.gz |
10.0-base merge
Diffstat (limited to 'mysql-test/t/ps.test')
-rw-r--r-- | mysql-test/t/ps.test | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/mysql-test/t/ps.test b/mysql-test/t/ps.test index ff28631862c..5f4c815a192 100644 --- a/mysql-test/t/ps.test +++ b/mysql-test/t/ps.test @@ -3572,4 +3572,26 @@ show status like '%Handler_read%'; deallocate prepare st; drop table t1; +--echo # +--echo # Bug mdev-5410: crash at the execution of PS with subselect +--echo # formed by UNION with global ORDER BY +--echo # + +CREATE TABLE t1 (a int DEFAULT NULL); +INSERT INTO t1 VALUES (2), (4); +CREATE TABLE t2 (b int DEFAULT NULL); +INSERT INTO t2 VALUES (1), (3); + +PREPARE stmt FROM " +SELECT c1 FROM (SELECT (SELECT a FROM t1 WHERE t1.a <= t2.b + UNION ALL + SELECT a FROM t1 WHERE t1.a+3<= t2.b + ORDER BY a DESC) AS c1 FROM t2) t3; +"; + +EXECUTE stmt; +EXECUTE stmt; + +DROP TABLE t1,t2; + --echo # End of 5.3 tests |