Current Path : /usr/opt/mysql57/mysql-test/suite/group_replication/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 : //usr/opt/mysql57/mysql-test/suite/group_replication/t/gr_view_change_order.test |
# This test evaluates that no local transaction can be logged after the view # change event if it was executed before the view change. # # Steps: # 0. Two server with GR stopped # 1. Start group replication on server 1 # Execute a transaction and block before logging to the binlog. # --source include/have_debug_sync.inc --source ../inc/have_group_replication_plugin.inc --let $rpl_skip_group_replication_start= 1 --source ../inc/group_replication.inc --echo # --echo # Start group replication on server 1 --echo # Execute a transaction and block before logging to the binlog. --echo # --let $rpl_connection_name= server1 --source include/rpl_connection.inc --source ../inc/start_and_bootstrap_group_replication.inc CREATE TABLE t1 (c1 INT NOT NULL AUTO_INCREMENT PRIMARY KEY) ENGINE=InnoDB; INSERT INTO t1 VALUES (NULL); SET @@GLOBAL.DEBUG='+d,group_replication_after_before_commit_hook'; --send INSERT INTO t1 VALUES (NULL); --let $rpl_connection_name= server_1 --source include/rpl_connection.inc --sleep 1 --let $wait_condition=SELECT COUNT(*)=1 FROM INFORMATION_SCHEMA.PROCESSLIST WHERE State = 'debug sync point: now' SET @@GLOBAL.DEBUG='-d,group_replication_after_before_commit_hook'; #ensure server 1 does not fails while waiting SET @@GLOBAL.DEBUG='+d,sql_int_wait_for_gtid_executed_no_timeout'; --echo # --echo # Start group replication on server 2 --echo # The server should block waiting for recovery --echo # --let $rpl_connection_name= server2 --source include/rpl_connection.inc --let $group_replication_start_member_state= RECOVERING --source include/start_group_replication.inc --sleep 5 --let $server2_uuid= `SELECT @@GLOBAL.SERVER_UUID` --let $member_state= query_get_value(SELECT Member_State from performance_schema.replication_group_members WHERE member_id= '$server2_uuid', Member_State, 1) --let $assert_text= The member should still be recovering --let $assert_cond= "$member_state" = "RECOVERING" --source include/assert.inc --echo # --echo # Unblock local query wait on server 1 --echo # Recovery should unblock on server 2 --echo # --let $rpl_connection_name= server_1 --source include/rpl_connection.inc SET DEBUG_SYNC= "now SIGNAL signal.commit_continue"; SET @@GLOBAL.DEBUG='-d,sql_int_wait_for_gtid_executed_no_timeout'; --let $rpl_connection_name= server2 --source include/rpl_connection.inc --let $group_replication_member_state= ONLINE --source ../inc/gr_wait_for_member_state.inc --echo # --echo # Add some more queries --echo # Restart server 2 and check all is fine. --echo # --let $rpl_connection_name= server1 --source include/rpl_connection.inc --reap INSERT INTO t1 VALUES (NULL); INSERT INTO t1 VALUES (NULL); --let $rpl_connection_name= server2 --source include/rpl_connection.inc --source include/stop_group_replication.inc --source include/start_group_replication.inc --let $assert_text= Table t1 will contain 3 rows --let $assert_cond= "[SELECT COUNT(*) AS count FROM t1, count, 1]" = "4" --source include/assert.inc --let $rpl_connection_name= server1 --source include/rpl_connection.inc --let $assert_text= Table t1 will contain 3 rows --let $assert_cond= "[SELECT COUNT(*) AS count FROM t1, count, 1]" = "4" --source include/assert.inc DROP TABLE t1; --source ../inc/group_replication_end.inc