Commit 720584b0 authored by unknown's avatar unknown

--with-charset was not up to date

ctype_ucs2 and ctype_ujis were skipped in mistake

parent 12604089
......@@ -68,40 +68,37 @@
/* Define charsets you want */
#undef HAVE_CHARSET_armscii8
#undef HAVE_CHARSET_ascii
#undef HAVE_CHARSET_big5
#undef HAVE_CHARSET_cp1250
#undef HAVE_CHARSET_cp1251
#undef HAVE_CHARSET_cp1256
#undef HAVE_CHARSET_cp1257
#undef HAVE_CHARSET_croat
#undef HAVE_CHARSET_czech
#undef HAVE_CHARSET_danish
#undef HAVE_CHARSET_cp850
#undef HAVE_CHARSET_cp852
#undef HAVE_CHARSET_cp866
#undef HAVE_CHARSET_dec8
#undef HAVE_CHARSET_dos
#undef HAVE_CHARSET_estonia
#undef HAVE_CHARSET_euc_kr
#undef HAVE_CHARSET_euckr
#undef HAVE_CHARSET_gb2312
#undef HAVE_CHARSET_gbk
#undef HAVE_CHARSET_german1
#undef HAVE_CHARSET_greek
#undef HAVE_CHARSET_hebrew
#undef HAVE_CHARSET_hp8
#undef HAVE_CHARSET_hungarian
#undef HAVE_CHARSET_koi8_ru
#undef HAVE_CHARSET_koi8_ukr
#undef HAVE_CHARSET_keybcs2
#undef HAVE_CHARSET_koi8r
#undef HAVE_CHARSET_koi8u
#undef HAVE_CHARSET_latin1
#undef HAVE_CHARSET_latin1_de
#undef HAVE_CHARSET_latin2
#undef HAVE_CHARSET_latin5
#undef HAVE_CHARSET_latin7
#undef HAVE_CHARSET_macce
#undef HAVE_CHARSET_macroman
#undef HAVE_CHARSET_sjis
#undef HAVE_CHARSET_swe7
#undef HAVE_CHARSET_tis620
#undef HAVE_CHARSET_ucs2
#undef HAVE_CHARSET_ujis
#undef HAVE_CHARSET_usa7
#undef HAVE_CHARSET_utf8
#undef HAVE_CHARSET_win1250
#undef HAVE_CHARSET_win1250ch
#undef HAVE_CHARSET_win1251ukr
#undef HAVE_CHARSET_win1251
/* ZLIB and compress: */
#undef HAVE_COMPRESS
......
......@@ -2226,29 +2226,36 @@ AC_SUBST(readline_h_ln_cmd)
dnl In order to add new charset, you must add charset name to
dnl this CHARSETS_AVAILABLE list and sql/share/charsets/Index.
dnl this CHARSETS_AVAILABLE list and sql/share/charsets/Index.xml.
dnl If the character set uses strcoll or other special handling,
dnl you must also create strings/ctype-$charset_name.c
AC_DIVERT_PUSH(0)
CHARSETS_AVAILABLE="armscii8 big5 cp1251 cp1257
croat czech danish dec8 dos estonia euc_kr gb2312 gbk
german1 greek hebrew hp8 hungarian koi8_ru koi8_ukr
latin1 latin1_de latin2 latin5 sjis swe7 tis620 ucs2 ujis
usa7 utf8 win1250 win1250ch win1251ukr"
CHARSETS_DEPRECATED="win1251"
CHARSETS_COMPLEX="big5 czech euc_kr gb2312 gbk latin1_de sjis tis620 ucs2 ujis utf8 win1250ch"
define(CHARSETS_AVAILABLE1,ascii armscii8 ascii big5 cp1250 cp1251 cp1256 cp1257)
define(CHARSETS_AVAILABLE2,cp850 cp852 cp866 dec8 euckr gb2312 gbk)
define(CHARSETS_AVAILABLE3,greek hebrew hp8 keybcs2 koi8r koi8u)
define(CHARSETS_AVAILABLE4,latin1 latin2 latin5 latin7 macce macroman)
define(CHARSETS_AVAILABLE5,sjis swe7 tis620 ucs2 ujis utf8)
DEFAULT_CHARSET=latin1
AC_DIVERT_POP
CHARSETS_AVAILABLE="CHARSETS_AVAILABLE1 CHARSETS_AVAILABLE2 CHARSETS_AVAILABLE3 CHARSETS_AVAILABLE4 CHARSETS_AVAILABLE5"
CHARSETS_COMPLEX="big5 cp1250 euckr gb2312 gbk latin1 latin2 sjis tis620 ucs2 ujis utf8"
dnl fix this later..
dnl [ --with-charset=CHARSET Use CHARSET by default (one of: $CHARSETS_AVAILABLE; Default is $DEFAULT_CHARSET)],
AC_DIVERT_POP
AC_ARG_WITH(charset,
[ --with-charset=CHARSET Use CHARSET by default (Default is latin1)],
[ --with-charset=CHARSET
Default character set, use one of:
CHARSETS_AVAILABLE1
CHARSETS_AVAILABLE2
CHARSETS_AVAILABLE3
CHARSETS_AVAILABLE4
CHARSETS_AVAILABLE5],
[default_charset="$withval"],
[default_charset="$DEFAULT_CHARSET"])
AC_ARG_WITH(extra-charsets,
[ --with-extra-charsets=CHARSET[,CHARSET,...]
Use charsets in addition to default (none, complex,
......@@ -2256,73 +2263,77 @@ AC_ARG_WITH(extra-charsets,
[extra_charsets="$withval"],
[extra_charsets="none"])
AC_MSG_CHECKING("character sets")
CHARSETS="$default_charset latin1 utf8"
if test "$extra_charsets" = no; then
CHARSETS=""
CHARSETS="$CHARSETS"
elif test "$extra_charsets" = none; then
CHARSETS=""
CHARSETS="$CHARSETS"
elif test "$extra_charsets" = complex; then
CHARSETS="$CHARSETS_COMPLEX"
CHARSETS="$CHARSETS $CHARSETS_COMPLEX"
elif test "$extra_charsets" = all; then
CHARSETS="$CHARSETS_AVAILABLE $CHARSETS_DEPRECATED"
CHARSETS="$CHARSETS $CHARSETS_AVAILABLE"
else
CHARSETS=`echo $extra_charsets | sed -e 's/,/ /g'`
EXTRA_CHARSETS=`echo $extra_charsets | sed -e 's/,/ /g'`
CHARSETS="$CHARSETS $EXTRA_CHARSETS"
fi
CHARSETS="$default_charset $CHARSETS"
use_mb="no"
for cs in $CHARSETS
do
case $cs in
armscii8)
AC_DEFINE(HAVE_CHARSET_armscii8)
use_mb="yes"
;;
ascii)
AC_DEFINE(HAVE_CHARSET_ascii)
;;
big5)
AC_DEFINE(HAVE_CHARSET_big5)
use_mb="yes"
AC_DEFINE(USE_MB)
AC_DEFINE(USE_MB_IDENT)
;;
cp1250)
AC_DEFINE(HAVE_CHARSET_cp1250)
;;
cp1251)
AC_DEFINE(HAVE_CHARSET_cp1251)
;;
cp1256)
AC_DEFINE(HAVE_CHARSET_cp1256)
;;
cp1257)
AC_DEFINE(HAVE_CHARSET_cp1257)
;;
croat)
AC_DEFINE(HAVE_CHARSET_croat)
cp850)
AC_DEFINE(HAVE_CHARSET_cp850)
;;
czech)
AC_DEFINE(HAVE_CHARSET_czech)
cp852)
AC_DEFINE(HAVE_CHARSET_cp852)
;;
danish)
AC_DEFINE(HAVE_CHARSET_danish)
cp866)
AC_DEFINE(HAVE_CHARSET_cp866)
;;
dec8)
AC_DEFINE(HAVE_CHARSET_dec8)
;;
dos)
AC_DEFINE(HAVE_CHARSET_dos)
;;
estonia)
AC_DEFINE(HAVE_CHARSET_estonia)
;;
euc_kr)
AC_DEFINE(HAVE_CHARSET_euc_kr)
use_mb="yes"
euckr)
AC_DEFINE(HAVE_CHARSET_euckr)
AC_DEFINE(USE_MB)
AC_DEFINE(USE_MB_IDENT)
;;
gb2312)
AC_DEFINE(HAVE_CHARSET_gb2312)
use_mb="yes"
AC_DEFINE(USE_MB)
AC_DEFINE(USE_MB_IDENT)
;;
gbk)
AC_DEFINE(HAVE_CHARSET_gbk)
use_mb="yes"
;;
german1)
AC_DEFINE(HAVE_CHARSET_german1)
AC_DEFINE(USE_MB)
AC_DEFINE(USE_MB_IDENT)
;;
greek)
AC_DEFINE(HAVE_CHARSET_greek)
......@@ -2333,30 +2344,37 @@ do
hp8)
AC_DEFINE(HAVE_CHARSET_hp8)
;;
hungarian)
AC_DEFINE(HAVE_CHARSET_hungarian)
keybcs2)
AC_DEFINE(HAVE_CHARSET_keybcs2)
;;
koi8_ru)
AC_DEFINE(HAVE_CHARSET_koi8_ru)
koi8r)
AC_DEFINE(HAVE_CHARSET_koi8r)
;;
koi8_ukr)
AC_DEFINE(HAVE_CHARSET_koi8_ukr)
koi8u)
AC_DEFINE(HAVE_CHARSET_koi8u)
;;
latin1)
AC_DEFINE(HAVE_CHARSET_latin1)
;;
latin1_de)
AC_DEFINE(HAVE_CHARSET_latin1_de)
;;
latin2)
AC_DEFINE(HAVE_CHARSET_latin2)
;;
latin5)
AC_DEFINE(HAVE_CHARSET_latin5)
;;
latin7)
AC_DEFINE(HAVE_CHARSET_latin7)
;;
macce)
AC_DEFINE(HAVE_CHARSET_macce)
;;
macroman)
AC_DEFINE(HAVE_CHARSET_macroman)
;;
sjis)
AC_DEFINE(HAVE_CHARSET_sjis)
use_mb="yes"
AC_DEFINE(USE_MB)
AC_DEFINE(USE_MB_IDENT)
;;
swe7)
AC_DEFINE(HAVE_CHARSET_swe7)
......@@ -2366,49 +2384,25 @@ do
;;
ucs2)
AC_DEFINE(HAVE_CHARSET_ucs2)
use_mb="yes"
AC_DEFINE(USE_MB)
AC_DEFINE(USE_MB_IDENT)
;;
ujis)
AC_DEFINE(HAVE_CHARSET_ujis)
use_mb="yes"
;;
usa7)
AC_DEFINE(HAVE_CHARSET_usa7)
AC_DEFINE(USE_MB)
AC_DEFINE(USE_MB_IDENT)
;;
utf8)
AC_DEFINE(HAVE_CHARSET_utf8)
use_mb="yes"
;;
win1250)
AC_DEFINE(HAVE_CHARSET_win1250)
;;
win1250ch)
AC_DEFINE(HAVE_CHARSET_win1250ch)
;;
win1251)
AC_DEFINE(HAVE_CHARSET_win1251)
;;
win1251ukr)
AC_DEFINE(HAVE_CHARSET_win1251ukr)
AC_DEFINE(USE_MB)
AC_DEFINE(USE_MB_IDENT)
;;
*)
AC_MSG_ERROR([Charset $cs not available. (Available $CHARSETS_AVAILABLE).
AC_MSG_ERROR([Charset $cs not available. (Available are: $CHARSETS_AVAILABLE).
See the Installation chapter in the Reference Manual.]);
esac
done
dnl Always compile latin1
AC_DEFINE(HAVE_CHARSET_latin1)
dnl Always compile utf8
AC_DEFINE(HAVE_CHARSET_utf8)
use_mb=yes
if test "$use_mb" = "yes"
then
AC_DEFINE(USE_MB)
AC_DEFINE(USE_MB_IDENT)
fi
AC_SUBST(default_charset)
AC_DEFINE_UNQUOTED(DEFAULT_CHARSET_NAME,"$default_charset")
......
drop table if exists t1;
create table t1 (c text);
create table t1 (c text character set ujis);
insert into t1 values (0xa4a2),(0xa4a3);
select hex(left(c,1)) from t1 group by c;
hex(left(c,1))
......
Collation Charset Id D C Sortlen
ucs2_general_ci ucs2 35 Y 0
ucs2_general_ci ucs2 35 Y Y 1
Collation Charset Id D C Sortlen
ujis_japanese_ci ujis 12 Y 0
ujis_japanese_ci ujis 12 Y Y 0
......@@ -407,11 +407,15 @@ static my_bool init_compiled_charsets(myf flags __attribute__((unused)))
MY_ADD_CHARSET(&my_charset_big5_bin);
#endif
#ifdef HAVE_CHARSET_czech
#ifdef HAVE_CHARSET_cp1250
MY_ADD_CHARSET(&my_charset_cp1250_czech_ci);
#endif
#ifdef HAVE_CHARSET_latin2
MY_ADD_CHARSET(&my_charset_latin2_czech_ci);
#endif
#ifdef HAVE_CHARSET_euc_kr
#ifdef HAVE_CHARSET_euckr
MY_ADD_CHARSET(&my_charset_euckr_korean_ci);
MY_ADD_CHARSET(&my_charset_euckr_bin);
#endif
......@@ -451,10 +455,6 @@ static my_bool init_compiled_charsets(myf flags __attribute__((unused)))
MY_ADD_CHARSET(&my_charset_utf8_bin);
#endif
#ifdef HAVE_CHARSET_win1250ch
MY_ADD_CHARSET(&my_charset_cp1250_czech_ci);
#endif
/* Copy compiled charsets */
for (cs=compiled_charsets; cs->name; cs++)
{
......
......@@ -77,7 +77,7 @@
#endif
#ifdef HAVE_CHARSET_czech
#ifdef HAVE_CHARSET_latin2
/*
These are four tables for four passes of the algorithm. Please see
......
......@@ -30,7 +30,7 @@
#include "m_string.h"
#include "m_ctype.h"
#ifdef HAVE_CHARSET_euc_kr
#ifdef HAVE_CHARSET_euckr
static uchar NEAR ctype_euc_kr[257] =
......
......@@ -45,6 +45,9 @@
#include "m_string.h"
#include "m_ctype.h"
#ifdef HAVE_CHARSET_cp1250
static uint16 tab_cp1250_uni[256]={
0,0x0001,0x0002,0x0003,0x0004,0x0005,0x0006,0x0007,
0x0008,0x0009,0x000A,0x000B,0x000C,0x000D,0x000E,0x000F,
......@@ -673,4 +676,6 @@ CHARSET_INFO my_charset_cp1250_czech_ci =
};
#endif
#endif
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