| 1 |
-- source include/have_ndb.inc |
| 2 |
-- source include/have_binlog_format_mixed_or_row.inc |
| 3 |
-- source include/have_multi_ndb.inc |
| 4 |
|
| 5 |
--echo # |
| 6 |
--echo # Bug#14516 Restart of cluster can cause NDB API replication failure |
| 7 |
--echo # Unreported bug: Online altered table causes system restart to fail |
| 8 |
--echo # |
| 9 |
|
| 10 |
--echo # Setup |
| 11 |
create table t2 (a int key) engine=ndb; |
| 12 |
|
| 13 |
--echo # Rename table to later verify that the system restart did not fail |
| 14 |
alter table t2 rename t1; |
| 15 |
|
| 16 |
--echo # System restart |
| 17 |
reset master; |
| 18 |
--exec $NDB_MGM -e "all restart -n" > /dev/null |
| 19 |
--exec $NDB_WAITER --not-started > /dev/null |
| 20 |
--exec $NDB_MGM -e "all start" > /dev/null |
| 21 |
--exec $NDB_WAITER > /dev/null |
| 22 |
|
| 23 |
--echo # Wait for 'server1' to complete setup and get out of read-only mode |
| 24 |
--source include/ndb_not_readonly.inc |
| 25 |
|
| 26 |
connection server2; |
| 27 |
--echo # Wait for 'server2' to complete setup and get out of read-only mode |
| 28 |
--source include/ndb_not_readonly.inc |
| 29 |
connection server1; |
| 30 |
|
| 31 |
--echo # Insert data into t1 |
| 32 |
insert into t1 values(1); |
| 33 |
|
| 34 |
--echo # Check that data went in ok |
| 35 |
select * from t1; |
| 36 |
|
| 37 |
--echo # Verify that the replication API is working properly. |
| 38 |
--echo # The binlog should have the insert event. |
| 39 |
--source include/show_binlog_events.inc |
| 40 |
PURGE MASTER LOGS TO 'binlog.000002'; |
| 41 |
--source include/wait_for_ndb_committed_to_binlog.inc |
| 42 |
--source include/show_binlog_events.inc |
| 43 |
|
| 44 |
--echo # Cleanup |
| 45 |
drop table t1; |
| 46 |
|
| 47 |
# Ignore the warning generated by ndbcluster's binlog thread |
| 48 |
# when cluster is restarted |
| 49 |
--disable_query_log ONCE |
| 50 |
call mtr.add_suppression("cluster disconnect An incident event has been written"); |
| 51 |
|
| 52 |
# Ignore the warning generated by ndbcluster's binlog thread |
| 53 |
# when cluster is restarted - also on the second mysqld |
| 54 |
connection server2; |
| 55 |
--disable_query_log ONCE |
| 56 |
call mtr.add_suppression("cluster disconnect An incident event has been written"); |