Commit 611bbcac authored by Nikita Malyavin's avatar Nikita Malyavin

MDEV-31059 "Slave SQL" errors upon concurrent DML and erroneous ALTER

Skip more rpl-related error handling.
Also move the error check inside if (table) -- otherwise the error
should be handled already.
parent 2c671c15
...@@ -1364,6 +1364,7 @@ drop table t; ...@@ -1364,6 +1364,7 @@ drop table t;
set debug_sync= reset; set debug_sync= reset;
disconnect con1; disconnect con1;
disconnect con2; disconnect con2;
NOT FOUND /Slave SQL/ in mysqld.1.err
# #
# End of 10.10 tests # End of 10.10 tests
# #
...@@ -1549,6 +1549,9 @@ drop table t; ...@@ -1549,6 +1549,9 @@ drop table t;
set debug_sync= reset; set debug_sync= reset;
--disconnect con1 --disconnect con1
--disconnect con2 --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 #
--echo # End of 10.10 tests --echo # End of 10.10 tests
--echo # --echo #
...@@ -5171,26 +5171,29 @@ int Rows_log_event::do_apply_event(rpl_group_info *rgi) ...@@ -5171,26 +5171,29 @@ int Rows_log_event::do_apply_event(rpl_group_info *rgi)
thd->clear_error(1); thd->clear_error(1);
error= 0; error= 0;
} }
} // if (table)
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.
if (unlikely(error)) Note: this applies to log_event_old.cc too.
{ /Sven
slave_rows_error_report(ERROR_LEVEL, error, rgi, thd, table, */
get_type_str(), thd->reset_current_stmt_binlog_format_row();
RPL_LOG_NAME, log_pos); thd->is_slave_error= 1;
/* /* remove trigger's tables */
@todo We should probably not call goto err;
reset_current_stmt_binlog_format_row() from here. }
} // if (table)
Note: this applies to log_event_old.cc too. DBUG_ASSERT(error == 0);
/Sven
*/
thd->reset_current_stmt_binlog_format_row();
thd->is_slave_error= 1;
/* remove trigger's tables */
goto err;
}
/* /*
Remove trigger's tables. In case of ONLINE ALTER TABLE, event doesn't own Remove trigger's tables. In case of ONLINE ALTER TABLE, event doesn't own
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment