Commit caa525d8 authored by unknown's avatar unknown

Added tests for fix of bug#4730

parent 00c547d3
...@@ -16,8 +16,14 @@ col3 varchar (20) not null, ...@@ -16,8 +16,14 @@ col3 varchar (20) not null,
col4 varchar(4) not null, col4 varchar(4) not null,
col5 enum('PENDING', 'ACTIVE', 'DISABLED') not null, col5 enum('PENDING', 'ACTIVE', 'DISABLED') not null,
col6 int not null, to_be_deleted int) ENGINE=ndbcluster; col6 int not null, to_be_deleted int) ENGINE=ndbcluster;
show table status;
Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment
t1 ndbcluster 9 Dynamic 100 0 0 NULL 0 0 0 NULL NULL NULL latin1_swedish_ci NULL
insert into t1 values insert into t1 values
(0,4,3,5,"PENDING",1,7),(NULL,4,3,5,"PENDING",1,7),(31,4,3,5,"PENDING",1,7), (7,4,3,5,"PENDING",1,7), (NULL,4,3,5,"PENDING",1,7), (100,4,3,5,"PENDING",1,7), (99,4,3,5,"PENDING",1,7), (8,4,3,5,"PENDING",1,7), (NULL,4,3,5,"PENDING",1,7); (0,4,3,5,"PENDING",1,7),(NULL,4,3,5,"PENDING",1,7),(31,4,3,5,"PENDING",1,7), (7,4,3,5,"PENDING",1,7), (NULL,4,3,5,"PENDING",1,7), (100,4,3,5,"PENDING",1,7), (99,4,3,5,"PENDING",1,7), (8,4,3,5,"PENDING",1,7), (NULL,4,3,5,"PENDING",1,7);
show table status;
Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment
t1 ndbcluster 9 Dynamic 100 0 0 NULL 0 0 102 NULL NULL NULL latin1_swedish_ci NULL
select * from t1 order by col1; select * from t1 order by col1;
col1 col2 col3 col4 col5 col6 to_be_deleted col1 col2 col3 col4 col5 col6 to_be_deleted
0 4 3 5 PENDING 1 7 0 4 3 5 PENDING 1 7
...@@ -35,6 +41,9 @@ add column col7 varchar(30) not null after col5, ...@@ -35,6 +41,9 @@ add column col7 varchar(30) not null after col5,
add column col8 datetime not null, drop column to_be_deleted, add column col8 datetime not null, drop column to_be_deleted,
change column col2 fourth varchar(30) not null after col3, change column col2 fourth varchar(30) not null after col3,
modify column col6 int not null first; modify column col6 int not null first;
show table status;
Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment
t1 ndbcluster 9 Dynamic 100 0 0 NULL 0 0 102 NULL NULL NULL latin1_swedish_ci NULL
select * from t1 order by col1; select * from t1 order by col1;
col6 col1 col3 fourth col4 col4_5 col5 col7 col8 col6 col1 col3 fourth col4 col4_5 col5 col7 col8
1 0 3 4 5 PENDING 0000-00-00 00:00:00 1 0 3 4 5 PENDING 0000-00-00 00:00:00
...@@ -47,6 +56,9 @@ col6 col1 col3 fourth col4 col4_5 col5 col7 col8 ...@@ -47,6 +56,9 @@ col6 col1 col3 fourth col4 col4_5 col5 col7 col8
1 100 3 4 5 PENDING 0000-00-00 00:00:00 1 100 3 4 5 PENDING 0000-00-00 00:00:00
1 101 3 4 5 PENDING 0000-00-00 00:00:00 1 101 3 4 5 PENDING 0000-00-00 00:00:00
insert into t1 values (2, NULL,4,3,5,99,"PENDING","EXTRA",'2004-01-01 00:00:00'); insert into t1 values (2, NULL,4,3,5,99,"PENDING","EXTRA",'2004-01-01 00:00:00');
show table status;
Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment
t1 ndbcluster 9 Dynamic 100 0 0 NULL 0 0 103 NULL NULL NULL latin1_swedish_ci NULL
select * from t1 order by col1; select * from t1 order by col1;
col6 col1 col3 fourth col4 col4_5 col5 col7 col8 col6 col1 col3 fourth col4 col4_5 col5 col7 col8
1 0 3 4 5 PENDING 0000-00-00 00:00:00 1 0 3 4 5 PENDING 0000-00-00 00:00:00
......
...@@ -30,8 +30,10 @@ col3 varchar (20) not null, ...@@ -30,8 +30,10 @@ col3 varchar (20) not null,
col4 varchar(4) not null, col4 varchar(4) not null,
col5 enum('PENDING', 'ACTIVE', 'DISABLED') not null, col5 enum('PENDING', 'ACTIVE', 'DISABLED') not null,
col6 int not null, to_be_deleted int) ENGINE=ndbcluster; col6 int not null, to_be_deleted int) ENGINE=ndbcluster;
show table status;
insert into t1 values insert into t1 values
(0,4,3,5,"PENDING",1,7),(NULL,4,3,5,"PENDING",1,7),(31,4,3,5,"PENDING",1,7), (7,4,3,5,"PENDING",1,7), (NULL,4,3,5,"PENDING",1,7), (100,4,3,5,"PENDING",1,7), (99,4,3,5,"PENDING",1,7), (8,4,3,5,"PENDING",1,7), (NULL,4,3,5,"PENDING",1,7); (0,4,3,5,"PENDING",1,7),(NULL,4,3,5,"PENDING",1,7),(31,4,3,5,"PENDING",1,7), (7,4,3,5,"PENDING",1,7), (NULL,4,3,5,"PENDING",1,7), (100,4,3,5,"PENDING",1,7), (99,4,3,5,"PENDING",1,7), (8,4,3,5,"PENDING",1,7), (NULL,4,3,5,"PENDING",1,7);
show table status;
select * from t1 order by col1; select * from t1 order by col1;
alter table t1 alter table t1
add column col4_5 varchar(20) not null after col4, add column col4_5 varchar(20) not null after col4,
...@@ -39,8 +41,10 @@ add column col7 varchar(30) not null after col5, ...@@ -39,8 +41,10 @@ add column col7 varchar(30) not null after col5,
add column col8 datetime not null, drop column to_be_deleted, add column col8 datetime not null, drop column to_be_deleted,
change column col2 fourth varchar(30) not null after col3, change column col2 fourth varchar(30) not null after col3,
modify column col6 int not null first; modify column col6 int not null first;
show table status;
select * from t1 order by col1; select * from t1 order by col1;
insert into t1 values (2, NULL,4,3,5,99,"PENDING","EXTRA",'2004-01-01 00:00:00'); insert into t1 values (2, NULL,4,3,5,99,"PENDING","EXTRA",'2004-01-01 00:00:00');
show table status;
select * from t1 order by col1; select * from t1 order by col1;
drop table t1; drop table t1;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment