diff --git a/mysql-test/main/alter_table_online_debug.result b/mysql-test/main/alter_table_online_debug.result index 89e34a90490..5d1a7ffa72e 100644 --- a/mysql-test/main/alter_table_online_debug.result +++ b/mysql-test/main/alter_table_online_debug.result @@ -1364,6 +1364,7 @@ drop table t; set debug_sync= reset; disconnect con1; disconnect con2; +NOT FOUND /Slave SQL/ in mysqld.1.err # # End of 11.2 tests # diff --git a/mysql-test/main/alter_table_online_debug.test b/mysql-test/main/alter_table_online_debug.test index a3b97ce698d..1376fcb5d7a 100644 --- a/mysql-test/main/alter_table_online_debug.test +++ b/mysql-test/main/alter_table_online_debug.test @@ -1549,6 +1549,9 @@ drop table t; set debug_sync= reset; --disconnect con1 --disconnect con2 +let SEARCH_FILE= $MYSQLTEST_VARDIR/log/mysqld.1.err; +let SEARCH_PATTERN= Slave SQL; +--source include/search_pattern_in_file.inc --echo # --echo # End of 11.2 tests --echo # diff --git a/sql/log_event_server.cc b/sql/log_event_server.cc index 3cfe189e797..af7d7b3660a 100644 --- a/sql/log_event_server.cc +++ b/sql/log_event_server.cc @@ -5218,26 +5218,29 @@ int Rows_log_event::do_apply_event(rpl_group_info *rgi) thd->clear_error(1); error= 0; } + + if (unlikely(error)) + { + if (rpl_data.is_online_alter()) + goto err; + slave_rows_error_report(ERROR_LEVEL, error, rgi, thd, table, + get_type_str(), + RPL_LOG_NAME, log_pos); + /* + @todo We should probably not call + reset_current_stmt_binlog_format_row() from here. + + Note: this applies to log_event_old.cc too. + /Sven + */ + thd->reset_current_stmt_binlog_format_row(); + thd->is_slave_error= 1; + /* remove trigger's tables */ + goto err; + } } // if (table) - - if (unlikely(error)) - { - slave_rows_error_report(ERROR_LEVEL, error, rgi, thd, table, - get_type_str(), - RPL_LOG_NAME, log_pos); - /* - @todo We should probably not call - reset_current_stmt_binlog_format_row() from here. - - Note: this applies to log_event_old.cc too. - /Sven - */ - thd->reset_current_stmt_binlog_format_row(); - thd->is_slave_error= 1; - /* remove trigger's tables */ - goto err; - } + DBUG_ASSERT(error == 0); /* Remove trigger's tables. In case of ONLINE ALTER TABLE, event doesn't own