Workaround the pthread_once_t static initialization. Per the
POSIX standard, reinitialization of a pthread_once is a gray area, but it is needed to support subsequent initializations of the client library.
This commit is contained in:
parent
8764cf69f9
commit
9e045298a5
@ -400,6 +400,7 @@ static void *cs_alloc(size_t size)
|
||||
|
||||
|
||||
static my_pthread_once_t charsets_initialized= MY_PTHREAD_ONCE_INIT;
|
||||
static my_pthread_once_t charsets_template= MY_PTHREAD_ONCE_INIT;
|
||||
|
||||
static void init_available_charsets(void)
|
||||
{
|
||||
@ -429,7 +430,7 @@ static void init_available_charsets(void)
|
||||
|
||||
void free_charsets(void)
|
||||
{
|
||||
charsets_initialized= MY_PTHREAD_ONCE_INIT;
|
||||
charsets_initialized= charsets_template;
|
||||
}
|
||||
|
||||
uint get_collation_number(const char *name)
|
||||
|
Loading…
x
Reference in New Issue
Block a user