Commit 9e045298 authored by Davi Arnaut's avatar Davi Arnaut

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.
parent 8764cf69
......@@ -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)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment