1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-30 16:24:05 +03:00

New alternate UNION syntax and bug fix for multi-table deletes

mysql-test/r/union.result:
  New results for optional UNION syntax
mysql-test/t/union.test:
  New  test for alternate syntax for UNION
sql/sql_delete.cc:
  Fixed bug in multi-table delete's with transactional tables
sql/sql_parse.cc:
  A small change to enable new UNION syntax
sql/sql_union.cc:
  New alternate UNION syntax
sql/sql_yacc.yy:
  New alternate UNION syntax
This commit is contained in:
unknown
2001-10-25 14:41:49 +03:00
parent f9b331ff8a
commit 1c90833606
6 changed files with 42 additions and 44 deletions

View File

@ -68,6 +68,12 @@ t2 c 1
t2 d 1
t2 e 1
t2 f 1
(select a,b from t1 limit 2) union all (select a,b from t2 order by a) limit 4;
a b
1 a
2 b
3 c
4 d
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

View File

@ -16,6 +16,9 @@ select 0,'#' union select a,b from t1 union all select a,b from t2 union select
select a,b from t1 union select a,b from t1;
select 't1',b,count(*) from t1 group by b UNION select 't2',b,count(*) from t2 group by b;
#test alternate syntax for unions
(select a,b from t1 limit 2) union all (select a,b from t2 order by a) limit 4;
# Test some error conditions with UNION
explain select a,b from t1 union all select a,b from t2;