Bug #16994 CREATE TABLE for MERGE should logically allow LIKE tablename
Submitted: 1 Feb 2006 4:19
Reporter: David Nugent Email Updates:
Status: Open Impact on me:
None 
Category:MySQL Server Severity:S4 (Feature request)
Version:5 OS:FreeBSD (FreeBSD 6.0)
Assigned to: CPU Architecture:Any

[1 Feb 2006 4:19] David Nugent
Description:
Currently the syntax for CREATE TABLE does not allow "LIKE othertablename" in the ENGINE=MERGE case.

How to repeat:
N/A

Suggested fix:
Given the usual and expected use of a MERGE table (which must be defined in an identical manner to all of its underlying myisam tables), it would be a major convenience if:

a) CREATE TABLE can be used without specifying fields (since the definition is redundant anyway), e.g.

CREATE TABLE A ENGINE=MERGE UNION=(B,C);

b) "LIKE table" syntax could work around the redundancy, e.g.

CREATE TABLE A [(] LIKE B [)] ENGINE=MERGE UNION(B,C);

Allowing ENGINE= spec in any case where LIKE is used would be useful, and would save a subsequent ALTER statement if you use template tables of a different type.