Commit 29fb8728 authored by unknown's avatar unknown

A way not to compile UCA collations

parent 2b69b4ae
...@@ -2811,6 +2811,24 @@ AC_DEFINE_UNQUOTED([MYSQL_DEFAULT_CHARSET_NAME], ["$default_charset"], ...@@ -2811,6 +2811,24 @@ AC_DEFINE_UNQUOTED([MYSQL_DEFAULT_CHARSET_NAME], ["$default_charset"],
AC_DEFINE_UNQUOTED([MYSQL_DEFAULT_COLLATION_NAME], ["$default_collation"], AC_DEFINE_UNQUOTED([MYSQL_DEFAULT_COLLATION_NAME], ["$default_collation"],
[Define the default charset name]) [Define the default charset name])
# Shall we build the UCA-based Unicode collations
AC_ARG_WITH(uca,
[ --without-uca Skip building of the national Unicode collations.],
[with_uca=$withval],
[with_uca=yes]
)
AC_MSG_CHECKING([whether to compile national Unicode collations])
if test "$with_uca" = "yes"
then
AC_MSG_RESULT(yes)
AC_DEFINE([HAVE_UCA_COLLATIONS], [1], [national Unicode collations])
else
AC_MSG_RESULT(no)
fi
MYSQL_CHECK_ISAM MYSQL_CHECK_ISAM
MYSQL_CHECK_BDB MYSQL_CHECK_BDB
MYSQL_CHECK_INNODB MYSQL_CHECK_INNODB
......
...@@ -22,6 +22,8 @@ ...@@ -22,6 +22,8 @@
init_compiled_charsets() that only adds those that he wants init_compiled_charsets() that only adds those that he wants
*/ */
#ifdef HAVE_UCA_COLLATIONS
#ifdef HAVE_CHARSET_ucs2 #ifdef HAVE_CHARSET_ucs2
extern CHARSET_INFO my_charset_ucs2_general_uca; extern CHARSET_INFO my_charset_ucs2_general_uca;
extern CHARSET_INFO my_charset_ucs2_icelandic_uca_ci; extern CHARSET_INFO my_charset_ucs2_icelandic_uca_ci;
...@@ -62,6 +64,8 @@ extern CHARSET_INFO my_charset_utf8_roman_uca_ci; ...@@ -62,6 +64,8 @@ extern CHARSET_INFO my_charset_utf8_roman_uca_ci;
extern CHARSET_INFO my_charset_utf8_persian_uca_ci; extern CHARSET_INFO my_charset_utf8_persian_uca_ci;
#endif #endif
#endif /* HAVE_UCA_COLLATIONS */
my_bool init_compiled_charsets(myf flags __attribute__((unused))) my_bool init_compiled_charsets(myf flags __attribute__((unused)))
{ {
CHARSET_INFO *cs; CHARSET_INFO *cs;
...@@ -113,6 +117,7 @@ my_bool init_compiled_charsets(myf flags __attribute__((unused))) ...@@ -113,6 +117,7 @@ my_bool init_compiled_charsets(myf flags __attribute__((unused)))
#ifdef HAVE_CHARSET_ucs2 #ifdef HAVE_CHARSET_ucs2
add_compiled_collation(&my_charset_ucs2_general_ci); add_compiled_collation(&my_charset_ucs2_general_ci);
add_compiled_collation(&my_charset_ucs2_bin); 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_general_uca);
add_compiled_collation(&my_charset_ucs2_icelandic_uca_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_latvian_uca_ci);
...@@ -131,6 +136,7 @@ my_bool init_compiled_charsets(myf flags __attribute__((unused))) ...@@ -131,6 +136,7 @@ my_bool init_compiled_charsets(myf flags __attribute__((unused)))
add_compiled_collation(&my_charset_ucs2_roman_uca_ci); add_compiled_collation(&my_charset_ucs2_roman_uca_ci);
add_compiled_collation(&my_charset_ucs2_persian_uca_ci); add_compiled_collation(&my_charset_ucs2_persian_uca_ci);
#endif #endif
#endif
#ifdef HAVE_CHARSET_ujis #ifdef HAVE_CHARSET_ujis
add_compiled_collation(&my_charset_ujis_japanese_ci); add_compiled_collation(&my_charset_ujis_japanese_ci);
...@@ -140,6 +146,7 @@ my_bool init_compiled_charsets(myf flags __attribute__((unused))) ...@@ -140,6 +146,7 @@ my_bool init_compiled_charsets(myf flags __attribute__((unused)))
#ifdef HAVE_CHARSET_utf8 #ifdef HAVE_CHARSET_utf8
add_compiled_collation(&my_charset_utf8_general_ci); add_compiled_collation(&my_charset_utf8_general_ci);
add_compiled_collation(&my_charset_utf8_bin); add_compiled_collation(&my_charset_utf8_bin);
#ifdef HAVE_UCA_COLLATIONS
add_compiled_collation(&my_charset_utf8_general_uca_ci); add_compiled_collation(&my_charset_utf8_general_uca_ci);
add_compiled_collation(&my_charset_utf8_icelandic_uca_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_latvian_uca_ci);
...@@ -157,6 +164,7 @@ my_bool init_compiled_charsets(myf flags __attribute__((unused))) ...@@ -157,6 +164,7 @@ my_bool init_compiled_charsets(myf flags __attribute__((unused)))
add_compiled_collation(&my_charset_utf8_spanish2_uca_ci); add_compiled_collation(&my_charset_utf8_spanish2_uca_ci);
add_compiled_collation(&my_charset_utf8_roman_uca_ci); add_compiled_collation(&my_charset_utf8_roman_uca_ci);
add_compiled_collation(&my_charset_utf8_persian_uca_ci); add_compiled_collation(&my_charset_utf8_persian_uca_ci);
#endif
#endif #endif
/* Copy compiled charsets */ /* Copy compiled charsets */
......
...@@ -215,7 +215,7 @@ static int add_collation(CHARSET_INFO *cs) ...@@ -215,7 +215,7 @@ static int add_collation(CHARSET_INFO *cs)
if (!strcmp(cs->csname,"ucs2") ) if (!strcmp(cs->csname,"ucs2") )
{ {
#ifdef HAVE_CHARSET_ucs2 #if defined(HAVE_CHARSET_ucs2) && defined(HAVE_UCA_COLLATIONS)
new->cset= my_charset_ucs2_general_uca.cset; new->cset= my_charset_ucs2_general_uca.cset;
new->coll= my_charset_ucs2_general_uca.coll; new->coll= my_charset_ucs2_general_uca.coll;
new->strxfrm_multiply= my_charset_ucs2_general_uca.strxfrm_multiply; new->strxfrm_multiply= my_charset_ucs2_general_uca.strxfrm_multiply;
......
...@@ -36,6 +36,7 @@ ...@@ -36,6 +36,7 @@
#include "m_string.h" #include "m_string.h"
#include "m_ctype.h" #include "m_ctype.h"
#ifdef HAVE_UCA_COLLATIONS
#define MY_UCA_NPAGES 256 #define MY_UCA_NPAGES 256
#define MY_UCA_NCHARS 256 #define MY_UCA_NCHARS 256
...@@ -8990,4 +8991,6 @@ CHARSET_INFO my_charset_utf8_persian_uca_ci= ...@@ -8990,4 +8991,6 @@ CHARSET_INFO my_charset_utf8_persian_uca_ci=
&my_collation_any_uca_handler &my_collation_any_uca_handler
}; };
#endif #endif /* HAVE_CHARSET_utf8 */
#endif /* HAVE_UCA_COLLATIONS */
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment