Server IP : 104.21.38.3 / Your IP : 162.158.190.7 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 checks that in a dual-head setup # A->B->A, where A has --log-slave-updates (why would it? # assume that there is a C as slave of A), # then the Exec_master_log_pos of SHOW SLAVE STATUS does # not stay too low on B(BUG#13023 due to events ignored because # of their server id). # It also will test BUG#13861. --source include/not_group_replication_plugin.inc source include/have_innodb.inc; # Until option of START SLAVE is not yet supported by MTS source include/not_mts_slave_parallel_workers.inc; --let $rpl_topology= 1->2->1 --source include/rpl_init.inc # now we test it connection server_2; create table t1 (n int); let $master_log_file= query_get_value(SHOW MASTER STATUS, File, 1); let $master_log_pos_1= query_get_value(SHOW MASTER STATUS, Position, 1); let $master_log_pos_1= `SELECT $master_log_pos_1 + 3`; --let $sync_slave_connection= server_1 --source include/sync_slave_sql_with_master.inc # # BUG#13861 - START SLAVE UNTIL may stop 1 evnt too late if # log-slave-updates and circul repl # source include/stop_slave.inc; create table t2 (n int); # create one ignored event --let $sync_slave_connection= server_2 --source include/sync_slave_sql_with_master.inc show tables; create table t3 (n int) engine=innodb; let $master_log_pos_2= query_get_value(SHOW MASTER STATUS, Position, 1); let $master_log_pos_2= `SELECT $master_log_pos_2 + 5`; # there is the event: Gtid_log_event --let $master_log_pos_2= `SELECT $master_log_pos_2 + 57` set @a=1; insert into t3 values(@a); let $master_log_pos_3= query_get_value(SHOW MASTER STATUS, Position, 1); let $master_log_pos_3= `SELECT $master_log_pos_3 + 5`; # there is the event: Gtid_log_event --let $master_log_pos_3= `SELECT $master_log_pos_3 + 57` begin; insert into t3 values(2); insert into t3 values(3); commit; insert into t3 values(4); connection server_1; # bug is that START SLAVE UNTIL may stop too late, we test that by # asking it to stop before creation of t3. --replace_result $master_log_file MASTER_LOG_FILE $master_log_pos_1 MASTER_LOG_POS eval start slave until master_log_file="$master_log_file",master_log_pos=$master_log_pos_1; --source include/wait_for_slave_sql_to_stop.inc # then BUG#13861 causes t3 to show up below (because stopped too # late). show tables; # ensure that we do not break set @a=1; insert into t3 values(@a); --replace_result $master_log_file MASTER_LOG_FILE $master_log_pos_2 MASTER_LOG_POS eval start slave until master_log_file="$master_log_file",master_log_pos=$master_log_pos_2; --source include/wait_for_slave_sql_to_stop.inc select * from t3; # ensure that we do not break transaction --replace_result $master_log_file MASTER_LOG_FILE $master_log_pos_3 MASTER_LOG_POS eval start slave until master_log_file="$master_log_file",master_log_pos=$master_log_pos_3; --source include/wait_for_slave_sql_to_stop.inc select * from t3; source include/start_slave.inc; # BUG#13023 is that Exec_master_log_pos may stay too low "forever": connection server_1; create table t4 (n int); # create 3 ignored events create table t5 (n int); create table t6 (n int); --let $sync_slave_connection= server_2 --source include/sync_slave_sql_with_master.inc # then BUG#13023 caused hang below ("master" looks behind, while it's # not in terms of updates done). --let $sync_slave_connection= server_1 --source include/sync_slave_sql_with_master.inc show tables; # cleanup drop table t1, t2, t3, t4, t5, t6; --source include/rpl_end.inc # In this test, the master is also a slave (1->2->1). This configuration # may cause failure in an immediate test which expects only 1->2 configuration # Use force_restart to avoid that situation. --source include/force_restart.inc