summaryrefslogtreecommitdiff
path: root/mysys
diff options
context:
space:
mode:
authorAlexander Barkov <bar@mnogosearch.org>2013-11-11 22:46:14 +0400
committerAlexander Barkov <bar@mnogosearch.org>2013-11-11 22:46:14 +0400
commit383de0fd1f7b855276f5bec37f38de6dbf70e938 (patch)
tree965755bc94a1806fc0a4acfc0b789fb9680d44ec /mysys
parent06a91b18d76599cbad2b2bd08464ae47bd8a7e01 (diff)
parentf76beb080c4938fcf8f037a9fc8e370427f8eba0 (diff)
downloadmariadb-git-383de0fd1f7b855276f5bec37f38de6dbf70e938.tar.gz
Merge 10.0-monty -> 10.0
Diffstat (limited to 'mysys')
-rw-r--r--mysys/charset-def.c10
-rw-r--r--mysys/charset.c14
2 files changed, 17 insertions, 7 deletions
diff --git a/mysys/charset-def.c b/mysys/charset-def.c
index de4d6387a52..938d228b020 100644
--- a/mysys/charset-def.c
+++ b/mysys/charset-def.c
@@ -43,6 +43,7 @@ extern struct charset_info_st my_charset_ucs2_roman_uca_ci;
extern struct charset_info_st my_charset_ucs2_persian_uca_ci;
extern struct charset_info_st my_charset_ucs2_esperanto_uca_ci;
extern struct charset_info_st my_charset_ucs2_hungarian_uca_ci;
+extern struct charset_info_st my_charset_ucs2_croatian_mysql561_uca_ci;
extern struct charset_info_st my_charset_ucs2_sinhala_uca_ci;
extern struct charset_info_st my_charset_ucs2_croatian_uca_ci;
#endif
@@ -68,6 +69,7 @@ extern struct charset_info_st my_charset_utf32_roman_uca_ci;
extern struct charset_info_st my_charset_utf32_persian_uca_ci;
extern struct charset_info_st my_charset_utf32_esperanto_uca_ci;
extern struct charset_info_st my_charset_utf32_hungarian_uca_ci;
+extern struct charset_info_st my_charset_utf32_croatian_mysql561_uca_ci;
extern struct charset_info_st my_charset_utf32_sinhala_uca_ci;
extern struct charset_info_st my_charset_utf32_croatian_uca_ci;
#endif /* HAVE_CHARSET_utf32 */
@@ -93,6 +95,7 @@ extern struct charset_info_st my_charset_utf16_roman_uca_ci;
extern struct charset_info_st my_charset_utf16_persian_uca_ci;
extern struct charset_info_st my_charset_utf16_esperanto_uca_ci;
extern struct charset_info_st my_charset_utf16_hungarian_uca_ci;
+extern struct charset_info_st my_charset_utf16_croatian_mysql561_uca_ci;
extern struct charset_info_st my_charset_utf16_sinhala_uca_ci;
extern struct charset_info_st my_charset_utf16_croatian_uca_ci;
#endif /* HAVE_CHARSET_utf16 */
@@ -118,6 +121,7 @@ extern struct charset_info_st my_charset_utf8_roman_uca_ci;
extern struct charset_info_st my_charset_utf8_persian_uca_ci;
extern struct charset_info_st my_charset_utf8_esperanto_uca_ci;
extern struct charset_info_st my_charset_utf8_hungarian_uca_ci;
+extern struct charset_info_st my_charset_utf8_croatian_mysql561_uca_ci;
extern struct charset_info_st my_charset_utf8_sinhala_uca_ci;
extern struct charset_info_st my_charset_utf8_croatian_uca_ci;
#ifdef HAVE_UTF8_GENERAL_CS
@@ -145,6 +149,7 @@ extern struct charset_info_st my_charset_utf8mb4_roman_uca_ci;
extern struct charset_info_st my_charset_utf8mb4_persian_uca_ci;
extern struct charset_info_st my_charset_utf8mb4_esperanto_uca_ci;
extern struct charset_info_st my_charset_utf8mb4_hungarian_uca_ci;
+extern struct charset_info_st my_charset_utf8mb4_croatian_mysql561_uca_ci;
extern struct charset_info_st my_charset_utf8mb4_sinhala_uca_ci;
extern struct charset_info_st my_charset_utf8mb4_croatian_uca_ci;
#endif /* HAVE_CHARSET_utf8mb4 */
@@ -235,6 +240,7 @@ my_bool init_compiled_charsets(myf flags __attribute__((unused)))
add_compiled_collation(&my_charset_ucs2_persian_uca_ci);
add_compiled_collation(&my_charset_ucs2_esperanto_uca_ci);
add_compiled_collation(&my_charset_ucs2_hungarian_uca_ci);
+ add_compiled_collation(&my_charset_ucs2_croatian_mysql561_uca_ci);
add_compiled_collation(&my_charset_ucs2_sinhala_uca_ci);
add_compiled_collation(&my_charset_ucs2_croatian_uca_ci);
#endif
@@ -273,6 +279,7 @@ my_bool init_compiled_charsets(myf flags __attribute__((unused)))
add_compiled_collation(&my_charset_utf8_persian_uca_ci);
add_compiled_collation(&my_charset_utf8_esperanto_uca_ci);
add_compiled_collation(&my_charset_utf8_hungarian_uca_ci);
+ add_compiled_collation(&my_charset_utf8_croatian_mysql561_uca_ci);
add_compiled_collation(&my_charset_utf8_sinhala_uca_ci);
add_compiled_collation(&my_charset_utf8_croatian_uca_ci);
#endif
@@ -303,6 +310,7 @@ my_bool init_compiled_charsets(myf flags __attribute__((unused)))
add_compiled_collation(&my_charset_utf8mb4_persian_uca_ci);
add_compiled_collation(&my_charset_utf8mb4_esperanto_uca_ci);
add_compiled_collation(&my_charset_utf8mb4_hungarian_uca_ci);
+ add_compiled_collation(&my_charset_utf8mb4_croatian_mysql561_uca_ci);
add_compiled_collation(&my_charset_utf8mb4_sinhala_uca_ci);
add_compiled_collation(&my_charset_utf8mb4_croatian_uca_ci);
#endif /* HAVE_UCA_COLLATIONS */
@@ -335,6 +343,7 @@ my_bool init_compiled_charsets(myf flags __attribute__((unused)))
add_compiled_collation(&my_charset_utf16_persian_uca_ci);
add_compiled_collation(&my_charset_utf16_esperanto_uca_ci);
add_compiled_collation(&my_charset_utf16_hungarian_uca_ci);
+ add_compiled_collation(&my_charset_utf16_croatian_mysql561_uca_ci);
add_compiled_collation(&my_charset_utf16_sinhala_uca_ci);
add_compiled_collation(&my_charset_utf16_croatian_uca_ci);
#endif /* HAVE_UCA_COLLATIONS */
@@ -365,6 +374,7 @@ my_bool init_compiled_charsets(myf flags __attribute__((unused)))
add_compiled_collation(&my_charset_utf32_persian_uca_ci);
add_compiled_collation(&my_charset_utf32_esperanto_uca_ci);
add_compiled_collation(&my_charset_utf32_hungarian_uca_ci);
+ add_compiled_collation(&my_charset_utf32_croatian_mysql561_uca_ci);
add_compiled_collation(&my_charset_utf32_sinhala_uca_ci);
add_compiled_collation(&my_charset_utf32_croatian_uca_ci);
#endif /* HAVE_UCA_COLLATIONS */
diff --git a/mysys/charset.c b/mysys/charset.c
index f9d1286088d..b7e535136a5 100644
--- a/mysys/charset.c
+++ b/mysys/charset.c
@@ -648,19 +648,19 @@ get_internal_charset(MY_CHARSET_LOADER *loader, uint cs_number, myf flags)
CHARSET_INFO *get_charset(uint cs_number, myf flags)
{
- CHARSET_INFO *cs;
- MY_CHARSET_LOADER loader;
+ CHARSET_INFO *cs= NULL;
if (cs_number == default_charset_info->number)
return default_charset_info;
my_pthread_once(&charsets_initialized, init_available_charsets);
-
- if (cs_number >= array_elements(all_charsets))
- return NULL;
- my_charset_loader_init_mysys(&loader);
- cs= get_internal_charset(&loader, cs_number, flags);
+ if (cs_number < array_elements(all_charsets))
+ {
+ MY_CHARSET_LOADER loader;
+ my_charset_loader_init_mysys(&loader);
+ cs= get_internal_charset(&loader, cs_number, flags);
+ }
if (!cs && (flags & MY_WME))
{