51 lines
1.3 KiB
Plaintext
51 lines
1.3 KiB
Plaintext
-- 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 KEY, b INT UNSIGNED) ENGINE NDB;
|
|
let $v=4;
|
|
disable_query_log;
|
|
while ($v)
|
|
{
|
|
--eval INSERT INTO t1 VALUES($v,$v);
|
|
dec $v;
|
|
}
|
|
enable_query_log;
|
|
|
|
|
|
connection server2;
|
|
--disable_query_log
|
|
call mtr.add_suppression("Failed to acquire exclusive metadata lock");
|
|
call mtr.add_suppression("Failed to update table definition in DD");
|
|
call mtr.add_suppression("Distribution of ALTER TABLE");
|
|
--enable_query_log
|
|
begin;
|
|
update t1 set b = 0 where a = 1;
|
|
update t1 set b = 1 where a = 2;
|
|
delete from t1 where a = 3;
|
|
|
|
insert into t1 values (5,5),(6,6);
|
|
update t1 set b = 0 where a = 6;
|
|
|
|
connection server1;
|
|
--replace_regex /Node [0-9]+:/Node <nodeid>/
|
|
ALTER TABLE t1 ADD c CHAR(19), ADD d VARCHAR(255), ADD e char(255);
|
|
|
|
connection server2;
|
|
# If the table definition gets changed in the middle of the transaction
|
|
# as per the fix in bug#29911440, the transaction will be failed.
|
|
--error ER_TABLE_DEF_CHANGED
|
|
update t1 set b = 0 where a = 2;
|
|
show warnings;
|
|
|
|
connection server1;
|
|
SELECT * FROM t1 ORDER BY a;
|
|
|
|
DROP TABLE t1;
|