mirror of
https://github.com/MariaDB/server.git
synced 2025-08-31 22:22:30 +03:00
Bug #32709: Assertion failed: trx_data->empty(), file log.cc
The assertion indicates that some data was left in the transaction cache when the server was shut down, which means that a previous statement did not commit or rollback correctly. What happened was that a bug in the rollback of a transactional table caused the transaction cache to be emptied, but not reset. The error can be triggered by having a failing UPDATE or INSERT, on a transactional table, causing an implicit rollback. Fixed by always flushing the pending event to reset the state properly.
This commit is contained in:
@@ -3502,6 +3502,21 @@ int THD::binlog_delete_row(TABLE* table, bool is_trans,
|
||||
}
|
||||
|
||||
|
||||
int THD::binlog_remove_pending_rows_event(bool clear_maps)
|
||||
{
|
||||
DBUG_ENTER(__FUNCTION__);
|
||||
|
||||
if (!mysql_bin_log.is_open())
|
||||
DBUG_RETURN(0);
|
||||
|
||||
mysql_bin_log.remove_pending_rows_event(this);
|
||||
|
||||
if (clear_maps)
|
||||
binlog_table_maps= 0;
|
||||
|
||||
DBUG_RETURN(0);
|
||||
}
|
||||
|
||||
int THD::binlog_flush_pending_rows_event(bool stmt_end)
|
||||
{
|
||||
DBUG_ENTER("THD::binlog_flush_pending_rows_event");
|
||||
|
Reference in New Issue
Block a user