Bug #8704 warn if CREATE ... UNION is used on a non merge table
Submitted: 22 Feb 2005 18:22 Modified: 4 Feb 2009 9:47
Reporter: Martin Friebe (Gold Quality Contributor) (OCA) Email Updates:
Status: Verified Impact on me:
None 
Category:MySQL Server: DDL Severity:S4 (Feature request)
Version:4.1.10, 5.1 OS:Any (*)
Assigned to: CPU Architecture:Any
Tags: qc

[22 Feb 2005 18:22] Martin Friebe
Description:
the UNION clause in create table, is only usefull, if used on a merge table. otherwhise its ingnored.

mysql should issue a warning, if ignoring this.

Also, not sure, but I the documentation does not mention that UNION=(), can be used without "=" too

How to repeat:
create table t1 (a int);
Query OK, 0 rows affected (0.00 sec)

create table mrg (a int) union (t1);
Query OK, 0 rows affected (0.00 sec)

show warnings;
Empty set (0.02 sec)

create table mrgb (a int) union=(t1);
Query OK, 0 rows affected (0.00 sec)

show warnings;
Empty set (0.00 sec)

Suggested fix:
add warning
[4 Feb 2009 9:47] Susanne Ebrecht
Many thanks for writing a feature request.

This also is actual for MySQL 5.1.

Our development will discuss this feature request.