summaryrefslogtreecommitdiff
path: root/mysys/charset-def.c
diff options
context:
space:
mode:
authorunknown <bar@mysql.com/bar.myoffice.izhnet.ru>2007-06-07 17:55:55 +0500
committerunknown <bar@mysql.com/bar.myoffice.izhnet.ru>2007-06-07 17:55:55 +0500
commitaf0a3afe054cc2be3600180cfdeef28761be2f7e (patch)
tree6e38a11989e338107855129634fe59859fd19419 /mysys/charset-def.c
parentc3ba8178b5c8d9c3d885119f4a1f4bc103513578 (diff)
downloadmariadb-git-af0a3afe054cc2be3600180cfdeef28761be2f7e.tar.gz
Bug#28916 LDML doesn't work for utf8
and is not described in the manual - Adding missing initialization for utf8 collations - Minor code clean-ups: renaming variables, moving code into a new separate function. - Adding test, to check that both ucs2 and utf8 user defined collations work (ucs2_test_ci and utf8_test_ci) - Adding Vietnamese collation as a complex user defined collation example. include/m_ctype.h: Renaming variable names to match collation names (for convenience). mysys/charset-def.c: - Removing redundant declarations for variables declared in m_ctype.h - Renaming variable names to match collation names (for convenience). mysys/charset.c: - Renaming "new" to "newcs", to avoid using C reserved word as a variable name - Moving UCA initialization code into a separate function - The bug fix itself: adding initialization of utf8 collations strings/ctype-uca.c: Renaming variable names to match collation names (for convenience). strings/ctype.c: Increasing buffer size to fit tailoring for languages with complex rules (e.g. Vietnamese). mysql-test/r/ctype_ldml.result: Adding test case mysql-test/std_data/Index.xml: Adding Index.xml example with user defined collations. mysql-test/t/ctype_ldml-master.opt: Adding OPT file for the test case, to use the example Index.xml file. mysql-test/t/ctype_ldml.test: Adding test case
Diffstat (limited to 'mysys/charset-def.c')
-rw-r--r--mysys/charset-def.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/mysys/charset-def.c b/mysys/charset-def.c
index 394fe6de1f3..36ff4139d9c 100644
--- a/mysys/charset-def.c
+++ b/mysys/charset-def.c
@@ -24,7 +24,6 @@
#ifdef HAVE_UCA_COLLATIONS
#ifdef HAVE_CHARSET_ucs2
-extern CHARSET_INFO my_charset_ucs2_general_uca;
extern CHARSET_INFO my_charset_ucs2_icelandic_uca_ci;
extern CHARSET_INFO my_charset_ucs2_latvian_uca_ci;
extern CHARSET_INFO my_charset_ucs2_romanian_uca_ci;
@@ -46,7 +45,6 @@ extern CHARSET_INFO my_charset_ucs2_hungarian_uca_ci;
#endif
#ifdef HAVE_CHARSET_utf8
-extern CHARSET_INFO my_charset_utf8_general_uca_ci;
extern CHARSET_INFO my_charset_utf8_icelandic_uca_ci;
extern CHARSET_INFO my_charset_utf8_latvian_uca_ci;
extern CHARSET_INFO my_charset_utf8_romanian_uca_ci;
@@ -134,7 +132,7 @@ my_bool init_compiled_charsets(myf flags __attribute__((unused)))
add_compiled_collation(&my_charset_ucs2_general_ci);
add_compiled_collation(&my_charset_ucs2_bin);
#ifdef HAVE_UCA_COLLATIONS
- add_compiled_collation(&my_charset_ucs2_general_uca);
+ add_compiled_collation(&my_charset_ucs2_unicode_ci);
add_compiled_collation(&my_charset_ucs2_icelandic_uca_ci);
add_compiled_collation(&my_charset_ucs2_latvian_uca_ci);
add_compiled_collation(&my_charset_ucs2_romanian_uca_ci);
@@ -168,7 +166,7 @@ my_bool init_compiled_charsets(myf flags __attribute__((unused)))
add_compiled_collation(&my_charset_utf8_general_cs);
#endif
#ifdef HAVE_UCA_COLLATIONS
- add_compiled_collation(&my_charset_utf8_general_uca_ci);
+ add_compiled_collation(&my_charset_utf8_unicode_ci);
add_compiled_collation(&my_charset_utf8_icelandic_uca_ci);
add_compiled_collation(&my_charset_utf8_latvian_uca_ci);
add_compiled_collation(&my_charset_utf8_romanian_uca_ci);