Server IP : 104.21.38.3 / Your IP : 172.71.124.8 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] SET @old_binlog_row_image= @@binlog_row_image; [connection slave] SET @old_binlog_row_image= @@binlog_row_image; [connection master] # 1. Initial setup includes setting the transaction isolation level to # 'READ-COMMITTED' on master and setting binlog_row_image = FULL using # rpl_row_img_set.inc. SET @old_transaction_isolation= @@session.transaction_isolation; SET SESSION transaction_isolation='READ-COMMITTED'; # Set the binlog_row_image to FULL on both master and slave. CON: 'master', IMG: 'FULL', RESTART SLAVE: 'N' SET SESSION binlog_row_image= 'FULL'; SET GLOBAL binlog_row_image= 'FULL'; FLUSH TABLES; SHOW VARIABLES LIKE 'binlog_row_image'; Variable_name Value binlog_row_image FULL CON: 'slave', IMG: 'FULL', RESTART SLAVE: 'Y' SET SESSION binlog_row_image= 'FULL'; SET GLOBAL binlog_row_image= 'FULL'; include/stop_slave.inc include/start_slave.inc FLUSH TABLES; SHOW VARIABLES LIKE 'binlog_row_image'; Variable_name Value binlog_row_image FULL # # 2. Create two tables with same structure and insert a row into a table. # CREATE DATABASE a; CREATE DATABASE b; CREATE TABLE a.test (id INT PRIMARY KEY, name VARCHAR(50) DEFAULT NULL, age BIGINT)ENGINE=InnoDB; CREATE TABLE b.test (id INT PRIMARY KEY, name VARCHAR(50) DEFAULT NULL, age BIGINT)ENGINE=InnoDB; include/sync_slave_sql_with_master.inc # # 3. Verify that INSERT..SELECT query is logged with full image on both # master and slave with the use of rpl_row_img_parts_master_slave.inc # file. # [connection master] SET sql_mode = 'NO_ENGINE_SUBSTITUTION'; Warnings: Warning 3090 Changing sql mode 'NO_AUTO_CREATE_USER' is deprecated. It will be removed in a future release. INSERT INTO a.test(id, age) VALUES (1,5); SET sql_mode = default; SET sql_mode = 'NO_ENGINE_SUBSTITUTION'; Warnings: Warning 3090 Changing sql mode 'NO_AUTO_CREATE_USER' is deprecated. It will be removed in a future release. INSERT INTO b.test(id,age) SELECT id , age FROM a.test; SET sql_mode = default; DROP DATABASE a; DROP DATABASE b; include/sync_slave_sql_with_master.inc [connection master] SET GLOBAL binlog_row_image= @old_binlog_row_image; SET SESSION binlog_row_image= @old_binlog_row_image; SET SESSION transaction_isolation= @old_transaction_isolation; [connection slave] SET GLOBAL binlog_row_image= @old_binlog_row_image; SET SESSION binlog_row_image= @old_binlog_row_image; include/rpl_end.inc