summaryrefslogtreecommitdiff
path: root/mysql-test
diff options
context:
space:
mode:
authorunknown <serg@serg.mysql.com>2002-03-01 16:58:06 +0000
committerunknown <serg@serg.mysql.com>2002-03-01 16:58:06 +0000
commit19d37eca52460dc4f94a1855d0aa78c3df968838 (patch)
treeed959a0e186a55ad38b0b3e0cc9e022faf8eddb2 /mysql-test
parent43a1ef6ce23e8751236c3948030e6e7b57bd5c45 (diff)
parente4e8b31cfadea201032b2c6b0e129214b62600fc (diff)
downloadmariadb-git-19d37eca52460dc4f94a1855d0aa78c3df968838.tar.gz
Merge work:/home/bk/mysql-4.0
into serg.mysql.com:/usr/home/serg/Abk/mysql-4.0 Docs/manual.texi: Auto merged sql/sql_select.cc: Auto merged
Diffstat (limited to 'mysql-test')
-rw-r--r--mysql-test/r/union.result15
-rw-r--r--mysql-test/t/union.test6
2 files changed, 21 insertions, 0 deletions
diff --git a/mysql-test/r/union.result b/mysql-test/r/union.result
index 6a27df648b5..e842bb3b447 100644
--- a/mysql-test/r/union.result
+++ b/mysql-test/r/union.result
@@ -86,6 +86,21 @@ explain select a,b from t1 union all select a,b from t2;
table type possible_keys key key_len ref rows Extra
t1 ALL NULL NULL NULL NULL 4
t2 ALL NULL NULL NULL NULL 4
+explain select xx from t1 union select 1;
+Unknown column 'xx' in 'field list'
+explain select a,b from t1 union select 1;
+table type possible_keys key key_len ref rows Extra
+t1 ALL NULL NULL NULL NULL 4
+ 0 0 No tables used
+explain select 1 union select a,b from t1 union select 1;
+table type possible_keys key key_len ref rows Extra
+ 0 0 No tables used
+t1 ALL NULL NULL NULL NULL 4
+ 0 0 No tables used
+explain select a,b from t1 union select 1 limit 0;
+table type possible_keys key key_len ref rows Extra
+t1 ALL NULL NULL NULL NULL 4
+ 0 0 Impossible WHERE
select a,b from t1 into outfile 'skr' union select a,b from t2;
Wrong usage of UNION and INTO
select a,b from t1 order by a union select a,b from t2;
diff --git a/mysql-test/t/union.test b/mysql-test/t/union.test
index 8d98e6e0389..f782c61d97a 100644
--- a/mysql-test/t/union.test
+++ b/mysql-test/t/union.test
@@ -24,6 +24,12 @@ select 't1',b,count(*) from t1 group by b UNION select 't2',b,count(*) from t2 g
# Test some error conditions with UNION
explain select a,b from t1 union all select a,b from t2;
+--error 1054
+explain select xx from t1 union select 1;
+explain select a,b from t1 union select 1;
+explain select 1 union select a,b from t1 union select 1;
+explain select a,b from t1 union select 1 limit 0;
+
--error 1221
select a,b from t1 into outfile 'skr' union select a,b from t2;