1
0
mirror of https://github.com/MariaDB/server.git synced 2025-05-25 13:42:52 +03:00
Staale Smedseng 983770aa6a Bug #45058 init_available_charsets uses double checked locking
As documented in the bug report, the double checked locking
pattern has inherent issues, and cannot guarantee correct
initialization.

This patch replaces the logic in init_available_charsets()
with the use of pthread_once(3). A wrapper function,
my_pthread_once(), is introduced and is used in lieu of direct
calls to init_available_charsets(). Related defines
MY_PTHREAD_ONCE_* are also introduced.

For the Windows platform, the implementation in lp:sysbench is
ported. For single-thread use, a simple define calls the
function and sets the pthread_once control variable.

Charset initialization is modified to use my_pthread_once().
2009-12-12 19:11:25 +01:00
..
2009-02-04 04:54:05 +01:00
2006-12-01 23:09:14 +01:00
2003-02-01 00:42:26 +01:00
2006-12-01 23:09:14 +01:00
2009-02-07 16:50:31 +01:00
2005-01-13 19:24:54 +02:00
2006-02-02 16:22:31 +02:00
2006-12-02 06:06:31 +01:00
2006-12-23 20:17:15 +01:00
2006-12-23 20:17:15 +01:00
2006-12-01 23:09:14 +01:00
2003-03-31 18:09:13 -05:00
2006-12-01 23:09:14 +01:00
2006-12-01 23:09:14 +01:00
2006-12-01 23:09:14 +01:00
2007-12-14 18:23:11 +01:00
2006-12-01 23:09:14 +01:00
2006-12-01 23:09:14 +01:00
2006-12-01 23:09:14 +01:00
2006-12-01 23:09:14 +01:00
2006-12-01 23:09:14 +01:00
2006-12-01 23:09:14 +01:00
2006-12-01 23:09:14 +01:00
2006-12-01 23:09:14 +01:00
2006-12-01 23:09:14 +01:00