1CALL mtr.add_suppression("Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT."); 2CALL mtr.add_suppression("Failed to open the existing info file"); 3CALL mtr.add_suppression("Error while reading from master info file"); 4CALL mtr.add_suppression("Failed to create a new info file"); 5CALL mtr.add_suppression("The slave coordinator and worker threads are stopped, possibly leaving data in inconsistent state"); 6start slave; 7Got one of the listed errors 8start slave; 9ERROR HY000: Could not initialize master info structure; more error messages can be found in the MySQL error log 10change master to master_host='127.0.0.1',master_port=MASTER_PORT, master_user='root'; 11ERROR HY000: Could not initialize master info structure; more error messages can be found in the MySQL error log 12reset slave; 13change master to master_host='127.0.0.1',master_port=MASTER_PORT, master_user='root'; 14Warnings: 15Note #### Sending passwords in plain text without SSL/TLS is extremely insecure. 16Note #### 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. 17reset master; 18start slave; 19include/wait_for_slave_to_start.inc 20create temporary table temp_table (a char(80) not null); 21insert into temp_table values ("testing temporary tables"); 22create table t1 (s text); 23insert into t1 values('Could not break slave'),('Tried hard'); 24include/sync_slave_sql_with_master.inc 25Master_Log_File = 'master-bin.000001' 26Relay_Master_Log_File = 'master-bin.000001' 27include/check_slave_is_running.inc 28include/assert.inc [Table t1 should contain the first inserted line] 29include/assert.inc [Table t1 should contain the second inserted line] 30flush logs; 31create table t2(m int not null auto_increment primary key); 32insert into t2 values (34),(67),(123); 33flush logs; 34show binary logs; 35Log_name File_size 36master-bin.000001 # 37master-bin.000002 # 38master-bin.000003 # 39create table t3 select * from temp_table; 40include/sync_slave_sql_with_master.inc 41include/assert.inc [Data in t3 should be equal to temp_table] 42drop table temp_table, t3; 43insert into t2 values(1234); 44set insert_id=1234; 45insert into t2 values(NULL); 46call mtr.add_suppression("Slave SQL.*Error .Duplicate entry .1234. for key .PRIMARY.. on query.* Error_code: 1062"); 47include/wait_for_slave_sql_error_and_skip.inc [errno=1062] 48include/sync_slave_sql_with_master.inc 49purge master logs to 'master-bin.000002'; 50show master logs; 51Log_name master-bin.000002 52File_size # 53Log_name master-bin.000003 54File_size # 55purge binary logs to 'master-bin.000002'; 56show binary logs; 57Log_name File_size 58master-bin.000002 # 59master-bin.000003 # 60SELECT @time_for_purge:=DATE_ADD('tmpval', INTERVAL 1 SECOND); 61purge master logs before (@time_for_purge); 62Warnings: 63Warning 1868 file master-bin.000003 was not purged because it is the active log file. 64show binary logs; 65Log_name File_size 66master-bin.000003 # 67insert into t2 values (65); 68include/sync_slave_sql_with_master.inc 69Master_Log_File = 'master-bin.000003' 70Relay_Master_Log_File = 'master-bin.000003' 71include/check_slave_is_running.inc 72include/assert.inc [Table t2 should still contain the first inserted line after creation] 73include/assert.inc [Table t2 should contain the line inserted after the purge] 74include/assert.inc [Table t2 should still contain the second insert line after creation] 75include/assert.inc [Table t2 should still contain the third inserted line after creation] 76include/assert.inc [Table t2 should still contain the line from the duplicated key test] 77create temporary table temp_table (a char(80) not null); 78insert into temp_table values ("testing temporary tables part 2"); 79create table t3 (n int); 80include/assert.inc [Table t3 should contain 90 lines on the master] 81create table t4 select * from temp_table; 82include/sync_slave_sql_with_master.inc 83include/assert.inc [Data in t4 should be equal to temp_table] 84include/check_slave_is_running.inc 85lock tables t3 read; 86include/assert.inc [Table t3 should contain 90 lines on the slave] 87unlock tables; 88drop table if exists t1,t2,t3,t4; 89drop temporary table temp_table; 90include/sync_slave_sql_with_master.inc 91End of 4.1 tests 92show binlog events in 'non existing_binlog_file'; 93ERROR HY000: Error when executing command SHOW BINLOG EVENTS: Could not find target log 94purge master logs before now(); 95Warnings: 96Warning 1868 file slave-bin.000001 was not purged because it is the active log file. 97show binlog events in ''; 98ERROR HY000: Error when executing command SHOW BINLOG EVENTS: Could not find target log 99purge master logs before now(); 100Warnings: 101Warning 1868 file slave-bin.000001 was not purged because it is the active log file. 102End of 5.0 tests 103include/stop_slave.inc 104