config root man

Current Path : /usr/opt/mysql57/mysql-test/suite/binlog/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
Upload File :
Current File : //usr/opt/mysql57/mysql-test/suite/binlog/t/binlog_gtids_table_gcov.test

#
# ==== Purpose ====
#
# WL#6559 Optimize GTIDs for passive slave - store GTIDs in table
#
# Added test cases to cover error branches.
#
# Test case 1: Simulate an error on writing gtids into table on
#              server shutdown, verify that we can get correct
#              gtid sets after server restarts.
# Test case 2: Simulate an error on writing gtids into table on
#              binlog rotation, verify that GTIDs are not saved
#              into gtid_executed table.
#

--source include/not_valgrind.inc
--source include/have_debug.inc
--source include/have_innodb.inc
--source include/have_log_bin.inc
--source include/have_gtid.inc

# Need to restart servers after this test because it closes the binary
# log and there is no other way to recover from that.
--source include/force_restart.inc

RESET MASTER;

call mtr.add_suppression("Failed to save the set of Global Transaction "
                         "Identifiers of the last binary log into the "
                         "mysql.gtid_executed table while the server was "
                         "shutting down. The next server restart will make "
                         "another attempt to save Global Transaction "
                         "Identifiers into the table.");
SET @debug_save= @@GLOBAL.DEBUG;
--let $saved_binlog_error_action=`SELECT @@GLOBAL.binlog_error_action`
--let $master_uuid= `SELECT @@GLOBAL.SERVER_UUID`
CREATE TABLE t1 (a INT) ENGINE=InnoDB;

SET @@GLOBAL.DEBUG= "+d,simulate_err_on_write_gtid_into_table";
--source include/restart_mysqld.inc

--echo #
--echo # Verify that we can get correct gtid sets after server restarts
--echo # even if we encounter an error on writing gtids into table on
--echo # server shutdown.
--echo #
--let $assert_text= committed gtid set is MASTER_UUID:1-2
--let $assert_cond= @@GLOBAL.GTID_EXECUTED = "$master_uuid:1-2"
--source include/assert.inc
--replace_result $master_uuid MASTER_UUID
SELECT * FROM mysql.gtid_executed;
SET GLOBAL DEBUG= @debug_save;
SET GLOBAL binlog_error_action= IGNORE_ERROR;

call mtr.add_suppression(".* Turning logging off for the whole duration of the "
                         "MySQL server process. To turn it on again: fix the "
                         "cause, shutdown the MySQL server and restart it.");
INSERT INTO t1 VALUES(1);
SET SESSION debug="+d,simulate_err_on_write_gtid_into_table";
--ERROR ER_GET_ERRNO
FLUSH LOGS;
SET SESSION debug="-d,simulate_err_on_write_gtid_into_table";
--echo #
--echo # Verify that GTIDs are not saved into gtid_executed table if we
--echo # encounter an error on writing gtids into table on binlog rotation.
--echo #
--replace_result $master_uuid MASTER_UUID
SELECT * FROM mysql.gtid_executed;
--let $assert_text= committed gtid set is MASTER_UUID:1-4
--let $assert_cond= @@GLOBAL.GTID_EXECUTED = "$master_uuid:1-4"
--source include/assert.inc
--eval SET GLOBAL binlog_error_action= $saved_binlog_error_action

DROP TABLE t1;

Man Man