Re: Incorrect locking for global_query_id

Stewart Smith <[email protected]> Tue, 06 May 2014 10:28:12 -0500
Newsgroups gmane.comp.db.mysql.devel
Message-ID <[email protected]>
Tor Didriksen <[email protected]> writes:
>>      mysql_mutex_lock(&LOCK_thread_count);
>>      q= global_query_id;
>>      mysql_mutex_unlock(&LOCK_thread_count);
>>
>>
>> Which is incorrect.
>
> This goes all the way back to 5.0, when it was in fact correct.
> That mutex was used to protect all sorts of things, including 
> global_query_id.

Yeah, I have some dim horrific memories of that :)

>> It should at least by a my_atomic_load64 with the appropriate lock
>> things around it.
>
> Which is what we do in 5.7

yay! I hadn't actually checked :)


-- 
MySQL Internals Mailing List
For list archives: http://lists.mysql.com/internals
To unsubscribe:    http://lists.mysql.com/internals