Server IP : 104.21.38.3 / Your IP : 104.23.175.151 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 : |
# This test check if the option slave-preserve-commit-order stops the newer # workers from committing if one of the older workers have errored out. --source include/not_group_replication_plugin.inc --source include/have_debug.inc --source include/have_debug_sync.inc # TODO: The test can be converted to run with Logical-clock. --source include/have_slave_parallel_type_database.inc --source include/master-slave.inc CALL mtr.add_suppression(".*slave coordinator and worker threads are stopped.*"); CALL mtr.add_suppression("Could not execute Write_rows event on table test.*"); CALL mtr.add_suppression("Worker .* failed executing transaction"); CALL mtr.add_suppression("Slave worker has stopped since one or more of the previous worker(s) have encountered an error and slave-preserve-commit-order is enabled.*"); SET @save_debug = @@GLOBAL.debug; SET GLOBAL debug = "d,set_commit_parent_100"; CREATE TABLE t_w1 (c1 int PRIMARY KEY) ENGINE = InnoDB; CREATE TABLE t_w2 (c1 int PRIMARY KEY) ENGINE = InnoDB; CREATE TABLE t_w3 (c1 int PRIMARY KEY) ENGINE = InnoDB; CREATE TABLE t_w4 (c1 int PRIMARY KEY) ENGINE = InnoDB; --source include/sync_slave_sql_with_master.inc # Conspire to have an error in the second worker. INSERT INTO t_w2 VALUES(1); # Block all workers to apply INSERT statements LOCK TABLES t_w1 WRITE, t_w2 WRITE, t_w3 WRITE, t_w4 WRITE; --source include/rpl_connection_master.inc BEGIN; INSERT INTO t_w1 VALUES(1); INSERT INTO t_w1 VALUES(2); INSERT INTO t_w1 VALUES(3); INSERT INTO t_w1 VALUES(4); INSERT INTO t_w1 VALUES(5); COMMIT; BEGIN; INSERT INTO t_w2 VALUES(1); INSERT INTO t_w2 VALUES(2); COMMIT; BEGIN; INSERT INTO t_w3 VALUES(1); INSERT INTO t_w3 VALUES(2); INSERT INTO t_w3 VALUES(3); INSERT INTO t_w3 VALUES(4); COMMIT; INSERT INTO t_w4 VALUES(1); SET GLOBAL debug = @save_debug; --source include/save_master_pos.inc --source include/rpl_connection_slave.inc # Wait until all workers are blocked by LOCK TABLE t1 WRITE. It implies all # transactions are registered into the order commit queue. let $wait_condition= SELECT count(*) = 4 FROM INFORMATION_SCHEMA.PROCESSLIST WHERE State = 'Waiting for table metadata lock'; --source include/wait_condition.inc UNLOCK TABLES; --let $slave_sql_errno=1062 --source include/wait_for_slave_sql_error.inc --let $assert_text='Rows have been inserted to table t_w1' --let $assert_cond= ["SELECT COUNT(*) as count FROM t_w1", count, 1] = 5 --source include/assert.inc --let $assert_text='No rows have been inserted to table t_w2' --let $assert_cond= ["SELECT COUNT(*) as count FROM t_w2", count, 1] = 1 --source include/assert.inc --let $assert_text='No rows have been inserted to table t_w3' --let $assert_cond= ["SELECT COUNT(*) as count FROM t_w3", count, 1] = 0 --source include/assert.inc --let $assert_text='No rows have been inserted to table t_w4' --let $assert_cond= ["SELECT COUNT(*) as count FROM t_w4", count, 1] = 0 --source include/assert.inc DELETE FROM t_w2 WHERE c1 = 1; --source include/start_slave_sql.inc --source include/sync_slave_sql.inc --let $rpl_diff_statement= SELECT * FROM t_w1 --source include/rpl_diff.inc --let $rpl_diff_statement= SELECT * FROM t_w2 --source include/rpl_diff.inc --let $rpl_diff_statement= SELECT * FROM t_w3 --source include/rpl_diff.inc --let $rpl_diff_statement= SELECT * FROM t_w4 --source include/rpl_diff.inc --source include/rpl_connection_master.inc DROP TABLE t_w1, t_w2, t_w3, t_w4; --source include/rpl_end.inc