Current Path : /home/usr.opt/mysql57/mysql-test/suite/rpl/r/ |
FreeBSD hs32.drive.ne.jp 9.1-RELEASE FreeBSD 9.1-RELEASE #1: Wed Jan 14 12:18:08 JST 2015 root@hs32.drive.ne.jp:/sys/amd64/compile/hs32 amd64 |
Current File : //home/usr.opt/mysql57/mysql-test/suite/rpl/r/rpl_gtid_purged_fail_to_connect.result |
# # 1) Create a master-slave setup. # 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] # # 2) Create a table on master, sync it, stop the slave threads and dump # thread on master. # CREATE TABLE t1 (a INT) ENGINE = InnoDB; include/sync_slave_sql_with_master.inc include/stop_slave.inc [connection master] include/stop_dump_threads.inc # # 3) On master, generate a transaction, flush the binary log and execute # PURGE BINARY LOGS TO command so that only remaining binlog only contains # transaction UUID:3. # INSERT INTO t1 VALUES (1); FLUSH LOGS; INSERT INTO t1 VALUES (2); PURGE BINARY LOGS TO 'master-bin.000002'; include/assert.inc [PURGE BINARY LOGS successfully removed all but the latest file] # # 4) Verify that the slave fails if it tries to connect using CHANGE # MASTER TO MASTER_AUTO_POSITION=1. # [connection slave] CHANGE MASTER TO MASTER_AUTO_POSITION = 1; START SLAVE; include/wait_for_slave_io_error.inc [errno=1236 # ER_MASTER_FATAL_ERROR_READING_BINLOG] include/stop_slave_sql.inc [connection master] SET @saved_debug= @@GLOBAL.DEBUG; SET GLOBAL DEBUG= '+d,simulate_long_missing_gtids'; [connection slave] START SLAVE; include/wait_for_slave_io_error.inc [errno=1236 # ER_MASTER_FATAL_ERROR_READING_BINLOG] include/stop_slave_sql.inc [connection master] SET GLOBAL DEBUG= @saved_debug; [connection slave] # # 5) Verify that appropriate messages are logged into master's and slave's # error log. # include/assert_grep.inc [Found the suggestions to extract the missing GTIDs in the master error log.] include/assert_grep.inc [Found a message about the long GTIDs in the slave error log.] # # 6) Verify that replication succeeds if it tries to connect using CHANGE # MASTER TO MASTER_LOG_POS. # CHANGE MASTER TO MASTER_LOG_FILE = 'MASTER_FILE', MASTER_LOG_POS = MASTER_POS, MASTER_AUTO_POSITION = 0; include/start_slave.inc include/assert.inc [t1 should contain only one row with the value 2] include/stop_slave.inc include/assert_grep.inc [Found warning containing lost GTIDs in the master error log.] include/assert_grep.inc [Found warning containing lost GTIDs in the slave error log.] [connection master] CALL mtr.add_suppression("Cannot replicate to server.*server has purged required binary logs.*"); [connection slave] CALL mtr.add_suppression("Got fatal error 1236 from master.*Replicate the missing transactions from elsewhere"); # # 7) Cleanup. # [connection slave] RESET MASTER; RESET SLAVE; [connection master] RESET MASTER; [connection slave] include/start_slave.inc [connection master] DROP TABLE t1; include/sync_slave_sql_with_master.inc include/rpl_end.inc