Server IP : 104.21.38.3 / Your IP : 162.158.189.64 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/r/ |
Upload File : |
include/master-slave.inc Warnings: Note #### Sending passwords in plain text without SSL/TLS is extremely insecure. Note #### Storing MySQL user name or password information in the master info repository is not secure and is therefore not recommended. Please consider using the USER and PASSWORD connection options for START SLAVE; see the 'START SLAVE Syntax' in the MySQL Manual for more information. [connection master] [connection slave] TRUNCATE TABLE performance_schema.events_transactions_current; [connection master] CREATE TABLE t ( f INT) ENGINE=INNODB; XA START 'xatest'; INSERT INTO t VALUES (10); XA END 'xatest'; XA PREPARE 'xatest'; [connection slave] # Wait until SQL thread reaches desired master binlog position include/wait_for_slave_param.inc [Relay_Master_Log_File] include/wait_for_slave_param.inc [Exec_Master_Log_Pos] XA RECOVER; formatID gtrid_length bqual_length data 1 6 0 xatest #################################################################### # Asserting XA_STATE is PREPARED on Slave #################################################################### include/assert.inc [Verify that XA_STATE is set PREPARED.] [connection master] XA COMMIT 'xatest'; include/sync_slave_sql_with_master.inc XA RECOVER; formatID gtrid_length bqual_length data #################################################################### # Asserting XA_STATE is COMMITTED on Slave #################################################################### include/assert.inc [Verify that XA_STATE is set COMMITTED.] include/assert.inc [Expected gtid is MASTER_UUID:3] include/diff_tables.inc [master:t,slave:t] [connection master] DROP TABLE t; include/sync_slave_sql_with_master.inc include/rpl_reset.inc #################################################################### # Test Case 2: Enable Multithreaded Slave with slave_parallel_type as # DATABASE. Verify that slave displays appropriate XA_STATE in # performance schema table, post XA PREPARE AND XA COMMIT command # execution. #################################################################### [connection slave] SET @save_slave_parallel_workers=@@global.slave_parallel_workers; SET @slave_parallel_type=@@global.slave_parallel_type; include/stop_slave.inc SET GLOBAL slave_parallel_workers=4; SET GLOBAL slave_parallel_type='DATABASE'; include/start_slave.inc [connection slave] TRUNCATE TABLE performance_schema.events_transactions_current; [connection master] CREATE TABLE t ( f INT) ENGINE=INNODB; XA START 'xatest'; INSERT INTO t VALUES (10); XA END 'xatest'; XA PREPARE 'xatest'; [connection slave] # Wait until SQL thread reaches desired master binlog position include/wait_for_slave_param.inc [Relay_Master_Log_File] include/wait_for_slave_param.inc [Exec_Master_Log_Pos] XA RECOVER; formatID gtrid_length bqual_length data 1 6 0 xatest #################################################################### # Asserting XA_STATE is PREPARED on Slave #################################################################### include/assert.inc [Verify that XA_STATE is set PREPARED.] [connection master] XA COMMIT 'xatest'; include/sync_slave_sql_with_master.inc XA RECOVER; formatID gtrid_length bqual_length data #################################################################### # Asserting XA_STATE is COMMITTED on Slave #################################################################### include/assert.inc [Verify that XA_STATE is set COMMITTED.] include/assert.inc [Expected gtid is MASTER_UUID:3] include/diff_tables.inc [master:t,slave:t] [connection master] DROP TABLE t; include/sync_slave_sql_with_master.inc include/rpl_reset.inc #################################################################### # Test Case 3: Enable Multithreaded Slave with slave_parallel_type as # LOGICAL_CLOCK. Verify that slave displays appropriate XA_STATE in # performance schema table, post XA PREPARE AND XA COMMIT command # execution. #################################################################### include/stop_slave.inc SET GLOBAL slave_parallel_workers=4; SET GLOBAL slave_parallel_type='LOGICAL_CLOCK'; include/start_slave.inc [connection slave] TRUNCATE TABLE performance_schema.events_transactions_current; [connection master] CREATE TABLE t ( f INT) ENGINE=INNODB; XA START 'xatest'; INSERT INTO t VALUES (10); XA END 'xatest'; XA PREPARE 'xatest'; [connection slave] # Wait until SQL thread reaches desired master binlog position include/wait_for_slave_param.inc [Relay_Master_Log_File] include/wait_for_slave_param.inc [Exec_Master_Log_Pos] XA RECOVER; formatID gtrid_length bqual_length data 1 6 0 xatest #################################################################### # Asserting XA_STATE is PREPARED on Slave #################################################################### include/assert.inc [Verify that XA_STATE is set PREPARED.] [connection master] XA COMMIT 'xatest'; include/sync_slave_sql_with_master.inc XA RECOVER; formatID gtrid_length bqual_length data #################################################################### # Asserting XA_STATE is COMMITTED on Slave #################################################################### include/assert.inc [Verify that XA_STATE is set COMMITTED.] include/assert.inc [Expected gtid is MASTER_UUID:3] include/diff_tables.inc [master:t,slave:t] [connection master] DROP TABLE t; include/sync_slave_sql_with_master.inc [connection slave] include/stop_slave.inc set @@global.slave_parallel_workers= @save_slave_parallel_workers; set @@global.slave_parallel_type= @slave_parallel_type; include/start_slave.inc include/rpl_end.inc