summaryrefslogtreecommitdiff
path: root/mysys/charset.c
diff options
context:
space:
mode:
authorAlexey Kopytov <Alexey.Kopytov@Sun.com>2010-03-07 19:40:59 +0300
committerAlexey Kopytov <Alexey.Kopytov@Sun.com>2010-03-07 19:40:59 +0300
commit6e7b8b6a7ab2b58016403304b1c49cf908a6479d (patch)
tree395144ff597d9d1ea027cb0f57f50c5a6e6ab90c /mysys/charset.c
parent61bd9ef6487829ae8106387dd4a1f5b32b67b4bb (diff)
parent63a88e137365c4158e22c1c8aba7847b5a0ffe86 (diff)
downloadmariadb-git-6e7b8b6a7ab2b58016403304b1c49cf908a6479d.tar.gz
Manual merge of mysql-5.1-bugteam into mysql-trunk-merge.
Conflicts: Text conflict in .bzr-mysql/default.conf Text conflict in mysql-test/r/explain.result Text conflict in mysql-test/r/having.result Text conflict in mysql-test/suite/rpl/t/disabled.def Text conflict in mysql-test/suite/rpl/t/rpl_slave_skip.test Text conflict in storage/federated/ha_federated.cc
Diffstat (limited to 'mysys/charset.c')
-rw-r--r--mysys/charset.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/mysys/charset.c b/mysys/charset.c
index ff4eb70acd0..ba78838b298 100644
--- a/mysys/charset.c
+++ b/mysys/charset.c
@@ -406,6 +406,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)
{
@@ -433,6 +434,11 @@ static void init_available_charsets(void)
}
+void free_charsets(void)
+{
+ charsets_initialized= charsets_template;
+}
+
uint get_collation_number(const char *name)
{
my_pthread_once(&charsets_initialized, init_available_charsets);