[Commits] Rev 3015: Fixed recovery crash lp:814806 "Unclean shutdown corrupted Aria table blocking startup" in lp:maria/5.2

Michael Widenius monty at askmonty.org
Mon Aug 15 23:53:56 EEST 2011


At lp:maria/5.2

------------------------------------------------------------
revno: 3015
revision-id: monty at askmonty.org-20110815205355-q9eqtu8j10032jhe
parent: monty at askmonty.org-20110815174229-wpoosuebqah0hjlc
fixes bug(s): https://launchpad.net/bugs/814806
committer: Michael Widenius <monty at askmonty.org>
branch nick: maria-5.2
timestamp: Mon 2011-08-15 23:53:55 +0300
message:
  Fixed recovery crash lp:814806 "Unclean shutdown corrupted Aria table blocking startup"
-------------- next part --------------
=== modified file 'storage/maria/ma_recovery.c'
--- a/storage/maria/ma_recovery.c	2011-06-13 09:46:11 +0000
+++ b/storage/maria/ma_recovery.c	2011-08-15 20:53:55 +0000
@@ -320,25 +320,32 @@ int maria_apply_log(LSN from_lsn, LSN en
   skip_DDLs= skip_DDLs_arg;
   skipped_undo_phase= 0;
 
+  trnman_init(max_trid_in_control_file);
+
   if (from_lsn == LSN_IMPOSSIBLE)
   {
     if (last_checkpoint_lsn == LSN_IMPOSSIBLE)
     {
       from_lsn= translog_first_lsn_in_log();
       if (unlikely(from_lsn == LSN_ERROR))
+      {
+        trnman_destroy();
         goto err;
+      }
     }
     else
     {
       from_lsn= parse_checkpoint_record(last_checkpoint_lsn);
       if (from_lsn == LSN_ERROR)
+      {
+        trnman_destroy();
         goto err;
+      }
     }
   }
 
   now= my_getsystime();
   in_redo_phase= TRUE;
-  trnman_init(max_trid_in_control_file);
   if (run_redo_phase(from_lsn, end_lsn, apply))
   {
     ma_message_no_user(0, "Redo phase failed");



More information about the commits mailing list