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:
Davi Arnaut 2010-02-26 23:09:36 -03:00
parent 8764cf69f9
commit 9e045298a5

View File

@ -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)