From: Jon Olav Hauglid Date: October 31 2012 1:06pm Subject: Re: Is it a lapsus calami in init_io_cache? List-Archive: http://lists.mysql.com/internals/38623 Message-Id: <50912267.5010004@oracle.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Hello, On 10/27/2012 07:33 AM, Mr. Left wrote: > Hi, all > I am reading the source code of mysql 5.6.6-m9, and i found the code below in function:init_io_cache > > /* Clear mutex so that safe_mutex will notice that it's not initialized */ > memset(&info->append_buffer_lock, 0, sizeof(info)); > > I want to know why use sizeof(info) instead of sizeof(info->append_buffer_lock) ? Good question :-) It certainly looks like a bug. Thanks for making us aware of this issue! I've reported it as http://bugs.mysql.com/bug.php?id=67437 --- Jon Olav Hauglid, Principal Software Engineer MySQL, Oracle.