Hi, Sergey! On Dec 26, svoj@mariadb.org wrote:
revision-id: f65901eef28728212a350f61569dc884c747bffc parent(s): 8c616cd347aa7b3fcc2d8defb5e172ad316f432c committer: Sergey Vojtovich branch nick: 10.1 timestamp: 2014-12-26 23:38:45 +0400 message:
MDEV-7273 - 10.1 fails to start up during tc_log initializations on PPC64
log-tc-size is 24K by default. Page size is 64K on PPC64. But log-tc-size must be at least 3 x page size. This is enforced by TC_LOG_MMAP::open() with a comment: to guarantee non-empty pool.
This all makes server not startable in default configuration on PPC64.
Autosize log-tc-size, so that it's min value= page size * 3, default value= page size * 6, block size= page size.
diff --git a/sql/log.cc b/sql/log.cc index 66e1426..52c85d6 100644 --- a/sql/log.cc +++ b/sql/log.cc @@ -8780,6 +8779,7 @@ int TC_LOG_MMAP::sync() int TC_LOG_MMAP::unlog(ulong cookie, my_xid xid) { pending_cookies *full_buffer= NULL; + uint32 ncookies= tc_log_page_size / sizeof(my_xid); DBUG_ASSERT(*(my_xid *)(data+cookie) == xid);
/* @@ -8793,7 +8793,7 @@ int TC_LOG_MMAP::unlog(ulong cookie, my_xid xid) mysql_mutex_lock(&LOCK_pending_checkpoint); if (pending_checkpoint == NULL) { - uint32 size= sizeof(*pending_checkpoint); + uint32 size= sizeof(*pending_checkpoint) + sizeof(ulong) * (ncookies - 1); if (!(pending_checkpoint= (pending_cookies *)my_malloc(size, MYF(MY_ZEROFILL)))) { @@ -8804,8 +8804,7 @@ int TC_LOG_MMAP::unlog(ulong cookie, my_xid xid) }
pending_checkpoint->cookies[pending_checkpoint->count++]= cookie; - if (pending_checkpoint->count == sizeof(pending_checkpoint->cookies) / - sizeof(pending_checkpoint->cookies[0])) + if (pending_checkpoint->count == ncookies) { full_buffer= pending_checkpoint; pending_checkpoint= NULL; @@ -8839,7 +8838,7 @@ int TC_LOG_MMAP::unlog(ulong cookie, my_xid xid) if (count == 0) { uint i; - for (i= 0; i < sizeof(pending->cookies)/sizeof(pending->cookies[0]); ++i) + for (i= 0; i < tc_log_page_size / sizeof(my_xid); ++i)
I wonder why you didn't use ncookies here :)
delete_entry(pending->cookies[i]); my_free(pending); }
Regards, Sergei