diff options
author | Davi Arnaut <Davi.Arnaut@Sun.COM> | 2010-02-26 23:09:36 -0300 |
---|---|---|
committer | Davi Arnaut <Davi.Arnaut@Sun.COM> | 2010-02-26 23:09:36 -0300 |
commit | a3f59677f886a45e0d0b1b5cf0225966ecf6ee15 (patch) | |
tree | 74ef9987f54e39eb4ac1d3dbbc1a6bb57637f1db /mysys/charset.c | |
parent | 684b293c22c595c780567eb50b3fcdb73f56e002 (diff) | |
download | mariadb-git-a3f59677f886a45e0d0b1b5cf0225966ecf6ee15.tar.gz |
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.
mysys/charset.c:
Reinitialize a pthread_once_t variable.
Diffstat (limited to 'mysys/charset.c')
-rw-r--r-- | mysys/charset.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/mysys/charset.c b/mysys/charset.c index 584b33b2d6a..9678febc9ba 100644 --- a/mysys/charset.c +++ b/mysys/charset.c @@ -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) |