diff options
Diffstat (limited to 'mysql-test/r/ps.result')
-rw-r--r-- | mysql-test/r/ps.result | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/mysql-test/r/ps.result b/mysql-test/r/ps.result index 50fb5e1e55b..bfec91192a9 100644 --- a/mysql-test/r/ps.result +++ b/mysql-test/r/ps.result @@ -3996,4 +3996,27 @@ Handler_read_rnd_deleted 0 Handler_read_rnd_next 0 deallocate prepare st; drop table t1; +# +# Bug mdev-5410: crash at the execution of PS with subselect +# formed by UNION with global ORDER BY +# +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; +c1 +NULL +2 +EXECUTE stmt; +c1 +NULL +2 +DROP TABLE t1,t2; # End of 5.3 tests |