summaryrefslogtreecommitdiff
path: root/storage/innobase/srv/srv0start.cc
diff options
context:
space:
mode:
Diffstat (limited to 'storage/innobase/srv/srv0start.cc')
-rw-r--r--storage/innobase/srv/srv0start.cc11
1 files changed, 10 insertions, 1 deletions
diff --git a/storage/innobase/srv/srv0start.cc b/storage/innobase/srv/srv0start.cc
index 75116a0201a..05d17f9b883 100644
--- a/storage/innobase/srv/srv0start.cc
+++ b/storage/innobase/srv/srv0start.cc
@@ -398,7 +398,7 @@ static dberr_t srv_undo_delete_old_tablespaces()
}
/** Recreate the undo log tablespaces */
-static dberr_t srv_undo_tablespaces_reinit()
+ATTRIBUTE_COLD static dberr_t srv_undo_tablespaces_reinit()
{
mtr_t mtr;
dberr_t err;
@@ -431,6 +431,15 @@ static dberr_t srv_undo_tablespaces_reinit()
if (!first_rseg_hdr)
goto func_exit;
+ if (UNIV_UNLIKELY(mach_read_from_4(TRX_RSEG + TRX_RSEG_FORMAT +
+ first_rseg_hdr->page.frame)))
+ trx_rseg_format_upgrade(first_rseg_hdr, &mtr);
+
+ mtr.write<8,mtr_t::MAYBE_NOP>(*first_rseg_hdr,
+ TRX_RSEG + TRX_RSEG_MAX_TRX_ID +
+ first_rseg_hdr->page.frame,
+ trx_sys.get_max_trx_id() - 1);
+
/* Reset TRX_SYS page */
err= trx_sys.reset_page(&mtr);