Bug #12109 possible locking bug in init_available_charset
Submitted: 22 Jul 2005 15:31 Modified: 7 Aug 2005 0:34
Reporter: Alexander Barkov
Status: Closed
Category:Server Severity:S3 (Non-critical)
Version: OS:
Assigned to: Alexander Barkov Target Version:

[22 Jul 2005 15:31] Alexander Barkov
Description:
From a user's letter:
>Reading the mysql code, I found some buggy locking code in init_available_charsets().
>The code fails to recheck the value of charset_initialized once it acquires
THR_LOCK_charset,
> so it is possible for a second thread to reinitialize the charset info while a first
thread is  accessing it.

How to repeat:
see code
[25 Jul 2005 18:33] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/internals/27559
[28 Jul 2005 5:35] Alexander Barkov
Reviewed by Sinisa.

Fixed in 4.1.14 and 5.0.11
[7 Aug 2005 0:34] Mike Hillyer
Documented in 4.1.14 and 5.0.11 changelogs:

<listitem><para>
 Two threads could potentially initialize different characters sets and overwrite each
other. (Bug #12109)
</para></listitem>