← Back to team overview

maria-developers team mailing list archive

[Branch ~maria-captains/maria/5.1] Rev 2788: Fixed bug in tc.log recovery code that caused crash_commit_before to sometimes crash.

 

------------------------------------------------------------
revno: 2788
committer: Michael Widenius <monty@xxxxxxxxxxxx>
branch nick: maria-5.1
timestamp: Mon 2010-01-04 20:25:29 +0200
message:
  Fixed bug in tc.log recovery code that caused crash_commit_before to sometimes crash.
modified:
  sql/log.cc


--
lp:maria
https://code.launchpad.net/~maria-captains/maria/5.1

Your team Maria developers is subscribed to branch lp:maria.
To unsubscribe from this branch go to https://code.launchpad.net/~maria-captains/maria/5.1/+edit-subscription.
=== modified file 'sql/log.cc'
--- sql/log.cc	2009-12-03 11:19:05 +0000
+++ sql/log.cc	2010-01-04 18:25:29 +0000
@@ -5154,8 +5154,8 @@
     pthread_mutex_init(&pg->lock, MY_MUTEX_INIT_FAST);
     pthread_cond_init (&pg->cond, 0);
     pg->start=(my_xid *)(data + i*tc_log_page_size);
-    pg->end=(my_xid *)(pg->start + tc_log_page_size);
     pg->size=pg->free=tc_log_page_size/sizeof(my_xid);
+    pg->end=pg->start + pg->size;
   }
   pages[0].size=pages[0].free=
                 (tc_log_page_size-TC_LOG_HEADER_SIZE)/sizeof(my_xid);