summaryrefslogtreecommitdiff
path: root/mysql-test/t/ndb_alter_table.test
diff options
context:
space:
mode:
authorunknown <mskold@mysql.com>2004-09-28 09:53:14 +0200
committerunknown <mskold@mysql.com>2004-09-28 09:53:14 +0200
commit65d4dc98665202b64e805f6b15d68ac697e65813 (patch)
treecb3ba38485ca32ed80fb0a08785833a015771689 /mysql-test/t/ndb_alter_table.test
parent12fbe2415a5f1c54b6f6160c7f9f508c002dadde (diff)
downloadmariadb-git-65d4dc98665202b64e805f6b15d68ac697e65813.tar.gz
Adjusted so auto_increment value after bulk insert will be exactly +1 after last (if no parallel inserts)
Diffstat (limited to 'mysql-test/t/ndb_alter_table.test')
-rw-r--r--mysql-test/t/ndb_alter_table.test32
1 files changed, 29 insertions, 3 deletions
diff --git a/mysql-test/t/ndb_alter_table.test b/mysql-test/t/ndb_alter_table.test
index 9128d0c3811..aa3da77a1da 100644
--- a/mysql-test/t/ndb_alter_table.test
+++ b/mysql-test/t/ndb_alter_table.test
@@ -74,19 +74,45 @@ connect (con2,localhost,,,test);
connection con1;
ALTER TABLE t1 ADD COLUMN c int not null;
-select * from t1;
+select * from t1 order by a;
connection con2;
-select * from t1;
+select * from t1 order by a;
alter table t1 drop c;
connection con1;
-select * from t1;
+select * from t1 order by a;
drop table t1;
connection con2;
--error 1146
+select * from t1 order by a;
+
+CREATE TABLE t1 (
+ a INT NOT NULL PRIMARY KEY,
+ b INT NOT NULL
+) ENGINE=ndbcluster;
+
+INSERT INTO t1 VALUES (0,1),(17,18);
+select * from t1 order by a;
+alter table t1 modify column a int not null auto_increment;
+select * from t1 order by a;
+INSERT INTO t1 VALUES (0,19),(20,21);
+select * from t1 order by a;
+drop table t1;
+
+CREATE TABLE t1 (
+ a INT NOT NULL PRIMARY KEY,
+ b INT NOT NULL
+) ENGINE=ndbcluster;
+
+INSERT INTO t1 VALUES (0,1),(17,18);
select * from t1;
+alter table t1 add c int not null unique auto_increment;
+select * from t1 order by a;
+INSERT INTO t1 VALUES (18,19,3),(20,21,0);
+select * from t1 order by a;
+drop table t1;
#--disable_warnings
#DROP TABLE IF EXISTS t2;