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.
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.