stop slave; drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; reset master; reset slave; drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; start slave; DROP TABLE IF EXISTS test.t1; **** Create Table for Test 1 **** CREATE TABLE t1 ( a INT ) ENGINE=innodb; commit; **** Drop Table on slave for Test 1 **** DROP TABLE t1; **** Insert data on master for Test 1 **** BEGIN; INSERT INTO t1 VALUES (1); INSERT INTO t1 VALUES (2); INSERT INTO t1 VALUES (3); COMMIT; **** Connect to slave and show status Test 1 **** SHOW SLAVE STATUS; Slave_IO_State # Master_Host 127.0.0.1 Master_User root Master_Port MASTER_MYPORT Connect_Retry 1 Master_Log_File master-bin.000001 Read_Master_Log_Pos 613 Relay_Log_File slave-relay-bin.000003 Relay_Log_Pos 445 Relay_Master_Log_File master-bin.000001 Slave_IO_Running Yes Slave_SQL_Running No Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table mysql.% Last_Errno 1146 Last_Error Error 'Table 'test.t1' doesn't exist' on opening table `test`.`t1` Skip_Counter 0 Exec_Master_Log_Pos 299 Relay_Log_Space # Until_Condition None Until_Log_File Until_Log_Pos 0 Master_SSL_Allowed No Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master # Master_SSL_Verify_Server_Cert No **** Stop slave and set skip for Test 1 **** STOP SLAVE; SET GLOBAL SQL_SLAVE_SKIP_COUNTER=1; **** Start slave and show status for Test 1 **** START SLAVE; SHOW SLAVE STATUS; Slave_IO_State # Master_Host 127.0.0.1 Master_User root Master_Port MASTER_MYPORT Connect_Retry 1 Master_Log_File master-bin.000001 Read_Master_Log_Pos 613 Relay_Log_File slave-relay-bin.000003 Relay_Log_Pos 513 Relay_Master_Log_File master-bin.000001 Slave_IO_Running Yes Slave_SQL_Running No Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table mysql.% Last_Errno 1146 Last_Error Error 'Table 'test.t1' doesn't exist' on opening table `test`.`t1` Skip_Counter 0 Exec_Master_Log_Pos 367 Relay_Log_Space # Until_Condition None Until_Log_File Until_Log_Pos 0 Master_SSL_Allowed No Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master # Master_SSL_Verify_Server_Cert No **** Stop slave and set skip for Test 1 **** STOP SLAVE; SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2; **** Start slave and show status for Test 1 **** START SLAVE; SHOW SLAVE STATUS; Slave_IO_State # Master_Host 127.0.0.1 Master_User root Master_Port MASTER_MYPORT Connect_Retry 1 Master_Log_File master-bin.000001 Read_Master_Log_Pos 613 Relay_Log_File slave-relay-bin.000003 Relay_Log_Pos 586 Relay_Master_Log_File master-bin.000001 Slave_IO_Running Yes Slave_SQL_Running No Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table mysql.% Last_Errno 1146 Last_Error Error 'Table 'test.t1' doesn't exist' on opening table `test`.`t1` Skip_Counter 0 Exec_Master_Log_Pos 73 Relay_Log_Space # Until_Condition None Until_Log_File Until_Log_Pos 0 Master_SSL_Allowed No Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master # Master_SSL_Verify_Server_Cert No **** Stop slave and set skip for Test 1 **** STOP SLAVE; SET GLOBAL SQL_SLAVE_SKIP_COUNTER=3; **** Start slave and show status for Test 1 **** START SLAVE; SHOW SLAVE STATUS; Slave_IO_State # Master_Host 127.0.0.1 Master_User root Master_Port MASTER_MYPORT Connect_Retry 1 Master_Log_File master-bin.000001 Read_Master_Log_Pos 613 Relay_Log_File slave-relay-bin.000006 Relay_Log_Pos 252 Relay_Master_Log_File master-bin.000001 Slave_IO_Running Yes Slave_SQL_Running Yes Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table mysql.% Last_Errno 0 Last_Error Skip_Counter 0 Exec_Master_Log_Pos 613 Relay_Log_Space # Until_Condition None Until_Log_File Until_Log_Pos 0 Master_SSL_Allowed No Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master # Master_SSL_Verify_Server_Cert No **** cleanup for Test 1 **** drop table if exists t1; commit; drop table if exists t1; commit; RESET MASTER; STOP SLAVE; RESET SLAVE; START SLAVE; **** Create Tables for Test 2 **** CREATE TABLE t1 ( a INT ) ENGINE=innodb; CREATE TABLE t2 ( a INT AUTO_INCREMENT, KEY (a) ) ENGINE=innodb; commit; **** Create trigger for Test 2 **** create trigger t1_ai after insert on t1 for each row begin insert into t2 values (NULL); end| **** Drop Table t1 on slave for Test 2 **** DROP TABLE t1; **** Insert data on master for Test 2 **** BEGIN; INSERT INTO t1 VALUES (1); INSERT INTO t1 VALUES (2); COMMIT; SELECT * FROM t1 ORDER BY a; a 1 a 2 SELECT * FROM t2 ORDER BY a; a 1 a 2 **** Connect to slave and show status Test 2 **** SHOW SLAVE STATUS; Slave_IO_State # Master_Host 127.0.0.1 Master_User root Master_Port MASTER_MYPORT Connect_Retry 1 Master_Log_File master-bin.000001 Read_Master_Log_Pos 903 Relay_Log_File slave-relay-bin.000003 Relay_Log_Pos 662 Relay_Master_Log_File master-bin.000001 Slave_IO_Running Yes Slave_SQL_Running No Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table mysql.% Last_Errno 1146 Last_Error Error 'Table 'test.t1' doesn't exist' on opening table `test`.`t1` Skip_Counter 0 Exec_Master_Log_Pos 516 Relay_Log_Space # Until_Condition None Until_Log_File Until_Log_Pos 0 Master_SSL_Allowed No Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master # Master_SSL_Verify_Server_Cert No **** Stop slave and set skip for Test 2 **** STOP SLAVE; SET GLOBAL SQL_SLAVE_SKIP_COUNTER=1; **** Start slave and show status for Test 2 **** START SLAVE; SHOW SLAVE STATUS; Slave_IO_State # Master_Host 127.0.0.1 Master_User root Master_Port MASTER_MYPORT Connect_Retry 1 Master_Log_File master-bin.000001 Read_Master_Log_Pos 903 Relay_Log_File slave-relay-bin.000003 Relay_Log_Pos 730 Relay_Master_Log_File master-bin.000001 Slave_IO_Running Yes Slave_SQL_Running No Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table mysql.% Last_Errno 1146 Last_Error Error 'Table 'test.t1' doesn't exist' on opening table `test`.`t1` Skip_Counter 0 Exec_Master_Log_Pos 584 Relay_Log_Space # Until_Condition None Until_Log_File Until_Log_Pos 0 Master_SSL_Allowed No Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master # Master_SSL_Verify_Server_Cert No SELECT * FROM t2 ORDER BY a; **** Stop slave and set skip for Test 2 **** STOP SLAVE; SET GLOBAL SQL_SLAVE_SKIP_COUNTER=1; **** Start slave and show status for Test 2 **** START SLAVE; SHOW SLAVE STATUS; Slave_IO_State # Master_Host 127.0.0.1 Master_User root Master_Port MASTER_MYPORT Connect_Retry 1 Master_Log_File master-bin.000001 Read_Master_Log_Pos 903 Relay_Log_File slave-relay-bin.000003 Relay_Log_Pos 876 Relay_Master_Log_File master-bin.000001 Slave_IO_Running Yes Slave_SQL_Running No Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table mysql.% Last_Errno 1146 Last_Error Error 'Table 'test.t1' doesn't exist' on opening table `test`.`t1` Skip_Counter 0 Exec_Master_Log_Pos 146 Relay_Log_Space # Until_Condition None Until_Log_File Until_Log_Pos 0 Master_SSL_Allowed No Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master # Master_SSL_Verify_Server_Cert No SELECT * FROM t2 ORDER BY a; a 1 **** Stop slave and set skip for Test 2 **** STOP SLAVE; SET GLOBAL SQL_SLAVE_SKIP_COUNTER=1; **** Start slave and show status for Test 2 **** START SLAVE; SHOW SLAVE STATUS; Slave_IO_State # Master_Host 127.0.0.1 Master_User root Master_Port MASTER_MYPORT Connect_Retry 1 Master_Log_File master-bin.000001 Read_Master_Log_Pos 903 Relay_Log_File slave-relay-bin.000006 Relay_Log_Pos 252 Relay_Master_Log_File master-bin.000001 Slave_IO_Running Yes Slave_SQL_Running Yes Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table mysql.% Last_Errno 0 Last_Error Skip_Counter 0 Exec_Master_Log_Pos 903 Relay_Log_Space # Until_Condition None Until_Log_File Until_Log_Pos 0 Master_SSL_Allowed No Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master # Master_SSL_Verify_Server_Cert No SELECT * FROM t2 ORDER BY a; a 1 a 2 **** cleanup for Test 2 **** drop table if exists t1; drop table if exists t2; commit; drop table if exists t1; drop table if exists t2; commit; RESET MASTER; STOP SLAVE; RESET SLAVE; START SLAVE; reset master; create table t1(n int) engine=innodb; insert into t1 values (1); drop table t1; SHOW BINLOG EVENTS FROM 0; Log_name master-bin.000001 Pos 4 Event_type Format_desc Server_id 1 End_log_pos 106 Info Server ver: 5.1.18-beta-log, Binlog ver: 4 Log_name master-bin.000001 Pos 106 Event_type Query Server_id 1 End_log_pos 205 Info use `test`; create table t1(n int) engine=innodb Log_name master-bin.000001 Pos 205 Event_type Table_map Server_id 1 End_log_pos 39 Info table_id: 20 (test.t1) Log_name master-bin.000001 Pos 244 Event_type Write_rows Server_id 1 End_log_pos 73 Info table_id: 20 flags: STMT_END_F Log_name master-bin.000001 Pos 278 Event_type Xid Server_id 1 End_log_pos 305 Info COMMIT /* xid=84 */ Log_name master-bin.000001 Pos 305 Event_type Query Server_id 1 End_log_pos 381 Info use `test`; drop table t1