Bug #17448 create table like is missing all constraint definitions
| Submitted: | 16 Feb 2006 11:10 | Modified: | 13 May 2010 16:04 |
|---|---|---|---|
| Reporter: | Kristian Koehntopp | Email Updates: | |
| Status: | Verified | Impact on me: | |
| Category: | MySQL Server: InnoDB storage engine | Severity: | S4 (Feature request) |
| Version: | 5.0.18 | OS: | Linux (Linux) |
| Assigned to: | Assigned Account | CPU Architecture: | Any |
[16 Feb 2006 11:10]
Kristian Koehntopp
[16 Feb 2006 11:25]
Kristian Koehntopp
12:21 sbester> Isotopp: "CREATE TABLE ... LIKE does not preserve any DATA
DIRECTORY or INDEX DIRECTORY table options that were specified
for the original table, or any foreign key definitions."
12:22 Isotopp> sbester: ok, downgrade bug to feature request. :)
[16 Feb 2006 11:26]
Kristian Koehntopp
This is now a feature request, although for me personally, a pretty important one. 12:22 Isotopp> sbester: triggers are also not copied. :( 12:23 sbester> Isotopp: you want to sponsor such a feature ? :) 12:23 Isotopp> sponsor as in "make a case that it is useful"? yes. pay for it? no. 12:23 Isotopp> i need create table like all the time, 12:23 Isotopp> together with insert select limit to create test cases. 12:24 Isotopp> this absolutely must work for testing at the site to work. just like mysqldump must work in all cases. 12:24 Valeriy> Isotopp: do you know any other RDBMS that has this feature? 12:24 Isotopp> bugs in these two utilities are directly sabotaging my work. 12:24 Isotopp> Valeriy: no. that's why i am using mysql. 12:25 sbester> seems logical it should work. Else just another partial feature.. 12:25 Isotopp> Valeriy: starting from day one, i have loved the command line editor in mysql, and still do not use any gui tool, and mysqldump --no-data and create table like/insert select.
[16 Feb 2006 11:28]
Valeriy Kravchuk
Thank you for a problem report. According to the manual (http://dev.mysql.com/doc/refman/5.0/en/create-table.html): "CREATE TABLE ... LIKE does not preserve any DATA DIRECTORY or INDEX DIRECTORY table options that were specified for the original table, or any foreign key definitions." So, it is a documented limitation. I'll mark this report as a verified feature request. I hope, this feature ("deep copy" of table's structure) will be eventually added, if it is really needed for customers. Although, I do not know any other RDBMS that supports it directly.
Portions of this website are copyright © 2001, 2002 The PHP Group
Page generated in 0.053 sec. using MySQL 8.4.7-u6-cloud
Timestamp references displayed by the system are UTC.
Content reproduced on this site is the property of the
respective copyright holders.
It is not reviewed in advance
by Oracle and does not necessarily represent the opinion of
Oracle or any other party.