summaryrefslogtreecommitdiff
path: root/mysys/charset.c
diff options
context:
space:
mode:
Diffstat (limited to 'mysys/charset.c')
-rw-r--r--mysys/charset.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/mysys/charset.c b/mysys/charset.c
index 7c4c428a6bd..7cf8a8b828d 100644
--- a/mysys/charset.c
+++ b/mysys/charset.c
@@ -242,6 +242,8 @@ static int add_collation(struct charset_info_st *cs)
if (cs_copy_data(newcs,cs))
return MY_XML_ERROR;
+ newcs->caseup_multiply= newcs->casedn_multiply= 1;
+
if (!strcmp(cs->csname,"ucs2") )
{
#if defined(HAVE_CHARSET_ucs2) && defined(HAVE_UCA_COLLATIONS)
@@ -399,6 +401,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)
{
@@ -427,6 +430,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);