diff options
author | He Zhenxing <hezx@mysql.com> | 2008-08-14 17:38:22 +0800 |
---|---|---|
committer | He Zhenxing <hezx@mysql.com> | 2008-08-14 17:38:22 +0800 |
commit | 113deaec30e0e555da507ecea96bcf5fead75e68 (patch) | |
tree | 31a73acd88f94657202f99602c9de4d9364a589f /mysql-test/t/subselect.test | |
parent | 93d835213e1c5bb6bad455ef6a4877a960e638f3 (diff) | |
parent | 193a8f973598d573ab8cc633f143fd1dfa4195bf (diff) | |
download | mariadb-git-113deaec30e0e555da507ecea96bcf5fead75e68.tar.gz |
Merge 5.1-rpl-testfixes -> 5.1-rpl
Diffstat (limited to 'mysql-test/t/subselect.test')
-rw-r--r-- | mysql-test/t/subselect.test | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/mysql-test/t/subselect.test b/mysql-test/t/subselect.test index 7522de6ff0c..a9a5ef6fdae 100644 --- a/mysql-test/t/subselect.test +++ b/mysql-test/t/subselect.test @@ -3300,4 +3300,16 @@ SELECT * FROM t2 WHERE b NOT IN (SELECT max(t.c) FROM t1, t1 t WHERE t.c>10); DROP TABLE t1,t2; ---echo End of 5.0 tests. +# +# Bug #38191: Server crash with subquery containing DISTINCT and ORDER BY +# + +CREATE TABLE t1(pk int PRIMARY KEY, a int, INDEX idx(a)); +INSERT INTO t1 VALUES (1, 10), (3, 30), (2, 20); +CREATE TABLE t2(pk int PRIMARY KEY, a int, b int, INDEX idxa(a)); +INSERT INTO t2 VALUES (2, 20, 700), (1, 10, 200), (4, 10, 100); +SELECT * FROM t1 + WHERE EXISTS (SELECT DISTINCT a FROM t2 WHERE t1.a < t2.a ORDER BY b); +DROP TABLE t1,t2; + +--echo End of 5.1 tests. |