MINI MINI MANI MO
-- source include/have_multi_ndb.inc
-- source include/have_binlog_format_mixed_or_row.inc
--disable_warnings
connection server2;
drop table if exists t1,dummy;
connection server1;
drop table if exists t1,dummy;
--enable_warnings
# Dummy table create/drop to avoid a race where table is created
# before event subscription is set up, causing test failure (BUG#20677).
-- connection server2
CREATE TABLE dummy (dummyk INT PRIMARY KEY) ENGINE = NDB;
-- connection server1
DROP TABLE dummy;
# reset for test
-- connection server1
reset master;
-- connection server2
reset master;
#
# Bug #17250994 BAD BINLOG GENERATION AFTER MISMATCH TABLE DISCOVER
#
create table t1 (a int unsigned auto_increment not null primary key)
engine=ndbcluster;
#
# Shutdown server 1
#
-- connection server1
# Ignore the warning generated by ndbcluster's binlog thread
# when mysqld is restarted
--disable_query_log ONCE
call mtr.add_suppression("mysqld startup An incident event has been written");
# Write file to make mysql-test-run.pl expect the "crash", but don't start
# it until it's told to.
--write_file $MYSQLTEST_VARDIR/tmp/mysqld.1.1.expect
wait
EOF
# Send shutdown to the connected server and give
# it 30 seconds to die before zapping it.
shutdown_server 30;
# Check server is gone.
--source include/wait_until_disconnected.inc
-- connection server2
#
# Alter table while server 1 is down
#
alter table t1 algorithm=inplace, add column b varchar(16);
#
# Startup server1
#
-- connection server1
# Write file to make mysql-test-run.pl start up the server again.
--append_file $MYSQLTEST_VARDIR/tmp/mysqld.1.1.expect
restart
EOF
# Turn on reconnect.
--enable_reconnect
# Call script that will poll the server waiting for it to be back online again.
--source include/wait_until_connected_again.inc
# Turn off reconnect again.
--disable_reconnect
show tables;
show create table t1;
-- connection server2
insert into t1 (b) values('String to find');
# Dummy synchronization to flush events to binlog
CREATE TABLE dummy (dummyk INT PRIMARY KEY) ENGINE = NDB;
-- connection server1
DROP TABLE dummy;
# check that data went in ok
select * from t1;
FLUSH BINARY LOGS;
let $MYSQLD_DATADIR= `select @@datadir;`;
--replace_regex /(.*)/REMOVE_LINE:\1/ /REMOVE_LINE:(.*@2='String to find')/KEEP_LINE:\1/ /REMOVE_LINE:.*// /KEEP_LINE://
--exec $MYSQL_BINLOG --verbose $MYSQLD_DATADIR/mysqld-bin.000003
#
# Cleanup
#
drop table t1;
OHA YOOOO