[MDEV-18966] Transaction recovery may be broken after upgrade to 10.3 Created: 2019-03-19  Updated: 2019-03-19  Resolved: 2019-03-19

Status: Closed
Project: MariaDB Server
Component/s: Storage Engine - InnoDB
Affects Version/s: 10.3.1, 10.4.0
Fix Version/s: 10.3.14, 10.4.4

Type: Bug Priority: Major
Reporter: Marko Mäkelä Assignee: Marko Mäkelä
Resolution: Fixed Votes: 0
Labels: recovery, upgrade

Issue Links:
Problem/Incident
is caused by MDEV-12288 Reset DB_TRX_ID when the history is r... Closed
Relates
relates to MDEV-15912 InnoDB: Failing assertion: purge_sys.... Closed
relates to MDEV-18960 Assertion `!omits_virtual_cols(*form-... Closed

 Description   

If an undo log page is reused after upgrading from an earlier version to MariaDB 10.3 or 10.4, the TRX_UNDO_PAGE_HDR + TRX_UNDO_PAGE_TYPE in that page could contain the value 1 (TRX_UNDO_INSERT), identifying that undo log page as insert_undo. This would cause an assertion failure on subsequent InnoDB startup if a transaction that was logged to such a page was persisted in an incomplete state:

10.3 397b6b13d062b28d12e9263710224bfb2269f19f

mysqld: /mariadb/10.3/storage/innobase/trx/trx0roll.cc:1034: trx_undo_rec_t *trx_roll_pop_top_rec_of_trx(trx_t *, roll_ptr_t *, mem_heap_t *): Assertion `undo == update || undo == temp' failed.

This can be prevented by initializing the field in trx_undo_reuse_cached(). Unfortunately, we cannot initialize the entire undo log page, because multiple undo log headers may coexist in the same page.



 Comments   
Comment by Marko Mäkelä [ 2019-03-19 ]

This report was spun off from MDEV-18960.

Fixing this does not appear to fix MDEV-15912, which is a related upgrade problem.

Generated at Thu Feb 08 08:48:05 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.