diff options
author | unknown <mskold@mysql.com> | 2004-07-29 14:02:40 +0200 |
---|---|---|
committer | unknown <mskold@mysql.com> | 2004-07-29 14:02:40 +0200 |
commit | eab01edf4f34118d4edb0d3cecc03901d6433bfb (patch) | |
tree | bb9d21641e3f486f12f7d5370669169943a4ea88 /mysql-test | |
parent | 785a2eea8e0ab560f1987a170150f4865faa6589 (diff) | |
download | mariadb-git-eab01edf4f34118d4edb0d3cecc03901d6433bfb.tar.gz |
Added test for fix of bug#3912 Auto increment not correctly initialised when table is altered
Diffstat (limited to 'mysql-test')
-rw-r--r-- | mysql-test/r/ndb_alter_table.result | 21 | ||||
-rw-r--r-- | mysql-test/t/ndb_alter_table.test | 9 |
2 files changed, 26 insertions, 4 deletions
diff --git a/mysql-test/r/ndb_alter_table.result b/mysql-test/r/ndb_alter_table.result index 6cc6a89d5ad..5c2718b0f75 100644 --- a/mysql-test/r/ndb_alter_table.result +++ b/mysql-test/r/ndb_alter_table.result @@ -16,14 +16,31 @@ col3 varchar (20) not null, col4 varchar(4) not null, col5 enum('PENDING', 'ACTIVE', 'DISABLED') not null, col6 int not null, to_be_deleted int); -insert into t1 values (2,4,3,5,"PENDING",1,7); +insert into t1 values (2,4,3,5,"PENDING",1,7), (NULL,4,3,5,"PENDING",1,7), (25, 4,3,5,"PENDING",1,7), (NULL,4,3,5,"PENDING",1,7); +select * from t1 order by col1; +col1 col2 col3 col4 col5 col6 to_be_deleted +2 4 3 5 PENDING 1 7 +3 4 3 5 PENDING 1 7 +25 4 3 5 PENDING 1 7 +26 4 3 5 PENDING 1 7 alter table t1 add column col4_5 varchar(20) not null after col4, add column col7 varchar(30) not null after col5, add column col8 datetime not null, drop column to_be_deleted, change column col2 fourth varchar(30) not null after col3, modify column col6 int not null first; -select * from t1; +select * from t1 order by col1; col6 col1 col3 fourth col4 col4_5 col5 col7 col8 1 2 3 4 5 PENDING 0000-00-00 00:00:00 +1 3 3 4 5 PENDING 0000-00-00 00:00:00 +1 25 3 4 5 PENDING 0000-00-00 00:00:00 +1 26 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'); +select * from t1 order by col1; +col6 col1 col3 fourth col4 col4_5 col5 col7 col8 +1 2 3 4 5 PENDING 0000-00-00 00:00:00 +1 3 3 4 5 PENDING 0000-00-00 00:00:00 +1 25 3 4 5 PENDING 0000-00-00 00:00:00 +1 26 3 4 5 PENDING 0000-00-00 00:00:00 +2 27 4 3 5 99 PENDING EXTRA 2004-01-01 00:00:00 drop table t1; diff --git a/mysql-test/t/ndb_alter_table.test b/mysql-test/t/ndb_alter_table.test index f95aa82b7cc..96f6f631eff 100644 --- a/mysql-test/t/ndb_alter_table.test +++ b/mysql-test/t/ndb_alter_table.test @@ -30,12 +30,17 @@ col3 varchar (20) not null, col4 varchar(4) not null, col5 enum('PENDING', 'ACTIVE', 'DISABLED') not null, col6 int not null, to_be_deleted int); -insert into t1 values (2,4,3,5,"PENDING",1,7); +insert into t1 values (2,4,3,5,"PENDING",1,7), (NULL,4,3,5,"PENDING",1,7), (25, 4,3,5,"PENDING",1,7), (NULL,4,3,5,"PENDING",1,7); +select * from t1 order by col1; alter table t1 add column col4_5 varchar(20) not null after col4, add column col7 varchar(30) not null after col5, add column col8 datetime not null, drop column to_be_deleted, change column col2 fourth varchar(30) not null after col3, modify column col6 int not null first; -select * from t1; +select * from t1 order by col1; +insert into t1 values (2, NULL,4,3,5,99,"PENDING","EXTRA",'2004-01-01 00:00:00'); +select * from t1 order by col1; drop table t1; + + |