include/master-slave.inc [connection master] CALL mtr.add_suppression("Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT."); CALL mtr.add_suppression("Failed to open the existing info file"); CALL mtr.add_suppression("Error while reading from connection metadata repository"); CALL mtr.add_suppression("Failed to create a new info file"); CALL mtr.add_suppression("The replica coordinator and worker threads are stopped, possibly leaving data in inconsistent state"); start slave; Got one of the listed errors start slave; ERROR HY000: Could not initialize connection metadata structure; more error messages can be found in the MySQL error log CHANGE REPLICATION SOURCE to SOURCE_HOST='127.0.0.1',SOURCE_PORT=MASTER_PORT, SOURCE_USER='root'; ERROR HY000: Could not initialize connection metadata structure; more error messages can be found in the MySQL error log reset slave; Warnings: Warning 1287 'RESET SLAVE' is deprecated and will be removed in a future release. Please use RESET REPLICA instead CHANGE REPLICATION SOURCE to SOURCE_HOST='127.0.0.1',SOURCE_PORT=MASTER_PORT, SOURCE_USER='root'; Warnings: Note #### Sending passwords in plain text without SSL/TLS is extremely insecure. Note #### Storing MySQL user name or password information in the connection metadata repository is not secure and is therefore not recommended. Please consider using the USER and PASSWORD connection options for START REPLICA; see the 'START REPLICA Syntax' in the MySQL Manual for more information. reset master; start slave; Warnings: Warning 1287 'START SLAVE' is deprecated and will be removed in a future release. Please use START REPLICA instead include/wait_for_slave_to_start.inc create temporary table temp_table (a char(80) not null); insert into temp_table values ("testing temporary tables"); create table t1 (s text); insert into t1 values('Could not break slave'),('Tried hard'); include/sync_slave_sql_with_master.inc Master_Log_File = 'master-bin.000001' Relay_Master_Log_File = 'master-bin.000001' include/check_slave_is_running.inc include/assert.inc [Table t1 should contain the first inserted line] include/assert.inc [Table t1 should contain the second inserted line] flush logs; create table t2(m int not null auto_increment primary key); insert into t2 values (34),(67),(123); flush logs; show binary logs; Log_name File_size Encrypted master-bin.000001 # # master-bin.000002 # # master-bin.000003 # # create table t3 select * from temp_table; include/sync_slave_sql_with_master.inc include/assert.inc [Data in t3 should be equal to temp_table] drop table temp_table, t3; include/sync_slave_sql_with_master.inc insert into t2 values(1234); set insert_id=1234; insert into t2 values(NULL); call mtr.add_suppression("Replica SQL.*Error .Duplicate entry .1234. for key .t2.PRIMARY.. on query.* Error_code: MY-001062"); include/wait_for_slave_sql_error_and_skip.inc [errno=1062] include/sync_slave_sql_with_master.inc purge master logs to 'master-bin.000002'; show master logs; Log_name master-bin.000002 File_size # Encrypted # Log_name master-bin.000003 File_size # Encrypted # purge binary logs to 'master-bin.000002'; show binary logs; Log_name File_size Encrypted master-bin.000002 # # master-bin.000003 # # SELECT @time_for_purge:=DATE_ADD('tmpval', INTERVAL 1 SECOND); purge master logs before (@time_for_purge); Warnings: Warning 1868 file master-bin.000003 was not purged because it is the active log file. show binary logs; Log_name File_size Encrypted master-bin.000003 # # insert into t2 values (65); include/sync_slave_sql_with_master.inc Master_Log_File = 'master-bin.000003' Relay_Master_Log_File = 'master-bin.000003' include/check_slave_is_running.inc include/assert.inc [Table t2 should still contain the first inserted line after creation] include/assert.inc [Table t2 should contain the line inserted after the purge] include/assert.inc [Table t2 should still contain the second insert line after creation] include/assert.inc [Table t2 should still contain the third inserted line after creation] include/assert.inc [Table t2 should still contain the line from the duplicated key test] create temporary table temp_table (a char(80) not null); insert into temp_table values ("testing temporary tables part 2"); create table t3 (n int); include/assert.inc [Table t3 should contain 90 lines on the master] create table t4 select * from temp_table; include/sync_slave_sql_with_master.inc include/assert.inc [Data in t4 should be equal to temp_table] include/check_slave_is_running.inc lock tables t3 read; include/assert.inc [Table t3 should contain 90 lines on the slave] unlock tables; drop table if exists t1,t2,t3,t4; drop temporary table temp_table; include/sync_slave_sql_with_master.inc End of 4.1 tests show binlog events in 'non existing_binlog_file'; ERROR HY000: Error when executing command SHOW BINLOG EVENTS: Could not find target log purge master logs before now(); Warnings: Warning 1868 file slave-bin.000001 was not purged because it is the active log file. show binlog events in ''; ERROR HY000: Error when executing command SHOW BINLOG EVENTS: Could not find target log purge master logs before now(); Warnings: Warning 1868 file slave-bin.000001 was not purged because it is the active log file. End of 5.0 tests include/rpl_end.inc