List:Commits« Previous MessageNext Message »
From:Davi Arnaut Date:February 27 2010 2:09am
Subject:bzr commit into mysql-5.1-bugteam branch (davi:3366)
View as plain text  
# At a local mysql-5.1-bugteam repository of davi

 3366 Davi Arnaut	2010-02-26
      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.

    modified:
      mysys/charset.c
=== modified file 'mysys/charset.c'
--- a/mysys/charset.c	2010-02-26 14:30:14 +0000
+++ b/mysys/charset.c	2010-02-27 02:09:36 +0000
@@ -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)


Attachment: [text/bzr-bundle] bzr/davi.arnaut@sun.com-20100227020936-g72icho7kos53xgv.bundle
Thread
bzr commit into mysql-5.1-bugteam branch (davi:3366)Davi Arnaut27 Feb