Server IP : 172.67.216.182 / Your IP : 162.158.108.86 Web Server : Apache System : Linux krdc-ubuntu-s-2vcpu-4gb-amd-blr1-01.localdomain 5.15.0-142-generic #152-Ubuntu SMP Mon May 19 10:54:31 UTC 2025 x86_64 User : www ( 1000) PHP Version : 7.4.33 Disable Function : passthru,exec,system,putenv,chroot,chgrp,chown,shell_exec,popen,proc_open,pcntl_exec,ini_alter,ini_restore,dl,openlog,syslog,readlink,symlink,popepassthru,pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,imap_open,apache_setenv MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : ON Directory : /www/server/mysql/mysql-test/suite/group_replication/t/ |
Upload File : |
################################################################################ # BUG 21649247 - DML(INSERT) WITH STOP AND START GR RESULTS INTO CRASH POST # 'BEFORE_COMMIT' ERROR # # The test verifies that the concurrent execution of START/STOP # GROUP_REPLICATION and DML executing does not crash. # # Test: # 0) The test requires two servers: M1 and M2. # 1) With both members ONLINE. Create table t1 on M1. Then, block the stop # group_replication after recovery module termination using DEBUG point. # 2) Execute a DML to check if it crashes. # 3) Check if the DML executing is blocked at this point. # 4) Signal the waiting thread on stop group_replication. # 5) Check for consistency on the two servers. # 6) Clean up. ################################################################################ --source include/big_test.inc --source include/have_debug_sync.inc --source ../inc/have_group_replication_plugin.inc --source ../inc/group_replication.inc --let $rpl_connection_name= server1 --source include/rpl_connection.inc SET SESSION sql_log_bin= 0; call mtr.add_suppression("Transaction cannot be executed while Group Replication is stopping."); call mtr.add_suppression("Run function 'before_commit' in plugin 'group_replication' failed"); SET SESSION sql_log_bin= 1; CREATE TABLE t1 (c1 INT PRIMARY KEY); --source include/rpl_sync.inc # Adding debug point to block the stop group_replication after recovery module termination. --echo # Add a debug sync point in the code. --let $rpl_connection_name= server_1 --source include/rpl_connection.inc SET @@GLOBAL.DEBUG= @debug_save; SET @@GLOBAL.DEBUG= 'd,group_replication_after_recovery_module_terminated'; --send STOP GROUP_REPLICATION # Execute a DML to check if it crashes. --echo # Inserting the DML which was causing crash. --let $rpl_connection_name= server1 --source include/rpl_connection.inc --let $wait_condition=SELECT COUNT(*)=1 FROM INFORMATION_SCHEMA.PROCESSLIST WHERE State = 'debug sync point: now' --source include/wait_condition.inc --send INSERT INTO t1 VALUES(1) # Signal the waiting thread on stop group_replication. --let $rpl_connection_name= server_1_1 --source include/rpl_connection.inc --echo # Signal the waiting thread on connection server_1 to resume. SET DEBUG_SYNC= "now SIGNAL signal.termination_continue"; SET @@GLOBAL.DEBUG= @debug_save; --let $rpl_connection_name= server_1 --source include/rpl_connection.inc --reap --echo # Asserting that the member here is offline. --let $group_replication_member_state= OFFLINE --source ../inc/gr_wait_for_member_state.inc --source include/assert_and_disable_read_only.inc # Check for data on the two servers. --echo # Asserting that only 1 member exists in the group. --let $rpl_connection_name= server2 --source include/rpl_connection.inc --let $group_replication_number_of_members= 1 --source ../inc/gr_wait_for_number_of_members.inc --let $rpl_connection_name= server1 --source include/rpl_connection.inc --error ER_RUN_HOOK_ERROR --reap --echo # Asserting that no row exist in table t1 on server1. --let $assert_text= The table should have 0 row inserted. --let $assert_cond= `SELECT COUNT(*)=0 FROM t1` --source include/assert.inc --echo # Asserting that no row exist in table t1 on server2. --let $rpl_connection_name= server2 --source include/rpl_connection.inc --let $assert_text= The table should have 0 row inserted. --let $assert_cond= `SELECT COUNT(*)=0 FROM t1` --source include/assert.inc # Rejoin server 1. --let $rpl_connection_name= server1 --source include/rpl_connection.inc --source include/start_group_replication.inc # Check for consistency on the two servers. --let $diff_tables= server1:test.t1, server2:test.t1 --source include/diff_tables.inc # Cleanup --echo # Cleanup DROP TABLE t1; --source ../inc/group_replication_end.inc