diff options
author | gkodinov/kgeorge@rakia.(none) <> | 2006-09-04 11:34:32 +0300 |
---|---|---|
committer | gkodinov/kgeorge@rakia.(none) <> | 2006-09-04 11:34:32 +0300 |
commit | 43e05210c59c3709b34f876fa8ce88021839a13f (patch) | |
tree | ddbc728738e99e95c9174e5e95d60942492bf683 /mysql-test/t/subselect.test | |
parent | 55163a36f08558856000a72825356be228f58685 (diff) | |
parent | e5bc4c7e779e81fe089e33a6207c907860f4b60d (diff) | |
download | mariadb-git-43e05210c59c3709b34f876fa8ce88021839a13f.tar.gz |
Merge gkodinov@bk-internal.mysql.com:/home/bk/mysql-5.0-opt
into rakia.(none):/home/kgeorge/mysql/autopush/B14654-5.0-opt
Diffstat (limited to 'mysql-test/t/subselect.test')
-rw-r--r-- | mysql-test/t/subselect.test | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/mysql-test/t/subselect.test b/mysql-test/t/subselect.test index ed122e9ff5a..740cb08c5bd 100644 --- a/mysql-test/t/subselect.test +++ b/mysql-test/t/subselect.test @@ -2280,3 +2280,29 @@ SELECT * FROM t1,t2 ORDER BY t1.t DESC LIMIT 1); DROP TABLE t1, t2; + +# +# Bug#14654 : Cannot select from the same table twice within a UNION +# statement +# +CREATE TABLE t1 (i INT); + +(SELECT i FROM t1) UNION (SELECT i FROM t1); +SELECT sql_no_cache * FROM t1 WHERE NOT EXISTS + ( + (SELECT i FROM t1) UNION + (SELECT i FROM t1) + ); + +SELECT * FROM t1 +WHERE NOT EXISTS (((SELECT i FROM t1) UNION (SELECT i FROM t1))); + +#TODO:not supported +--error 1064 +explain select ((select t11.i from t1 t11) union (select t12.i from t1 t12)) + from t1; +#supported +explain select * from t1 where not exists + ((select t11.i from t1 t11) union (select t12.i from t1 t12)); + +DROP TABLE t1; |