Fixed bug in tc.log recovery code that caused crash_commit_before to sometimes crash.

This commit is contained in:
Michael Widenius 2010-01-04 20:25:29 +02:00
parent 7ae95fdef2
commit fa60971037

View file

@ -5154,8 +5154,8 @@ int TC_LOG_MMAP::open(const char *opt_name)
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);