I had the interesting customer case today which made me to do a bit research on the problem.
You can create merge table over MyISAM tables which contain primary key and global uniqueness would not be enforced in this case, this is as far as most people will think about it. In fact however it is worse than that - if you have same key values in underlying base tables some of the queries may give you wrong results:
PLAIN TEXT SQL:
- mysql> CREATE TABLE t1(id int UNSIGNED PRIMARY KEY);
- Query OK, 0 rows affected (0.07 sec)
- mysql> CREATE TABLE t2(id int UNSIGNED PRIMARY KEY);
- Query OK, 0 rows affected (0.02 sec)
- mysql> CREATE TABLE tm(id int UNSIGNED NOT NULL PRIMARY KEY) type=merge union(t1,t2);
- Query OK, 0 rows affected, 1 warning (0.03 sec)
- mysql> INSERT INTO t1 …