Bug #16466 DD: SHOW CREATE TABLE does not show TABLESPACE table_space1 STORAGE DISK
Submitted: 12 Jan 2006 22:49 Modified: 1 Feb 2006 12:23
Reporter: Jonathan Miller Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Cluster: Cluster (NDB) storage engine Severity:S2 (Serious)
Version:5.1.6-alpha OS:Linux (Linux)
Assigned to: Tomas Ulin CPU Architecture:Any

[12 Jan 2006 22:49] Jonathan Miller
Description:
If you do a SHOW CREATE TABLE after creating a Disk Data Cluster table, the table space is not shown. This may also be an issue when using MySQL DUMP.

How to repeat:
+ CREATE LOGFILE GROUP log_group1
+ ADD UNDOFILE './log_group1/undofile.dat'
+ INITIAL_SIZE 16M
+ UNDO_BUFFER_SIZE = 1M
+ ENGINE=NDB;
+ CREATE TABLESPACE table_space1
+ ADD DATAFILE './table_space1/datafile.dat'
+ USE LOGFILE GROUP log_group1
+ INITIAL_SIZE 12M
+ ENGINE NDB;
+ CREATE TABLE test.t1
+ (pk1 INT NOT NULL PRIMARY KEY, b INT NOT NULL, c INT NOT NULL)
+ TABLESPACE table_space1 STORAGE DISK
+ ENGINE=NDB;
+ CREATE TABLE test.t2
+ (pk2 INT NOT NULL PRIMARY KEY, b2 INT NOT NULL, c2 INT NOT NULL)
+ ENGINE=NDB;
 SHOW CREATE TABLE test.t2;
+ Table Create Table
+ t2    CREATE TABLE `t2` (
+   `pk2` int(11) NOT NULL,
+   `b2` int(11) NOT NULL,
+   `c2` int(11) NOT NULL,
+   PRIMARY KEY  (`pk2`)
+ ) ENGINE=NDBCLUSTER DEFAULT CHARSET=latin1
+ SHOW CREATE TABLE test.t1;
+ Table Create Table
+ t1    CREATE TABLE `t1` (
+   `pk1` int(11) NOT NULL,
+   `b` int(11) NOT NULL,
+   `c` int(11) NOT NULL,
+   PRIMARY KEY  (`pk1`)
+ ) ENGINE=NDBCLUSTER DEFAULT CHARSET=latin1
+ ALTER TABLE test.t2 TABLESPACE table_space1 STORAGE DISK
+ ENGINE=NDB;
+ SHOW CREATE TABLE test.t2;
+ Table Create Table
+ t2    CREATE TABLE `t2` (
+   `pk2` int(11) NOT NULL,
+   `b2` int(11) NOT NULL,
+   `c2` int(11) NOT NULL,
+   PRIMARY KEY  (`pk2`)
+ ) ENGINE=NDBCLUSTER DEFAULT CHARSET=latin1
+ ALTER TABLE test.t1 ENGINE=NDBCLUSTER;
+ SHOW CREATE TABLE test.t1;
+ Table Create Table
+ t1    CREATE TABLE `t1` (
+   `pk1` int(11) NOT NULL,
+   `b` int(11) NOT NULL,
+   `c` int(11) NOT NULL,
+   PRIMARY KEY  (`pk1`)
+ ) ENGINE=NDBCLUSTER DEFAULT CHARSET=latin1
+

Suggested fix:
SHOW CREATE TABLE should show the same exact syntax used to create the table.
[26 Jan 2006 11:38] Jonathan Miller
I disagree with the priority change. If you are going to change priority, you need to add note stating why.
[31 Jan 2006 16:51] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/commits/1953
[1 Feb 2006 10:07] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/commits/1989
[1 Feb 2006 10:18] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/commits/1990
[1 Feb 2006 12:23] Tomas Ulin
pushed in 5.1.6 so no need to document