Server IP : 104.21.38.3 / Your IP : 172.70.189.161 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/src/mysql-test/suite/rpl/t/ |
Upload File : |
--source include/not_group_replication_plugin.inc --source include/have_debug.inc --source include/have_binlog_format_row.inc --source include/master-slave.inc call mtr.add_suppression("Deadlock found"); --echo **** On Master **** connection master; CREATE TABLE t1 (a INT PRIMARY KEY, b INT); INSERT INTO t1 VALUES (1,1), (2,2), (3,3), (4,4); --echo **** On Slave **** --source include/sync_slave_sql_with_master.inc SHOW STATUS LIKE 'Slave_retried_transactions'; # since bug#31552/31609 idempotency is not default any longer. In order # the following UPDATE t1 to pass the mode is switched temprorarily set @@global.slave_exec_mode= 'IDEMPOTENT'; UPDATE t1 SET a = 5, b = 47 WHERE a = 1; SELECT * FROM t1 order by a; --echo **** On Master **** connection master; UPDATE t1 SET a = 5, b = 5 WHERE a = 1; SELECT * FROM t1 order by a; #SHOW BINLOG EVENTS; --echo **** On Slave **** --source include/sync_slave_sql_with_master.inc set @@global.slave_exec_mode= default; SHOW STATUS LIKE 'Slave_retried_transactions'; SELECT * FROM t1 order by a; source include/check_slave_is_running.inc; connection slave; call mtr.add_suppression("Slave SQL.*Could not execute Update_rows event on table test.t1"); call mtr.add_suppression("Slave SQL for channel '': worker thread retried transaction"); call mtr.add_suppression("The slave coordinator and worker threads are stopped"); # # Bug#24764800 REPLICATION FAILING ON SLAVE WITH XAER_RMFAIL ERROR # # Verify that a temporary failing replicated xa transaction completes # upon slave applier restart after previous # @@global.slave_transaction_retries number of retries in vain. # connection slave; set @save_innodb_lock_wait_timeout=@@global.innodb_lock_wait_timeout; set @save_slave_transaction_retries=@@global.slave_transaction_retries; # Slave applier parameters for the failed retry set @@global.innodb_lock_wait_timeout=1; set @@global.slave_transaction_retries=2; --source include/restart_slave_sql.inc # Temporary error implement: a record is blocked by slave local trx connection slave1; BEGIN; INSERT INTO t1 SET a = 6, b = 7; connection master; INSERT INTO t1 SET a = 99, b = 99; # slave applier warm up trx XA START 'xa1'; INSERT INTO t1 SET a = 6, b = 6; # this record eventually must be found on slave XA END 'xa1'; XA PREPARE 'xa1'; connection slave; --let $err_timeout= convert_error(ER_LOCK_WAIT_TIMEOUT) --let $err_deadlock= convert_error(ER_LOCK_DEADLOCK) --let $slave_sql_errno=$err_deadlock,$err_timeout --let $show_slave_sql_error= --source include/wait_for_slave_sql_error.inc # b. Slave applier parameters for successful retry after restart set @@global.innodb_lock_wait_timeout=1; set @@global.slave_transaction_retries=100; SELECT count_transactions_retries FROM performance_schema.replication_applier_status INTO @last_retries; --source include/start_slave_sql.inc --let $wait_condition=SELECT count_transactions_retries > @last_retries+1 FROM performance_schema.replication_applier_status; --source include/wait_condition.inc # Release the record after just one retry connection slave1; ROLLBACK; connection master; XA COMMIT 'xa1'; --source include/sync_slave_sql_with_master.inc # Proof of correctness: the committed XA is on the slave connection slave; --let $assert_text=XA transaction record must be in the table --let $assert_cond=count(*)=1 FROM t1 WHERE a=6 AND b=6 --source include/assert.inc # Bug#24764800 cleanup: set @@global.innodb_lock_wait_timeout=@save_innodb_lock_wait_timeout; set @@global.slave_transaction_retries= @save_slave_transaction_retries; # # Total cleanup: # --echo **** On Master **** connection master; DROP TABLE t1; --source include/rpl_end.inc