DROP TABLE IF EXISTS test.t1;
DROP TABLE IF EXISTS test.t2;
**** Test Setup Section ****
CREATE LOGFILE GROUP lg
ADD UNDOFILE './lg_group/undofile.dat'
 INITIAL_SIZE 16M
UNDO_BUFFER_SIZE = 1M
ENGINE=NDB;
CREATE TABLESPACE ts
ADD DATAFILE './table_space/datafile.dat'
 USE LOGFILE GROUP lg
INITIAL_SIZE 12M
ENGINE NDB;
CREATE TABLE test.t1 (
a1 smallint NOT NULL,
a2 int NOT NULL,
a3 bigint NOT NULL,
a4 char(10),
a5 decimal(5,1),
a6 time,
a7 date,
a8 datetime,
a9 VARCHAR(255),
a10 blob,
PRIMARY KEY(a1)
) ENGINE=InnoDB;
SHOW CREATE TABLE test.t1;
Table	Create Table
t1	CREATE TABLE `t1` (
  `a1` smallint(6) NOT NULL,
  `a2` int(11) NOT NULL,
  `a3` bigint(20) NOT NULL,
  `a4` char(10) DEFAULT NULL,
  `a5` decimal(5,1) DEFAULT NULL,
  `a6` time DEFAULT NULL,
  `a7` date DEFAULT NULL,
  `a8` datetime DEFAULT NULL,
  `a9` varchar(255) DEFAULT NULL,
  `a10` blob,
  PRIMARY KEY (`a1`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1
SELECT * FROM test.t1 ORDER BY a1;
a1	a2	a3	a4	a5	a6	a7	a8	a9	a10
1	2	2000000001	aaa1	34.2	04:03:02	2006-01-01	1971-05-28 16:55:03	bbbbbbbbbbbbb1	binary data
2	3	2000000002	aaa2	34.2	04:03:02	2006-01-01	1971-05-28 16:55:03	bbbbbbbbbbbbb2	binary data
3	4	2000000003	aaa3	34.2	04:03:02	2006-01-01	1971-05-28 16:55:03	bbbbbbbbbbbbb3	binary data
4	5	2000000004	aaa4	34.2	04:03:02	2006-01-01	1971-05-28 16:55:03	bbbbbbbbbbbbb4	binary data
5	6	2000000005	aaa5	34.2	04:03:02	2006-01-01	1971-05-28 16:55:03	bbbbbbbbbbbbb5	binary data
6	7	2000000006	aaa6	34.2	04:03:02	2006-01-01	1971-05-28 16:55:03	bbbbbbbbbbbbb6	binary data
7	8	2000000007	aaa7	34.2	04:03:02	2006-01-01	1971-05-28 16:55:03	bbbbbbbbbbbbb7	binary data
8	9	2000000008	aaa8	34.2	04:03:02	2006-01-01	1971-05-28 16:55:03	bbbbbbbbbbbbb8	binary data
9	10	2000000009	aaa9	34.2	04:03:02	2006-01-01	1971-05-28 16:55:03	bbbbbbbbbbbbb9	binary data
10	11	2000000010	aaa10	34.2	04:03:02	2006-01-01	1971-05-28 16:55:03	bbbbbbbbbbbbb10	binary data
11	12	2000000011	aaa11	34.2	04:03:02	2006-01-01	1971-05-28 16:55:03	bbbbbbbbbbbbb11	binary data
12	13	2000000012	aaa12	34.2	04:03:02	2006-01-01	1971-05-28 16:55:03	bbbbbbbbbbbbb12	binary data
13	14	2000000013	aaa13	34.2	04:03:02	2006-01-01	1971-05-28 16:55:03	bbbbbbbbbbbbb13	binary data
14	15	2000000014	aaa14	34.2	04:03:02	2006-01-01	1971-05-28 16:55:03	bbbbbbbbbbbbb14	binary data
15	16	2000000015	aaa15	34.2	04:03:02	2006-01-01	1971-05-28 16:55:03	bbbbbbbbbbbbb15	binary data
16	17	2000000016	aaa16	34.2	04:03:02	2006-01-01	1971-05-28 16:55:03	bbbbbbbbbbbbb16	binary data
17	18	2000000017	aaa17	34.2	04:03:02	2006-01-01	1971-05-28 16:55:03	bbbbbbbbbbbbb17	binary data
18	19	2000000018	aaa18	34.2	04:03:02	2006-01-01	1971-05-28 16:55:03	bbbbbbbbbbbbb18	binary data
19	20	2000000019	aaa19	34.2	04:03:02	2006-01-01	1971-05-28 16:55:03	bbbbbbbbbbbbb19	binary data
20	21	2000000020	aaa20	34.2	04:03:02	2006-01-01	1971-05-28 16:55:03	bbbbbbbbbbbbb20	binary data
ALTER TABLE test.t1 TABLESPACE ts STORAGE DISK ENGINE=NDB;
SHOW CREATE TABLE test.t1;
Table	Create Table
t1	CREATE TABLE `t1` (
  `a1` smallint(6) NOT NULL,
  `a2` int(11) NOT NULL,
  `a3` bigint(20) NOT NULL,
  `a4` char(10) DEFAULT NULL,
  `a5` decimal(5,1) DEFAULT NULL,
  `a6` time DEFAULT NULL,
  `a7` date DEFAULT NULL,
  `a8` datetime DEFAULT NULL,
  `a9` varchar(255) DEFAULT NULL,
  `a10` blob,
  PRIMARY KEY (`a1`)
) /*!50100 TABLESPACE ts STORAGE DISK */ ENGINE=ndbcluster DEFAULT CHARSET=latin1
a1 Smallint PRIMARY KEY DISTRIBUTION KEY AT=FIXED ST=MEMORY
a2 Int NOT NULL AT=FIXED ST=DISK
a3 Bigint NOT NULL AT=FIXED ST=DISK
a4 Char(10;latin1_swedish_ci) NULL AT=FIXED ST=DISK
a5 Decimal(5,1) NULL AT=FIXED ST=DISK
a6 Time NULL AT=FIXED ST=DISK
a7 Date NULL AT=FIXED ST=DISK
a8 Datetime NULL AT=FIXED ST=DISK
a9 Varchar(255;latin1_swedish_ci) NULL AT=FIXED ST=DISK
a10 Blob(256,2000;16) NULL AT=FIXED ST=MEMORY
SELECT * FROM test.t1 ORDER BY a1;
a1	a2	a3	a4	a5	a6	a7	a8	a9	a10
1	2	2000000001	aaa1	34.2	04:03:02	2006-01-01	1971-05-28 16:55:03	bbbbbbbbbbbbb1	binary data
2	3	2000000002	aaa2	34.2	04:03:02	2006-01-01	1971-05-28 16:55:03	bbbbbbbbbbbbb2	binary data
3	4	2000000003	aaa3	34.2	04:03:02	2006-01-01	1971-05-28 16:55:03	bbbbbbbbbbbbb3	binary data
4	5	2000000004	aaa4	34.2	04:03:02	2006-01-01	1971-05-28 16:55:03	bbbbbbbbbbbbb4	binary data
5	6	2000000005	aaa5	34.2	04:03:02	2006-01-01	1971-05-28 16:55:03	bbbbbbbbbbbbb5	binary data
6	7	2000000006	aaa6	34.2	04:03:02	2006-01-01	1971-05-28 16:55:03	bbbbbbbbbbbbb6	binary data
7	8	2000000007	aaa7	34.2	04:03:02	2006-01-01	1971-05-28 16:55:03	bbbbbbbbbbbbb7	binary data
8	9	2000000008	aaa8	34.2	04:03:02	2006-01-01	1971-05-28 16:55:03	bbbbbbbbbbbbb8	binary data
9	10	2000000009	aaa9	34.2	04:03:02	2006-01-01	1971-05-28 16:55:03	bbbbbbbbbbbbb9	binary data
10	11	2000000010	aaa10	34.2	04:03:02	2006-01-01	1971-05-28 16:55:03	bbbbbbbbbbbbb10	binary data
11	12	2000000011	aaa11	34.2	04:03:02	2006-01-01	1971-05-28 16:55:03	bbbbbbbbbbbbb11	binary data
12	13	2000000012	aaa12	34.2	04:03:02	2006-01-01	1971-05-28 16:55:03	bbbbbbbbbbbbb12	binary data
13	14	2000000013	aaa13	34.2	04:03:02	2006-01-01	1971-05-28 16:55:03	bbbbbbbbbbbbb13	binary data
14	15	2000000014	aaa14	34.2	04:03:02	2006-01-01	1971-05-28 16:55:03	bbbbbbbbbbbbb14	binary data
15	16	2000000015	aaa15	34.2	04:03:02	2006-01-01	1971-05-28 16:55:03	bbbbbbbbbbbbb15	binary data
16	17	2000000016	aaa16	34.2	04:03:02	2006-01-01	1971-05-28 16:55:03	bbbbbbbbbbbbb16	binary data
17	18	2000000017	aaa17	34.2	04:03:02	2006-01-01	1971-05-28 16:55:03	bbbbbbbbbbbbb17	binary data
18	19	2000000018	aaa18	34.2	04:03:02	2006-01-01	1971-05-28 16:55:03	bbbbbbbbbbbbb18	binary data
19	20	2000000019	aaa19	34.2	04:03:02	2006-01-01	1971-05-28 16:55:03	bbbbbbbbbbbbb19	binary data
20	21	2000000020	aaa20	34.2	04:03:02	2006-01-01	1971-05-28 16:55:03	bbbbbbbbbbbbb20	binary data
DROP TABLE test.t1;
CREATE TABLE test.t1 (
a1 smallint NOT NULL,
a2 int NOT NULL,
a3 bigint NOT NULL,
a4 char(10),
a5 decimal(5,1),
a6 time,
a7 date,
a8 datetime,
a9 VARCHAR(255),
a10 blob,
PRIMARY KEY(a1)
) ENGINE=MyISAM;
SHOW CREATE TABLE test.t1;
Table	Create Table
t1	CREATE TABLE `t1` (
  `a1` smallint(6) NOT NULL,
  `a2` int(11) NOT NULL,
  `a3` bigint(20) NOT NULL,
  `a4` char(10) DEFAULT NULL,
  `a5` decimal(5,1) DEFAULT NULL,
  `a6` time DEFAULT NULL,
  `a7` date DEFAULT NULL,
  `a8` datetime DEFAULT NULL,
  `a9` varchar(255) DEFAULT NULL,
  `a10` blob,
  PRIMARY KEY (`a1`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1
SELECT * FROM test.t1 ORDER BY a1;
a1	a2	a3	a4	a5	a6	a7	a8	a9	a10
1	2	2000000001	aaa1	34.2	04:03:02	2006-01-01	1971-05-28 16:55:03	bbbbbbbbbbbbb1	binary data
2	3	2000000002	aaa2	34.2	04:03:02	2006-01-01	1971-05-28 16:55:03	bbbbbbbbbbbbb2	binary data
3	4	2000000003	aaa3	34.2	04:03:02	2006-01-01	1971-05-28 16:55:03	bbbbbbbbbbbbb3	binary data
4	5	2000000004	aaa4	34.2	04:03:02	2006-01-01	1971-05-28 16:55:03	bbbbbbbbbbbbb4	binary data
5	6	2000000005	aaa5	34.2	04:03:02	2006-01-01	1971-05-28 16:55:03	bbbbbbbbbbbbb5	binary data
6	7	2000000006	aaa6	34.2	04:03:02	2006-01-01	1971-05-28 16:55:03	bbbbbbbbbbbbb6	binary data
7	8	2000000007	aaa7	34.2	04:03:02	2006-01-01	1971-05-28 16:55:03	bbbbbbbbbbbbb7	binary data
8	9	2000000008	aaa8	34.2	04:03:02	2006-01-01	1971-05-28 16:55:03	bbbbbbbbbbbbb8	binary data
9	10	2000000009	aaa9	34.2	04:03:02	2006-01-01	1971-05-28 16:55:03	bbbbbbbbbbbbb9	binary data
10	11	2000000010	aaa10	34.2	04:03:02	2006-01-01	1971-05-28 16:55:03	bbbbbbbbbbbbb10	binary data
11	12	2000000011	aaa11	34.2	04:03:02	2006-01-01	1971-05-28 16:55:03	bbbbbbbbbbbbb11	binary data
12	13	2000000012	aaa12	34.2	04:03:02	2006-01-01	1971-05-28 16:55:03	bbbbbbbbbbbbb12	binary data
13	14	2000000013	aaa13	34.2	04:03:02	2006-01-01	1971-05-28 16:55:03	bbbbbbbbbbbbb13	binary data
14	15	2000000014	aaa14	34.2	04:03:02	2006-01-01	1971-05-28 16:55:03	bbbbbbbbbbbbb14	binary data
15	16	2000000015	aaa15	34.2	04:03:02	2006-01-01	1971-05-28 16:55:03	bbbbbbbbbbbbb15	binary data
16	17	2000000016	aaa16	34.2	04:03:02	2006-01-01	1971-05-28 16:55:03	bbbbbbbbbbbbb16	binary data
17	18	2000000017	aaa17	34.2	04:03:02	2006-01-01	1971-05-28 16:55:03	bbbbbbbbbbbbb17	binary data
18	19	2000000018	aaa18	34.2	04:03:02	2006-01-01	1971-05-28 16:55:03	bbbbbbbbbbbbb18	binary data
19	20	2000000019	aaa19	34.2	04:03:02	2006-01-01	1971-05-28 16:55:03	bbbbbbbbbbbbb19	binary data
20	21	2000000020	aaa20	34.2	04:03:02	2006-01-01	1971-05-28 16:55:03	bbbbbbbbbbbbb20	binary data
ALTER TABLE test.t1 TABLESPACE ts STORAGE DISK ENGINE=NDB;
SHOW CREATE TABLE test.t1;
Table	Create Table
t1	CREATE TABLE `t1` (
  `a1` smallint(6) NOT NULL,
  `a2` int(11) NOT NULL,
  `a3` bigint(20) NOT NULL,
  `a4` char(10) DEFAULT NULL,
  `a5` decimal(5,1) DEFAULT NULL,
  `a6` time DEFAULT NULL,
  `a7` date DEFAULT NULL,
  `a8` datetime DEFAULT NULL,
  `a9` varchar(255) DEFAULT NULL,
  `a10` blob,
  PRIMARY KEY (`a1`)
) /*!50100 TABLESPACE ts STORAGE DISK */ ENGINE=ndbcluster DEFAULT CHARSET=latin1
a1 Smallint PRIMARY KEY DISTRIBUTION KEY AT=FIXED ST=MEMORY
a2 Int NOT NULL AT=FIXED ST=DISK
a3 Bigint NOT NULL AT=FIXED ST=DISK
a4 Char(10;latin1_swedish_ci) NULL AT=FIXED ST=DISK
a5 Decimal(5,1) NULL AT=FIXED ST=DISK
a6 Time NULL AT=FIXED ST=DISK
a7 Date NULL AT=FIXED ST=DISK
a8 Datetime NULL AT=FIXED ST=DISK
a9 Varchar(255;latin1_swedish_ci) NULL AT=FIXED ST=DISK
a10 Blob(256,2000;16) NULL AT=FIXED ST=MEMORY
SELECT * FROM test.t1 ORDER BY a1;
a1	a2	a3	a4	a5	a6	a7	a8	a9	a10
1	2	2000000001	aaa1	34.2	04:03:02	2006-01-01	1971-05-28 16:55:03	bbbbbbbbbbbbb1	binary data
2	3	2000000002	aaa2	34.2	04:03:02	2006-01-01	1971-05-28 16:55:03	bbbbbbbbbbbbb2	binary data
3	4	2000000003	aaa3	34.2	04:03:02	2006-01-01	1971-05-28 16:55:03	bbbbbbbbbbbbb3	binary data
4	5	2000000004	aaa4	34.2	04:03:02	2006-01-01	1971-05-28 16:55:03	bbbbbbbbbbbbb4	binary data
5	6	2000000005	aaa5	34.2	04:03:02	2006-01-01	1971-05-28 16:55:03	bbbbbbbbbbbbb5	binary data
6	7	2000000006	aaa6	34.2	04:03:02	2006-01-01	1971-05-28 16:55:03	bbbbbbbbbbbbb6	binary data
7	8	2000000007	aaa7	34.2	04:03:02	2006-01-01	1971-05-28 16:55:03	bbbbbbbbbbbbb7	binary data
8	9	2000000008	aaa8	34.2	04:03:02	2006-01-01	1971-05-28 16:55:03	bbbbbbbbbbbbb8	binary data
9	10	2000000009	aaa9	34.2	04:03:02	2006-01-01	1971-05-28 16:55:03	bbbbbbbbbbbbb9	binary data
10	11	2000000010	aaa10	34.2	04:03:02	2006-01-01	1971-05-28 16:55:03	bbbbbbbbbbbbb10	binary data
11	12	2000000011	aaa11	34.2	04:03:02	2006-01-01	1971-05-28 16:55:03	bbbbbbbbbbbbb11	binary data
12	13	2000000012	aaa12	34.2	04:03:02	2006-01-01	1971-05-28 16:55:03	bbbbbbbbbbbbb12	binary data
13	14	2000000013	aaa13	34.2	04:03:02	2006-01-01	1971-05-28 16:55:03	bbbbbbbbbbbbb13	binary data
14	15	2000000014	aaa14	34.2	04:03:02	2006-01-01	1971-05-28 16:55:03	bbbbbbbbbbbbb14	binary data
15	16	2000000015	aaa15	34.2	04:03:02	2006-01-01	1971-05-28 16:55:03	bbbbbbbbbbbbb15	binary data
16	17	2000000016	aaa16	34.2	04:03:02	2006-01-01	1971-05-28 16:55:03	bbbbbbbbbbbbb16	binary data
17	18	2000000017	aaa17	34.2	04:03:02	2006-01-01	1971-05-28 16:55:03	bbbbbbbbbbbbb17	binary data
18	19	2000000018	aaa18	34.2	04:03:02	2006-01-01	1971-05-28 16:55:03	bbbbbbbbbbbbb18	binary data
19	20	2000000019	aaa19	34.2	04:03:02	2006-01-01	1971-05-28 16:55:03	bbbbbbbbbbbbb19	binary data
20	21	2000000020	aaa20	34.2	04:03:02	2006-01-01	1971-05-28 16:55:03	bbbbbbbbbbbbb20	binary data
ALTER TABLE test.t1 ENGINE=InnoDB;
SHOW CREATE TABLE test.t1;
Table	Create Table
t1	CREATE TABLE `t1` (
  `a1` smallint(6) NOT NULL,
  `a2` int(11) NOT NULL,
  `a3` bigint(20) NOT NULL,
  `a4` char(10) DEFAULT NULL,
  `a5` decimal(5,1) DEFAULT NULL,
  `a6` time DEFAULT NULL,
  `a7` date DEFAULT NULL,
  `a8` datetime DEFAULT NULL,
  `a9` varchar(255) DEFAULT NULL,
  `a10` blob,
  PRIMARY KEY (`a1`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1
SELECT * FROM test.t1 ORDER BY a1;
a1	a2	a3	a4	a5	a6	a7	a8	a9	a10
1	2	2000000001	aaa1	34.2	04:03:02	2006-01-01	1971-05-28 16:55:03	bbbbbbbbbbbbb1	binary data
2	3	2000000002	aaa2	34.2	04:03:02	2006-01-01	1971-05-28 16:55:03	bbbbbbbbbbbbb2	binary data
3	4	2000000003	aaa3	34.2	04:03:02	2006-01-01	1971-05-28 16:55:03	bbbbbbbbbbbbb3	binary data
4	5	2000000004	aaa4	34.2	04:03:02	2006-01-01	1971-05-28 16:55:03	bbbbbbbbbbbbb4	binary data
5	6	2000000005	aaa5	34.2	04:03:02	2006-01-01	1971-05-28 16:55:03	bbbbbbbbbbbbb5	binary data
6	7	2000000006	aaa6	34.2	04:03:02	2006-01-01	1971-05-28 16:55:03	bbbbbbbbbbbbb6	binary data
7	8	2000000007	aaa7	34.2	04:03:02	2006-01-01	1971-05-28 16:55:03	bbbbbbbbbbbbb7	binary data
8	9	2000000008	aaa8	34.2	04:03:02	2006-01-01	1971-05-28 16:55:03	bbbbbbbbbbbbb8	binary data
9	10	2000000009	aaa9	34.2	04:03:02	2006-01-01	1971-05-28 16:55:03	bbbbbbbbbbbbb9	binary data
10	11	2000000010	aaa10	34.2	04:03:02	2006-01-01	1971-05-28 16:55:03	bbbbbbbbbbbbb10	binary data
11	12	2000000011	aaa11	34.2	04:03:02	2006-01-01	1971-05-28 16:55:03	bbbbbbbbbbbbb11	binary data
12	13	2000000012	aaa12	34.2	04:03:02	2006-01-01	1971-05-28 16:55:03	bbbbbbbbbbbbb12	binary data
13	14	2000000013	aaa13	34.2	04:03:02	2006-01-01	1971-05-28 16:55:03	bbbbbbbbbbbbb13	binary data
14	15	2000000014	aaa14	34.2	04:03:02	2006-01-01	1971-05-28 16:55:03	bbbbbbbbbbbbb14	binary data
15	16	2000000015	aaa15	34.2	04:03:02	2006-01-01	1971-05-28 16:55:03	bbbbbbbbbbbbb15	binary data
16	17	2000000016	aaa16	34.2	04:03:02	2006-01-01	1971-05-28 16:55:03	bbbbbbbbbbbbb16	binary data
17	18	2000000017	aaa17	34.2	04:03:02	2006-01-01	1971-05-28 16:55:03	bbbbbbbbbbbbb17	binary data
18	19	2000000018	aaa18	34.2	04:03:02	2006-01-01	1971-05-28 16:55:03	bbbbbbbbbbbbb18	binary data
19	20	2000000019	aaa19	34.2	04:03:02	2006-01-01	1971-05-28 16:55:03	bbbbbbbbbbbbb19	binary data
20	21	2000000020	aaa20	34.2	04:03:02	2006-01-01	1971-05-28 16:55:03	bbbbbbbbbbbbb20	binary data
ALTER TABLE test.t1 TABLESPACE ts STORAGE DISK ENGINE=NDB;
SHOW CREATE TABLE test.t1;
Table	Create Table
t1	CREATE TABLE `t1` (
  `a1` smallint(6) NOT NULL,
  `a2` int(11) NOT NULL,
  `a3` bigint(20) NOT NULL,
  `a4` char(10) DEFAULT NULL,
  `a5` decimal(5,1) DEFAULT NULL,
  `a6` time DEFAULT NULL,
  `a7` date DEFAULT NULL,
  `a8` datetime DEFAULT NULL,
  `a9` varchar(255) DEFAULT NULL,
  `a10` blob,
  PRIMARY KEY (`a1`)
) /*!50100 TABLESPACE ts STORAGE DISK */ ENGINE=ndbcluster DEFAULT CHARSET=latin1
a1 Smallint PRIMARY KEY DISTRIBUTION KEY AT=FIXED ST=MEMORY
a2 Int NOT NULL AT=FIXED ST=DISK
a3 Bigint NOT NULL AT=FIXED ST=DISK
a4 Char(10;latin1_swedish_ci) NULL AT=FIXED ST=DISK
a5 Decimal(5,1) NULL AT=FIXED ST=DISK
a6 Time NULL AT=FIXED ST=DISK
a7 Date NULL AT=FIXED ST=DISK
a8 Datetime NULL AT=FIXED ST=DISK
a9 Varchar(255;latin1_swedish_ci) NULL AT=FIXED ST=DISK
a10 Blob(256,2000;16) NULL AT=FIXED ST=MEMORY
ALTER TABLE test.t1 ENGINE=MyISAM;
SHOW CREATE TABLE test.t1;
Table	Create Table
t1	CREATE TABLE `t1` (
  `a1` smallint(6) NOT NULL,
  `a2` int(11) NOT NULL,
  `a3` bigint(20) NOT NULL,
  `a4` char(10) DEFAULT NULL,
  `a5` decimal(5,1) DEFAULT NULL,
  `a6` time DEFAULT NULL,
  `a7` date DEFAULT NULL,
  `a8` datetime DEFAULT NULL,
  `a9` varchar(255) DEFAULT NULL,
  `a10` blob,
  PRIMARY KEY (`a1`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1
DROP TABLE test.t1;
CREATE TABLE test.t1 (a1 INT PRIMARY KEY) TABLESPACE ts STORAGE DISK ENGINE=NDB;
SELECT * FROM test.t1 ORDER BY a1;
a1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
SELECT * FROM information_schema.partitions WHERE table_name= 't1' AND partition_name = 'p0';
TABLE_CATALOG	TABLE_SCHEMA	TABLE_NAME	PARTITION_NAME	SUBPARTITION_NAME	PARTITION_ORDINAL_POSITION	SUBPARTITION_ORDINAL_POSITION	PARTITION_METHOD	SUBPARTITION_METHOD	PARTITION_EXPRESSION	SUBPARTITION_EXPRESSION	PARTITION_DESCRIPTION	TABLE_ROWS	AVG_ROW_LENGTH	DATA_LENGTH	MAX_DATA_LENGTH	INDEX_LENGTH	DATA_FREE	CREATE_TIME	UPDATE_TIME	CHECK_TIME	CHECKSUM	PARTITION_COMMENT	NODEGROUP	TABLESPACE_NAME
NULL	test	t1	p0	NULL	1	NULL	KEY	NULL		NULL	NULL	0	0	0	NULL	0	0	NULL	NULL	NULL	NULL		default	ts
ALTER TABLE test.t1 ADD a2 FLOAT, ADD a3 DOUBLE;
SELECT * FROM information_schema.partitions WHERE table_name= 't1' AND partition_name = 'p0';
TABLE_CATALOG	TABLE_SCHEMA	TABLE_NAME	PARTITION_NAME	SUBPARTITION_NAME	PARTITION_ORDINAL_POSITION	SUBPARTITION_ORDINAL_POSITION	PARTITION_METHOD	SUBPARTITION_METHOD	PARTITION_EXPRESSION	SUBPARTITION_EXPRESSION	PARTITION_DESCRIPTION	TABLE_ROWS	AVG_ROW_LENGTH	DATA_LENGTH	MAX_DATA_LENGTH	INDEX_LENGTH	DATA_FREE	CREATE_TIME	UPDATE_TIME	CHECK_TIME	CHECKSUM	PARTITION_COMMENT	NODEGROUP	TABLESPACE_NAME
NULL	test	t1	p0	NULL	1	NULL	KEY	NULL		NULL	NULL	0	0	0	NULL	0	0	NULL	NULL	NULL	NULL		default	ts
SELECT * FROM test.t1 ORDER BY a1;
a1	a2	a3
1	2.2345	20000001
2	3.2345	20000002
3	4.2345	20000003
4	5.2345	20000004
5	6.2345	20000005
6	7.2345	20000006
7	8.2345	20000007
8	9.2345	20000008
9	10.2345	20000009
10	11.2345	20000010
11	12.2345	20000011
12	13.2345	20000012
13	14.2345	20000013
14	15.2345	20000014
15	16.2345	20000015
16	17.2345	20000016
17	18.2345	20000017
18	19.2345	20000018
19	20.2345	20000019
20	21.2345	20000020
ALTER TABLE test.t1  ADD a4 BIT, ADD a5 TINYINT, ADD a6 BIGINT, ADD a7 DATE, ADD a8 TIME;
SELECT a1,a2,a3,hex(a4), a5,a6,a7,a8 FROM test.t1 ORDER BY a1;
a1	a2	a3	hex(a4)	a5	a6	a7	a8
1	2.2345	20000001	0	1	23457	2006-01-01	07:04:00
2	3.2345	20000002	0	1	23458	2006-01-01	07:04:00
3	4.2345	20000003	0	1	23459	2006-01-01	07:04:00
4	5.2345	20000004	0	1	23460	2006-01-01	07:04:00
5	6.2345	20000005	0	1	23461	2006-01-01	07:04:00
6	7.2345	20000006	0	1	23462	2006-01-01	07:04:00
7	8.2345	20000007	0	1	23463	2006-01-01	07:04:00
8	9.2345	20000008	0	1	23464	2006-01-01	07:04:00
9	10.2345	20000009	0	1	23465	2006-01-01	07:04:00
10	11.2345	20000010	0	1	23466	2006-01-01	07:04:00
11	12.2345	20000011	0	1	23467	2006-01-01	07:04:00
12	13.2345	20000012	0	1	23468	2006-01-01	07:04:00
13	14.2345	20000013	0	1	23469	2006-01-01	07:04:00
14	15.2345	20000014	0	1	23470	2006-01-01	07:04:00
15	16.2345	20000015	0	1	23471	2006-01-01	07:04:00
16	17.2345	20000016	0	1	23472	2006-01-01	07:04:00
17	18.2345	20000017	0	1	23473	2006-01-01	07:04:00
18	19.2345	20000018	0	1	23474	2006-01-01	07:04:00
19	20.2345	20000019	0	1	23475	2006-01-01	07:04:00
20	21.2345	20000020	0	1	23476	2006-01-01	07:04:00
ALTER TABLE test.t1 ADD a9 DATETIME, ADD a10 TINYTEXT, ADD a11 MEDIUMTEXT, ADD a12 LONGTEXT, ADD a13 TEXT, ADD a14 BLOB;
SHOW CREATE TABLE test.t1;
Table	Create Table
t1	CREATE TABLE `t1` (
  `a1` int(11) NOT NULL,
  `a2` float DEFAULT NULL,
  `a3` double DEFAULT NULL,
  `a4` bit(1) DEFAULT NULL,
  `a5` tinyint(4) DEFAULT NULL,
  `a6` bigint(20) DEFAULT NULL,
  `a7` date DEFAULT NULL,
  `a8` time DEFAULT NULL,
  `a9` datetime DEFAULT NULL,
  `a10` tinytext,
  `a11` mediumtext,
  `a12` longtext,
  `a13` text,
  `a14` blob,
  PRIMARY KEY (`a1`)
) /*!50100 TABLESPACE ts STORAGE DISK */ ENGINE=ndbcluster DEFAULT CHARSET=latin1
a1 Int PRIMARY KEY DISTRIBUTION KEY AT=FIXED ST=MEMORY
a2 Float NULL AT=FIXED ST=DISK
a3 Double NULL AT=FIXED ST=DISK
a4 Bit(1) NULL AT=FIXED ST=DISK
a5 Tinyint NULL AT=FIXED ST=DISK
a6 Bigint NULL AT=FIXED ST=DISK
a7 Date NULL AT=FIXED ST=DISK
a8 Time NULL AT=FIXED ST=DISK
a9 Datetime NULL AT=FIXED ST=DISK
a10 Text(256,0;0;latin1_swedish_ci) NULL AT=FIXED ST=MEMORY
a11 Text(256,4000;8;latin1_swedish_ci) NULL AT=FIXED ST=MEMORY
a12 Text(256,8000;4;latin1_swedish_ci) NULL AT=FIXED ST=MEMORY
a13 Text(256,2000;16;latin1_swedish_ci) NULL AT=FIXED ST=MEMORY
a14 Blob(256,2000;16) NULL AT=FIXED ST=MEMORY
SELECT a1, a2,a3,hex(a4),a5,a6,a7,a8,a9,a10,a11,a12,a13 FROM test.t1 ORDER BY a1;
a1	a2	a3	hex(a4)	a5	a6	a7	a8	a9	a10	a11	a12	a13
1	2.2345	20000001	0	1	23457	2006-01-01	07:04:00	1971-05-28 16:55:03	abc	abcdefg	LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL	Text Field
2	3.2345	20000002	0	1	23458	2006-01-01	07:04:00	1971-05-28 16:55:03	abc	abcdefg	LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL	Text Field
3	4.2345	20000003	0	1	23459	2006-01-01	07:04:00	1971-05-28 16:55:03	abc	abcdefg	LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL	Text Field
4	5.2345	20000004	0	1	23460	2006-01-01	07:04:00	1971-05-28 16:55:03	abc	abcdefg	LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL	Text Field
5	6.2345	20000005	0	1	23461	2006-01-01	07:04:00	1971-05-28 16:55:03	abc	abcdefg	LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL	Text Field
6	7.2345	20000006	0	1	23462	2006-01-01	07:04:00	1971-05-28 16:55:03	abc	abcdefg	LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL	Text Field
7	8.2345	20000007	0	1	23463	2006-01-01	07:04:00	1971-05-28 16:55:03	abc	abcdefg	LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL	Text Field
8	9.2345	20000008	0	1	23464	2006-01-01	07:04:00	1971-05-28 16:55:03	abc	abcdefg	LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL	Text Field
9	10.2345	20000009	0	1	23465	2006-01-01	07:04:00	1971-05-28 16:55:03	abc	abcdefg	LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL	Text Field
10	11.2345	20000010	0	1	23466	2006-01-01	07:04:00	1971-05-28 16:55:03	abc	abcdefg	LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL	Text Field
11	12.2345	20000011	0	1	23467	2006-01-01	07:04:00	1971-05-28 16:55:03	abc	abcdefg	LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL	Text Field
12	13.2345	20000012	0	1	23468	2006-01-01	07:04:00	1971-05-28 16:55:03	abc	abcdefg	LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL	Text Field
13	14.2345	20000013	0	1	23469	2006-01-01	07:04:00	1971-05-28 16:55:03	abc	abcdefg	LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL	Text Field
14	15.2345	20000014	0	1	23470	2006-01-01	07:04:00	1971-05-28 16:55:03	abc	abcdefg	LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL	Text Field
15	16.2345	20000015	0	1	23471	2006-01-01	07:04:00	1971-05-28 16:55:03	abc	abcdefg	LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL	Text Field
16	17.2345	20000016	0	1	23472	2006-01-01	07:04:00	1971-05-28 16:55:03	abc	abcdefg	LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL	Text Field
17	18.2345	20000017	0	1	23473	2006-01-01	07:04:00	1971-05-28 16:55:03	abc	abcdefg	LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL	Text Field
18	19.2345	20000018	0	1	23474	2006-01-01	07:04:00	1971-05-28 16:55:03	abc	abcdefg	LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL	Text Field
19	20.2345	20000019	0	1	23475	2006-01-01	07:04:00	1971-05-28 16:55:03	abc	abcdefg	LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL	Text Field
20	21.2345	20000020	0	1	23476	2006-01-01	07:04:00	1971-05-28 16:55:03	abc	abcdefg	LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL	Text Field
ALTER TABLE test.t1 ADD INDEX a2_i (a2), ADD INDEX a3_i (a3);
SHOW CREATE TABLE test.t1;
Table	Create Table
t1	CREATE TABLE `t1` (
  `a1` int(11) NOT NULL,
  `a2` float DEFAULT NULL,
  `a3` double DEFAULT NULL,
  `a4` bit(1) DEFAULT NULL,
  `a5` tinyint(4) DEFAULT NULL,
  `a6` bigint(20) DEFAULT NULL,
  `a7` date DEFAULT NULL,
  `a8` time DEFAULT NULL,
  `a9` datetime DEFAULT NULL,
  `a10` tinytext,
  `a11` mediumtext,
  `a12` longtext,
  `a13` text,
  `a14` blob,
  PRIMARY KEY (`a1`),
  KEY `a2_i` (`a2`),
  KEY `a3_i` (`a3`)
) /*!50100 TABLESPACE ts STORAGE DISK */ ENGINE=ndbcluster DEFAULT CHARSET=latin1
a1 Int PRIMARY KEY DISTRIBUTION KEY AT=FIXED ST=MEMORY
a2 Float NULL AT=FIXED ST=MEMORY
a3 Double NULL AT=FIXED ST=MEMORY
a4 Bit(1) NULL AT=FIXED ST=DISK
a5 Tinyint NULL AT=FIXED ST=DISK
a6 Bigint NULL AT=FIXED ST=DISK
a7 Date NULL AT=FIXED ST=DISK
a8 Time NULL AT=FIXED ST=DISK
a9 Datetime NULL AT=FIXED ST=DISK
a10 Text(256,0;0;latin1_swedish_ci) NULL AT=FIXED ST=MEMORY
a11 Text(256,4000;8;latin1_swedish_ci) NULL AT=FIXED ST=MEMORY
a12 Text(256,8000;4;latin1_swedish_ci) NULL AT=FIXED ST=MEMORY
a13 Text(256,2000;16;latin1_swedish_ci) NULL AT=FIXED ST=MEMORY
a14 Blob(256,2000;16) NULL AT=FIXED ST=MEMORY
ALTER TABLE test.t1 DROP INDEX a2_i;
SHOW CREATE TABLE test.t1;
Table	Create Table
t1	CREATE TABLE `t1` (
  `a1` int(11) NOT NULL,
  `a2` float DEFAULT NULL,
  `a3` double DEFAULT NULL,
  `a4` bit(1) DEFAULT NULL,
  `a5` tinyint(4) DEFAULT NULL,
  `a6` bigint(20) DEFAULT NULL,
  `a7` date DEFAULT NULL,
  `a8` time DEFAULT NULL,
  `a9` datetime DEFAULT NULL,
  `a10` tinytext,
  `a11` mediumtext,
  `a12` longtext,
  `a13` text,
  `a14` blob,
  PRIMARY KEY (`a1`),
  KEY `a3_i` (`a3`)
) /*!50100 TABLESPACE ts STORAGE DISK */ ENGINE=ndbcluster DEFAULT CHARSET=latin1
a1 Int PRIMARY KEY DISTRIBUTION KEY AT=FIXED ST=MEMORY
a2 Float NULL AT=FIXED ST=DISK
a3 Double NULL AT=FIXED ST=MEMORY
a4 Bit(1) NULL AT=FIXED ST=DISK
a5 Tinyint NULL AT=FIXED ST=DISK
a6 Bigint NULL AT=FIXED ST=DISK
a7 Date NULL AT=FIXED ST=DISK
a8 Time NULL AT=FIXED ST=DISK
a9 Datetime NULL AT=FIXED ST=DISK
a10 Text(256,0;0;latin1_swedish_ci) NULL AT=FIXED ST=MEMORY
a11 Text(256,4000;8;latin1_swedish_ci) NULL AT=FIXED ST=MEMORY
a12 Text(256,8000;4;latin1_swedish_ci) NULL AT=FIXED ST=MEMORY
a13 Text(256,2000;16;latin1_swedish_ci) NULL AT=FIXED ST=MEMORY
a14 Blob(256,2000;16) NULL AT=FIXED ST=MEMORY
TRUNCATE TABLE test.t1;
SHOW CREATE TABLE test.t1;
Table	Create Table
t1	CREATE TABLE `t1` (
  `a1` int(11) NOT NULL,
  `a2` float DEFAULT NULL,
  `a3` double DEFAULT NULL,
  `a4` bit(1) DEFAULT NULL,
  `a5` tinyint(4) DEFAULT NULL,
  `a6` bigint(20) DEFAULT NULL,
  `a7` date DEFAULT NULL,
  `a8` time DEFAULT NULL,
  `a9` datetime DEFAULT NULL,
  `a10` tinytext,
  `a11` mediumtext,
  `a12` longtext,
  `a13` text,
  `a14` blob,
  PRIMARY KEY (`a1`),
  KEY `a3_i` (`a3`)
) /*!50100 TABLESPACE ts STORAGE DISK */ ENGINE=ndbcluster DEFAULT CHARSET=latin1
a1 Int PRIMARY KEY DISTRIBUTION KEY AT=FIXED ST=MEMORY
a2 Float NULL AT=FIXED ST=DISK
a3 Double NULL AT=FIXED ST=MEMORY
a4 Bit(1) NULL AT=FIXED ST=DISK
a5 Tinyint NULL AT=FIXED ST=DISK
a6 Bigint NULL AT=FIXED ST=DISK
a7 Date NULL AT=FIXED ST=DISK
a8 Time NULL AT=FIXED ST=DISK
a9 Datetime NULL AT=FIXED ST=DISK
a10 Text(256,0;0;latin1_swedish_ci) NULL AT=FIXED ST=MEMORY
a11 Text(256,4000;8;latin1_swedish_ci) NULL AT=FIXED ST=MEMORY
a12 Text(256,8000;4;latin1_swedish_ci) NULL AT=FIXED ST=MEMORY
a13 Text(256,2000;16;latin1_swedish_ci) NULL AT=FIXED ST=MEMORY
a14 Blob(256,2000;16) NULL AT=FIXED ST=MEMORY
ALTER TABLE test.t1 DROP a14;
ALTER TABLE test.t1 DROP a13;
ALTER TABLE test.t1 DROP a12;
ALTER TABLE test.t1 DROP a11;
ALTER TABLE test.t1 DROP a10;
ALTER TABLE test.t1 DROP a9;
ALTER TABLE test.t1 DROP a8;
ALTER TABLE test.t1 DROP a7;
ALTER TABLE test.t1 DROP a6;
ALTER TABLE test.t1 DROP PRIMARY KEY;
SHOW CREATE TABLE test.t1;
Table	Create Table
t1	CREATE TABLE `t1` (
  `a1` int(11) NOT NULL,
  `a2` float DEFAULT NULL,
  `a3` double DEFAULT NULL,
  `a4` bit(1) DEFAULT NULL,
  `a5` tinyint(4) DEFAULT NULL,
  KEY `a3_i` (`a3`)
) /*!50100 TABLESPACE ts STORAGE DISK */ ENGINE=ndbcluster DEFAULT CHARSET=latin1
a1 Int NOT NULL AT=FIXED ST=DISK
a2 Float NULL AT=FIXED ST=DISK
a3 Double NULL AT=FIXED ST=MEMORY
a4 Bit(1) NULL AT=FIXED ST=DISK
a5 Tinyint NULL AT=FIXED ST=DISK
$PK Bigunsigned PRIMARY KEY DISTRIBUTION KEY AT=FIXED ST=MEMORY
DROP TABLE test.t1;
ALTER TABLESPACE ts
DROP DATAFILE './table_space/datafile.dat'
 ENGINE NDB;
DROP TABLESPACE ts ENGINE NDB;
DROP LOGFILE GROUP lg ENGINE=NDB;
