include/group_replication.inc Warnings: Note #### Sending passwords in plain text without SSL/TLS is extremely insecure. Note #### Storing MySQL user name or password information in the master info repository is not secure and is therefore not recommended. Please consider using the USER and PASSWORD connection options for START SLAVE; see the 'START SLAVE Syntax' in the MySQL Manual for more information. [connection server1] [connection server1] # Adding debug point 'register_gms_listener_example' to @@GLOBAL.debug SET SQL_LOG_BIN=0; CREATE TABLE test.gms_listener_example(log_message TEXT); SET SQL_LOG_BIN=1; [connection server2] # Adding debug point 'register_gms_listener_example' to @@GLOBAL.debug SET SQL_LOG_BIN=0; CREATE TABLE test.gms_listener_example(log_message TEXT); SET SQL_LOG_BIN=1; ### Scenario 1: SERVER BOOTSTRAPS GROUP ### Expected: ### - Myself: 1 VIEW CHANGED, 2 STATE CHANGED ### - Others: N/A ########################################################################## [connection server1] include/start_and_bootstrap_group_replication.inc include/assert.inc [Assert that there are 1 notifications logged of type VIEW %:1] include/assert.inc [Assert that there are 2 notifications logged of type STATE %:1] include/assert.inc [Assert that there are 3 notifications logged] [Truncating gms_listener_example Table] include/gr_stop_applier_sql_thread.inc STOP SLAVE SQL_THREAD FOR CHANNEL "group_replication_applier"; ### Scenario 2: MEMBER JOINS, but blocks recoverying ### Expected: ### - Myself: 1 VIEW CHANGED, 1 STATE CHANGED ### - Others: 1 VIEW CHANGED, 1 STATE CHANGED ########################################################################## [connection server2] include/start_group_replication.inc include/assert.inc [Assert that there are 1 notifications logged of type VIEW %:2] include/assert.inc [Assert that there are 1 notifications logged of type STATE %:2] include/assert.inc [Assert that there are 2 notifications logged] [Truncating gms_listener_example Table] [connection server1] include/assert.inc [Assert that there are 1 notifications logged of type VIEW %:2] include/assert.inc [Assert that there are 1 notifications logged of type STATE %:2] include/assert.inc [Assert that there are 2 notifications logged] [Truncating gms_listener_example Table] ### Scenario 3: MEMBER RECOVERS JOINS ### Expected: ### - Myself: 1 STATE CHANGED ### - Others: 1 STATE CHANGED ########################################################################## [connection server1] include/gr_start_applier_sql_thread.inc START SLAVE SQL_THREAD FOR CHANNEL "group_replication_applier"; [connection server2] include/gr_wait_for_member_state.inc include/assert.inc [Assert that there are 1 notifications logged of type STATE %:2] include/assert.inc [Assert that there are 1 notifications logged] [Truncating gms_listener_example Table] [connection server1] include/assert.inc [Assert that there are 1 notifications logged of type STATE %:2] include/assert.inc [Assert that there are 1 notifications logged] [Truncating gms_listener_example Table] ### Scenario 4: SERVER LEAVES(ERROR), SERVER LEAVES(OFFLINE) ### Expected: ### - Myself (leaving): 1 VIEW CHANGED, 1 STATE CHANGED ### - Others: 1 VIEW CHANGED ########################################################################## [connection server2] SET SESSION sql_log_bin=0; call mtr.add_suppression("Table 'tab1' already exists"); call mtr.add_suppression("The applier thread execution was aborted. Unable to process more transactions, this member will now leave the group"); call mtr.add_suppression("Fatal error during execution on the Applier process of Group Replication. The server will now leave the group."); call mtr.add_suppression("The server was automatically set into read only mode after an error was detected."); call mtr.add_suppression("Slave SQL for channel 'group_replication_applier': ... The slave coordinator and worker threads are stopped,*"); SET SESSION sql_log_bin=1; SET SESSION sql_log_bin=0; CREATE TABLE test.tab1 (a INT PRIMARY KEY); SET SESSION sql_log_bin=1; [connection server1] CREATE TABLE test.tab1 (a INT PRIMARY KEY); [connection server2] include/gr_wait_for_member_state.inc include/assert.inc [Assert that there are 1 notifications logged of type STATE %:%] include/assert.inc [Assert that there are 1 notifications logged of type VIEW %:%] include/assert.inc [Assert that there are 2 notifications logged] [Truncating gms_listener_example Table] [connection server1] include/assert.inc [Assert that there are 1 notifications logged of type VIEW %:3] include/assert.inc [Assert that there are 1 notifications logged] [Truncating gms_listener_example Table] [connection server2] include/stop_group_replication.inc include/gr_wait_for_member_state.inc include/assert.inc [Assert that there are 1 notifications logged of type STATE %:%] include/assert.inc [Assert that there are 1 notifications logged] [Truncating gms_listener_example Table] SET SESSION sql_log_bin=0; DROP TABLE test.tab1; SET SESSION sql_log_bin=1; [connection server1] include/stop_group_replication.inc # Removing debug point 'register_gms_listener_example' from @@GLOBAL.debug include/start_and_bootstrap_group_replication.inc [connection server2] # Removing debug point 'register_gms_listener_example' from @@GLOBAL.debug include/start_group_replication.inc DROP TABLE gms_listener_example; DROP TABLE test.tab1; include/rpl_sync.inc include/group_replication_end.inc