CREATE LOGFILE GROUP lg1 ADD UNDOFILE 'lg1_undofile.dat' INITIAL_SIZE 1M UNDO_BUFFER_SIZE = 1M ENGINE=NDB; CREATE TABLESPACE ts1 ADD DATAFILE 'ts1_datafile.dat' USE LOGFILE GROUP lg1 INITIAL_SIZE 8M EXTENT_SIZE 256k ENGINE NDB; # # Check that tablespace are still used by table after altering # a table so that no columns are on disk # # Create table with tablespace and one column stored on disk CREATE TABLE t1( a INT STORAGE DISK ) TABLESPACE ts1 ENGINE NDB; # Change the storage of the column from disk to memory ALTER TABLE t1 CHANGE COLUMN a a INT STORAGE MEMORY; DROP TABLE t1; # Check that it's not possible to create table with storage disk # without tablespace(i.e tablespace is required) CREATE TABLE t1( a INT STORAGE DISK ) STORAGE DISK ENGINE NDB; ERROR HY000: Can't create table 't1' SHOW WARNINGS; Level Code Message Warning 3014 TABLESPACE option must be specified when using STORAGE DISK Error 1005 Can't create table 't1' ALTER TABLESPACE ts1 DROP DATAFILE 'ts1_datafile.dat'; DROP TABLESPACE ts1; DROP LOGFILE GROUP lg1 ENGINE=NDB;