Server IP : 172.67.216.182 / Your IP : 172.70.143.132 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/extra/rpl_tests/ |
Upload File : |
# ==== Purpose ==== # # Auxiliary file used by suite/rpl/t/rpl_test_framework.test # # The purpose is to check that the sync chain generated in # rpl_change_topology.inc (invoked from rpl_init.inc) is correct. This # is done in two ways: # (1) Print the sync chain. # (2) Execute a statement and verify that it replicates to all slaves. # # # ==== Implementation ==== # # Does this: # (1) Set up a given replication topology (rpl_init.inc) # (2) Print $rpl_sync_chain # (3) Execute "DELETE FROM t1" and then "INSERT INTO t1" on the master # (4) Sync and compare all servers. # (5) Clean up the replication topology (rpl_end.inc) # # (Technical detail: Since DELETE FROM t1 is not executed at the end, # some servers may have rows left in t1 from a previous invocation of # rpl_test_framework.inc. Therefore, this file will only work in # statement mode where "DELETE FROM t1" removes rows that exist on # slave but not on master.) # # # ==== Usage ==== # # --let $rpl_server_count= <number> # --let $rpl_topology= <topology specification> # --let $masters= <list of masters> # [--let $rpl_diff_servers= <list of servers>] # --source extra/rpl_tests/rpl_test_framework.inc # # Parameters: # $next_number # The INSERT statement will insert $next_number into t1, and # $next_number will increase by 1. # # $rpl_server_count, $rpl_topology: # See include/rpl_init.inc # # $masters # This should be a list of numbers, each identifying a server. # The DELETE and INSERT statements will be executed on all servers # in the list. # # $rpl_diff_servers # See include/rpl_diff.inc --source include/rpl_init.inc --source include/rpl_generate_sync_chain.inc --echo rpl_sync_chain= '$rpl_sync_chain' --inc $next_number # Iterate over masters while ($masters) { --let $master_i= `SELECT SUBSTRING_INDEX('$masters', ',', 1)` --let $masters= `SELECT SUBSTRING('$masters', LENGTH('$master_i') + 2)` # Connect to master and execute statement --let $rpl_connection_name= server_$master_i --source include/rpl_connection.inc DELETE FROM t1; --eval INSERT INTO t1 VALUES ($next_number) } --source include/rpl_sync.inc # Compare all servers. --let $diff_tables= server_$rpl_server_count:t1 --let $server_i= $rpl_server_count --dec $server_i while ($server_i) { --let $diff_tables= server_$server_i:t1,$diff_tables --dec $server_i } --source include/diff_tables.inc --let $diff_servers= --let $masters= --source include/rpl_end.inc