From 6058b654f798d094a475a3306bd8ecd3b6e865a0 Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 20 Nov 2012 14:20:26 +0100 Subject: [PATCH] MDEV-3861: Assertion in TC_LOG_MMAP. Root cause was that number of entries in commit checkpoint buffer was bigger than total available entries in the mmap()'ed score file. This causes TC_LOG_MMAP to run out of entries before even the first checkpoint is started, which causes a hang. Fixed by making sure we have fewer entries within one commit checkpoint than total available scorefile entries. Another part of this bug was discovery of severel unrelated bugs in TC_LOG_MMAP dating back to 5.1. These were fixed in 5.1 and will be merged up (the problem this patch fixes exists only in 10.0). --- sql/log.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sql/log.h b/sql/log.h index 0e887b48462..3959411d83a 100644 --- a/sql/log.h +++ b/sql/log.h @@ -118,7 +118,7 @@ class TC_LOG_MMAP: public TC_LOG struct pending_cookies { uint count; uint pending_count; - ulong cookies[TC_LOG_PAGE_SIZE]; + ulong cookies[TC_LOG_PAGE_SIZE/sizeof(my_xid)]; }; private: