summaryrefslogtreecommitdiff
path: root/mysql-test/t/union.test
diff options
context:
space:
mode:
authorunknown <bell@sanja.is.com.ua>2004-05-06 20:40:21 +0300
committerunknown <bell@sanja.is.com.ua>2004-05-06 20:40:21 +0300
commit1a4f499ca87634d4256d2531bab68b32f3e5fa49 (patch)
tree0daaf7c780326e902f4ac6b9107be15ccc5ae28a /mysql-test/t/union.test
parentcd57fc8bdabbd3b1b44fa98ae1c3bc7c66fcd08c (diff)
downloadmariadb-git-1a4f499ca87634d4256d2531bab68b32f3e5fa49.tar.gz
EXPLAIN UNION using same routing which used for execution which allow return correct bug messages (Bug #3639)
EXPLAIN of hidden SELECT of UNION mysql-test/r/derived.result: explain of hidden select mysql-test/r/subselect.result: explain of hidden select mysql-test/r/union.result: explain of hidden select correct error messages on explain mysql-test/t/subselect.test: show eliminated costants in WHERE clause mysql-test/t/union.test: correct error messages on EXPLAIN with union sql/item.cc: fixed name constructing for global ORDER BY items sql/sql_class.h: select ID can be negative (for hidden SELECTs) removed unused field sql/sql_lex.cc: new flag of UNION EXPLAIN sql/sql_lex.h: new flag of UNION EXPLAIN select ID can be negative (for hidden SELECTs) sql/sql_select.cc: EXPLAIN UNION using same routing which used for execution explain for hidden SELECT of UNION sql/sql_union.cc: EXPLAIN UNION using same routing which used for execution
Diffstat (limited to 'mysql-test/t/union.test')
-rw-r--r--mysql-test/t/union.test12
1 files changed, 12 insertions, 0 deletions
diff --git a/mysql-test/t/union.test b/mysql-test/t/union.test
index d9e19571f81..f6006a87d47 100644
--- a/mysql-test/t/union.test
+++ b/mysql-test/t/union.test
@@ -39,8 +39,11 @@ explain select a,b from t1 union all select a,b from t2;
--error 1054
explain select xx from t1 union select 1;
+--error 1222
explain select a,b from t1 union select 1;
+--error 1222
explain select 1 union select a,b from t1 union select 1;
+--error 1222
explain select a,b from t1 union select 1 limit 0;
--error 1221
@@ -515,3 +518,12 @@ SET SQL_SELECT_LIMIT=1;
select a from t1 union select a from t2 order by a;
drop table t1, t2;
set sql_select_limit=default;
+
+#
+# nonexisting column in global ORDER BY
+#
+CREATE TABLE t1 (i int(11) default NULL,c char(1) default NULL,KEY i (i));
+CREATE TABLE t2 (i int(11) default NULL,c char(1) default NULL,KEY i (i));
+--error 1054
+explain (select * from t1) union (select * from t2) order by not_existing_column;
+drop table t1, t2;