mirror of
https://github.com/MariaDB/server.git
synced 2026-03-16 21:38:43 +01:00
Problem: ======== During ALTER TABLE ... IGNORE, a partial rollback on duplicate key error resets trx->undo_no to 0. The subsequent insert then enters the undo rewrite block with undo_no == 0, hitting the assertion that expected undo_no == 1. Solution: ========= Partial rollback which truncates the last insert undo record via trx_undo_truncate_end(), which rewrites TRX_UNDO_PAGE_FREE on the page. By checking trx->undo_no as part of the rewrite predicate, InnoDB correctly skips the rewrite logic after partial rollback. trx_undo_report_row_operation(): Pre-compute the full predicate (clear_ignore) before trx_undo_assign_low(), since old_offset and top_offset are not modified by that call. trx_undo_rewrite_ignore(): Extract the rewrite body into a separate ATTRIBUTE_COLD ATTRIBUTE_NOINLINE static function. |
||
|---|---|---|
| .. | ||
| trx0i_s.cc | ||
| trx0purge.cc | ||
| trx0rec.cc | ||
| trx0roll.cc | ||
| trx0rseg.cc | ||
| trx0sys.cc | ||
| trx0trx.cc | ||
| trx0undo.cc | ||