diff --git a/mysql-test/r/rpl_loaddata_fatal.result b/mysql-test/r/rpl_loaddata_fatal.result index d682390b380..80def0255ea 100644 --- a/mysql-test/r/rpl_loaddata_fatal.result +++ b/mysql-test/r/rpl_loaddata_fatal.result @@ -85,3 +85,6 @@ Last_IO_Errno # Last_IO_Error # Last_SQL_Errno 1589 Last_SQL_Error Fatal error: Not enough memory +SET GLOBAL SQL_SLAVE_SKIP_COUNTER=1; +START SLAVE; +DROP TABLE t1; diff --git a/mysql-test/r/rpl_slave_skip.result b/mysql-test/r/rpl_slave_skip.result index 7663a20c3c4..b99ae3ad94a 100644 --- a/mysql-test/r/rpl_slave_skip.result +++ b/mysql-test/r/rpl_slave_skip.result @@ -72,8 +72,8 @@ Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master # Master_SSL_Verify_Server_Cert No -Last_IO_Errno 0 -Last_IO_Error +Last_IO_Errno # +Last_IO_Error # Last_SQL_Errno 0 Last_SQL_Error SET GLOBAL SQL_SLAVE_SKIP_COUNTER=1; @@ -136,8 +136,8 @@ Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master # Master_SSL_Verify_Server_Cert No -Last_IO_Errno 0 -Last_IO_Error +Last_IO_Errno # +Last_IO_Error # Last_SQL_Errno 0 Last_SQL_Error **** On Master **** diff --git a/mysql-test/t/rpl_loaddata_fatal.test b/mysql-test/t/rpl_loaddata_fatal.test index 2140cc39b24..dceee7a65af 100644 --- a/mysql-test/t/rpl_loaddata_fatal.test +++ b/mysql-test/t/rpl_loaddata_fatal.test @@ -1,4 +1,5 @@ source include/have_binlog_format_mixed_or_statement.inc; +source include/have_debug.inc; source include/master-slave.inc; # We do this little stunt to make sure that the slave has started @@ -17,3 +18,12 @@ LOAD DATA INFILE '../std_data_ln/rpl_loaddata.dat' INTO TABLE t1; connection slave; wait_for_slave_to_stop; source include/show_slave_status.inc; + +connection slave; +SET GLOBAL SQL_SLAVE_SKIP_COUNTER=1; +START SLAVE; + +connection master; +DROP TABLE t1; +sync_slave_with_master; + diff --git a/mysql-test/t/rpl_slave_skip.test b/mysql-test/t/rpl_slave_skip.test index 70a5b23c288..b19d6a2730b 100644 --- a/mysql-test/t/rpl_slave_skip.test +++ b/mysql-test/t/rpl_slave_skip.test @@ -27,7 +27,7 @@ connection slave; START SLAVE UNTIL MASTER_LOG_FILE='master-bin.000001', MASTER_LOG_POS=484; wait_for_slave_to_stop; --replace_result $MASTER_MYPORT MASTER_PORT ---replace_column 1 # 8 # 9 # 23 # 33 # +--replace_column 1 # 8 # 9 # 23 # 33 # 35 # 36 # query_vertical SHOW SLAVE STATUS; # Now we skip *one* table map event. If the execution starts right @@ -62,7 +62,7 @@ SET GLOBAL SQL_SLAVE_SKIP_COUNTER=1; START SLAVE; sync_with_master; --replace_result $MASTER_MYPORT MASTER_PORT ---replace_column 1 # 8 # 9 # 23 # 33 # +--replace_column 1 # 8 # 9 # 23 # 33 # 35 # 36 # query_vertical SHOW SLAVE STATUS; --echo **** On Master **** diff --git a/sql/log_event.cc b/sql/log_event.cc index 1b9dae56fde..658f33e7bed 100644 --- a/sql/log_event.cc +++ b/sql/log_event.cc @@ -5488,7 +5488,7 @@ Execute_load_query_log_event::do_apply_event(RELAY_LOG_INFO const *rli) buf= (char*) my_malloc(q_len + 1 - (fn_pos_end - fn_pos_start) + (FN_REFLEN + 10) + 10 + 8 + 5, MYF(MY_WME)); - DBUG_EXECUTE_IF("LOAD_DATA_INFILE_has_fatal_error", buf= NULL;); + DBUG_EXECUTE_IF("LOAD_DATA_INFILE_has_fatal_error", my_free(buf, MYF(0)); buf= NULL;); /* Replace filename and LOCAL keyword in query before executing it */ if (buf == NULL)