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. mysql-test/extra/rpl_tests/rpl_row_basic.test: Testing that a failed update (that writes some rows to the transaction cache) does not cause the transaction cache to hold on to the data or forget to reset the transaction cache. sql/log.cc: Added call to remove pending event when the transaction cache is emptied instead of written to binary log. The call will also clear the outstanding table map count so that the cache is not left it in a state of "empty but not reset". Added function MYSQL_BIN_LOG::remove_pending_rows_event(). sql/log.h: Added function MYSQL_BIN_LOG::remove_pending_rows_event(). sql/sql_class.cc: Adding function THD::binlog_remove_pending_rows_event(). sql/sql_class.h: Adding function THD::binlog_remove_pending_rows_event().
Showing
Please register or sign in to comment