4497 jonas oreland 2011-09-02
ndb - add testcase for failed alter tables...(hint currently fails in 5.5)
added:
mysql-test/suite/ndb/r/ndb_alter_table_error.result
mysql-test/suite/ndb/t/ndb_alter_table_error.test
4496 jonas oreland 2011-09-02
ndb - bahh...changed error message last second
modified:
mysql-test/suite/ndb/r/ndb_basic.result
=== added file 'mysql-test/suite/ndb/r/ndb_alter_table_error.result'
--- a/mysql-test/suite/ndb/r/ndb_alter_table_error.result 1970-01-01 00:00:00 +0000
+++ b/mysql-test/suite/ndb/r/ndb_alter_table_error.result 2011-09-02 06:37:29 +0000
@@ -0,0 +1,19 @@
+*******************************
+* basic concurent online alter test
+*******************************
+* With Commit
+*******************************
+CREATE TABLE t1 (a INT UNSIGNED,
+b INT UNSIGNED not null,
+primary key(a)) ENGINE NDB;
+begin;
+update t1 set b = b + 1 where a = 1;
+ALTER OFFLINE TABLE t1 ADD c CHAR(19);
+ERROR HY000: Lock wait timeout exceeded; try restarting transaction
+commit;
+ALTER OFFLINE TABLE t1 ADD c CHAR(19);
+create unique index b_unq on t1(b) using hash;
+ERROR 23000: Can't write, because of unique constraint, to table 't1'
+update t1 set b = b - 1 where a = 1;
+create unique index b_unq on t1(b) using hash;
+DROP TABLE t1;
=== added file 'mysql-test/suite/ndb/t/ndb_alter_table_error.test'
--- a/mysql-test/suite/ndb/t/ndb_alter_table_error.test 1970-01-01 00:00:00 +0000
+++ b/mysql-test/suite/ndb/t/ndb_alter_table_error.test 2011-09-02 06:37:29 +0000
@@ -0,0 +1,49 @@
+-- source include/not_embedded.inc
+-- source include/have_multi_ndb.inc
+
+--echo *******************************
+--echo * basic concurent online alter test
+--echo *******************************
+--echo * With Commit
+--echo *******************************
+
+connection server1;
+
+CREATE TABLE t1 (a INT UNSIGNED,
+ b INT UNSIGNED not null,
+ primary key(a)) ENGINE NDB;
+let $v=100;
+disable_query_log;
+while ($v)
+{
+ --eval INSERT INTO t1 VALUES($v,$v);
+ dec $v;
+}
+enable_query_log;
+
+
+connection server2;
+begin;
+update t1 set b = b + 1 where a = 1;
+
+connection server1;
+--error 1205
+ALTER OFFLINE TABLE t1 ADD c CHAR(19);
+
+connection server2;
+commit;
+
+connection server1;
+--error 0
+ALTER OFFLINE TABLE t1 ADD c CHAR(19);
+
+connection server1;
+--error 1169
+create unique index b_unq on t1(b) using hash;
+
+update t1 set b = b - 1 where a = 1;
+
+connection server1;
+create unique index b_unq on t1(b) using hash;
+
+DROP TABLE t1;
No bundle (reason: useless for push emails).
| Thread |
|---|
| • bzr push into mysql-5.1-telco-7.0 branch (jonas.oreland:4496 to 4497) | jonas oreland | 2 Sep |