Bug #22890 CREATE TABLE in TABLESPACE fails silently without the STORAGE DISK phrase
Submitted: 2 Oct 2006 12:25 Modified: 8 Jan 2007 14:33
Reporter: Roland Bouman Email Updates:
Status: Can't repeat Impact on me:
None 
Category:MySQL Cluster: Disk Data Severity:S3 (Non-critical)
Version: OS:
Assigned to: Martin Skold CPU Architecture:Any

[2 Oct 2006 12:25] Roland Bouman
Description:
Forgetting the STORAGE DISK phrase in a create table statement that does declare a tablespace fails silently

How to repeat:
 create logfile group logfilegroup1 add undofile '/opt/mysql/cluster/logfilegroup1_undofile1.dat' initial_size 10M undo_buffer_size 5M engine ndb;

 create tablespace tablespace3 add datafile '/opt/mysql/cluster/tablespace3_datafile1.dat' use logfile group logfilegroup1 extent_size 5000 initial_size 5000000 engine = ndb;

-- fails silently
create table t (
    id int unsigned not null auto_increment primary key 
,   name varchar(255) 
) 
tablespace tablespace3 
engine ndb
;

mysql> show create table t \G
*************************** 1. row ***************************
       Table: t
Create Table: CREATE TABLE `t` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `name` varchar(255) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=ndbcluster DEFAULT CHARSET=latin1
1 row in set (0.00 sec)

Suggested fix:
Either pretend that the STORAGE DISK clause is implied, or require the clause and fail with an error.
[8 Jan 2007 14:42] Martin Skold
Specifying TABLESPACE for ndb table defaults to STORAGE DISK