Current Path : /home/usr.opt/mysql57/mysql-test/suite/rpl/t/ |
FreeBSD hs32.drive.ne.jp 9.1-RELEASE FreeBSD 9.1-RELEASE #1: Wed Jan 14 12:18:08 JST 2015 root@hs32.drive.ne.jp:/sys/amd64/compile/hs32 amd64 |
Current File : //home/usr.opt/mysql57/mysql-test/suite/rpl/t/rpl_simulate_create_chunk_failure.test |
# ==== Purpose ==== # # Bug #18963676 MISSED TO HANDLE OOM ERROR WHILE ADDING A GTID INTO GTID SET # # Verify that we can get correct global @@GTID_EXECUTED after server # restarts from a crash caused by 'OUT OF MEMORY' error on adding # GTID into global @@GTID_EXECUTED. # # ==== Implementation ==== # # 1) Commit a transaction on master. # 2) Wait the slave server crash caused by 'OUT OF MEMORY' error # on adding GTID into @@GLOBAL.GTID_EXECUTED when applying # the replicated transaction. # 3) Verify that the transaction is committed and its GTID is # added into @@GLOBAL.GTID_EXECUTED and 'gtid_executed' # table after slave server restarts. # # Test in this file is binlog format agnostic, thus no need # to rerun them for every format. --source include/have_binlog_format_row.inc --source include/have_gtid.inc --source include/not_group_replication_plugin.inc --source include/master-slave.inc # Restrict the test runs to only debug builds, since we set DEBUG point in the test. --source include/have_debug.inc --source include/rpl_connection_slave.inc call mtr.add_suppression("You need to use --log-bin to make --binlog-format work"); SET @debug_save= @@GLOBAL.DEBUG; --exec echo "wait" > $MYSQLTEST_VARDIR/tmp/mysqld.2.expect SET @@GLOBAL.DEBUG= '+d,rpl_gtid_update_on_commit_simulate_out_of_memory'; --source include/rpl_connection_master.inc --let $master_uuid= `SELECT @@GLOBAL.SERVER_UUID` --echo # --echo # Commit a transaction on master --echo # CREATE TABLE t1 (c1 INT NOT NULL PRIMARY KEY); --source include/rpl_connection_slave.inc --echo # --echo # Wait the slave server crash caused by 'OUT OF MEMORY' error --echo # on adding GTID into @@GLOBAL.GTID_EXECUTED when applying --echo # the replicated transaction. --echo # --source include/wait_until_disconnected.inc --let $rpl_server_number= 2 --source include/rpl_start_server.inc --echo # --echo # Verify that the transaction is committed and its GTID is --echo # added into @@GLOBAL.GTID_EXECUTED and 'gtid_executed' --echo # table after slave server restarts. --echo # SET @@GLOBAL.DEBUG= @debug_save; --replace_result $master_uuid MASTER_UUID --eval SELECT * FROM mysql.gtid_executed --let $assert_text= committed gtids MASTER_UUID:1 --let $assert_cond= "[SELECT @@GLOBAL.GTID_EXECUTED]" = "$master_uuid:1" --let $assert_text= Table t1 exists and is empty --let $assert_cond= "[SELECT c1 FROM t1]" = "" --source include/assert.inc --source include/start_slave.inc # Cleanup --source include/rpl_connection_master.inc DROP TABLE t1; --source include/rpl_end.inc