diff options
author | Igor Babaev <igor@askmonty.org> | 2011-06-24 21:18:20 -0700 |
---|---|---|
committer | Igor Babaev <igor@askmonty.org> | 2011-06-24 21:18:20 -0700 |
commit | c68020210fa7f9ab41ba35108a109640f0b50eb5 (patch) | |
tree | 8da3aa7e027d30d32937071f162c76780101d21e /mysql-test/t/derived.test | |
parent | 37bac085da110a42b1d7dc3ced5e555070cb8c36 (diff) | |
download | mariadb-git-c68020210fa7f9ab41ba35108a109640f0b50eb5.tar.gz |
Added test cases for LP bug #798625 and LP bug #800085
fixed by the patch for LP bug 798621.
Diffstat (limited to 'mysql-test/t/derived.test')
-rw-r--r-- | mysql-test/t/derived.test | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/mysql-test/t/derived.test b/mysql-test/t/derived.test index b989bfbcf24..3cf8bd92512 100644 --- a/mysql-test/t/derived.test +++ b/mysql-test/t/derived.test @@ -369,3 +369,19 @@ SELECT * FROM v1, t1 WHERE v1.b=t1.a ORDER BY v1.a; DROP VIEW v1; DROP TABLE t1,t2; + +--echo # +--echo # LP bug #800085: crash with a query using a simple derived table +--echo # (fixed by the patch for bug 798621) +--echo # + +CREATE TABLE t1 (f1 int, f2 varchar(32)) ; +INSERT INTO t1 VALUES (NULL,'j'), (8,'c'); + +CREATE TABLE t2 (f1 int); +INSERT INTO t2 VALUES (1), (5); + +SELECT DISTINCT t.f1 FROM (SELECT * FROM t1) AS t, t2 + WHERE t.f2='s' AND t.f2 LIKE '%a%' OR t.f1<>0 ORDER BY t.f2; + +DROP TABLE t1, t2; |