summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--BitKeeper/etc/logging_ok2
-rw-r--r--acconfig.h3
-rw-r--r--client/sql_string.cc12
-rw-r--r--configure.in3
-rw-r--r--include/m_ctype.h26
-rw-r--r--include/my_pthread.h5
-rw-r--r--include/my_sys.h5
-rw-r--r--isam/_key.c6
-rw-r--r--isam/_search.c4
-rw-r--r--libmysql/Makefile.shared4
-rw-r--r--myisam/mi_open.c6
-rw-r--r--mysql-test/r/analyse.result2
-rw-r--r--mysql-test/r/replace.result6
-rw-r--r--mysql-test/t/replace.test5
-rw-r--r--mysys/charset.c75
-rw-r--r--mysys/mf_keycache.c2229
-rw-r--r--regex/Makefile.am2
-rw-r--r--regex/main.c4
-rw-r--r--regex/regcomp.c2
-rw-r--r--regex/regex.h2
-rw-r--r--regex/reginit.c3
-rw-r--r--sql/convert.cc2
-rw-r--r--sql/des_key_file.cc2
-rw-r--r--sql/field.cc76
-rw-r--r--sql/field.h13
-rw-r--r--sql/filesort.cc17
-rw-r--r--sql/hostname.cc4
-rw-r--r--sql/item.cc59
-rw-r--r--sql/item.h55
-rw-r--r--sql/item_cmpfunc.cc10
-rw-r--r--sql/item_func.cc12
-rw-r--r--sql/item_strfunc.cc6
-rw-r--r--sql/item_strfunc.h6
-rw-r--r--sql/item_timefunc.cc46
-rw-r--r--sql/log.cc2
-rw-r--r--sql/log_event.cc2
-rw-r--r--sql/mysqld.cc8
-rw-r--r--sql/opt_range.cc2
-rw-r--r--sql/share/charsets/cp1256.xml2
-rw-r--r--sql/sql_acl.cc164
-rw-r--r--sql/sql_cache.cc4
-rw-r--r--sql/sql_class.cc8
-rw-r--r--sql/sql_help.cc2
-rw-r--r--sql/sql_parse.cc4
-rw-r--r--sql/sql_select.cc10
-rw-r--r--sql/sql_sort.h2
-rw-r--r--sql/sql_string.cc16
-rw-r--r--sql/sql_update.cc2
-rw-r--r--sql/sql_yacc.yy40
-rw-r--r--sql/table.cc2
-rw-r--r--sql/table.h1
-rw-r--r--sql/time.cc40
-rw-r--r--strings/Makefile.am8
-rw-r--r--strings/conf_to_src.c342
-rw-r--r--strings/ctype-big5.c3
-rw-r--r--strings/ctype-bin.c6
-rw-r--r--strings/ctype-czech.c1
-rw-r--r--strings/ctype-euc_kr.c1
-rw-r--r--strings/ctype-extra.c3941
-rw-r--r--strings/ctype-gb2312.c1
-rw-r--r--strings/ctype-gbk.c1
-rw-r--r--strings/ctype-latin1.c222
-rw-r--r--strings/ctype-latin1_de.c1
-rw-r--r--strings/ctype-simple.c8
-rw-r--r--strings/ctype-sjis.c1
-rw-r--r--strings/ctype-tis620.c1
-rw-r--r--strings/ctype-ujis.c1
-rw-r--r--strings/ctype-utf8.c2
-rw-r--r--strings/ctype-win1250ch.c1
-rw-r--r--strings/ctype.c3991
-rw-r--r--strings/my_vsnprintf.c2
-rw-r--r--strings/str2int.c2
-rw-r--r--strings/strto.c12
-rw-r--r--tests/client_test.c2
74 files changed, 6533 insertions, 5042 deletions
diff --git a/BitKeeper/etc/logging_ok b/BitKeeper/etc/logging_ok
index c5970cdd45d..cc11f43b899 100644
--- a/BitKeeper/etc/logging_ok
+++ b/BitKeeper/etc/logging_ok
@@ -26,6 +26,7 @@ hf@bison.(none)
hf@bisonxp.(none)
hf@deer.mysql.r18.ru
hf@genie.(none)
+igor@hundin.mysql.fi
jani@dsl-jkl1657.dial.inet.fi
jani@dsl-kpogw4gb5.dial.inet.fi
jani@hynda.(none)
@@ -95,6 +96,7 @@ tonu@hundin.mysql.fi
tonu@volk.internalnet
tonu@x153.internalnet
tonu@x3.internalnet
+venu@hundin.mysql.fi
venu@myvenu.com
venu@work.mysql.com
vva@eagle.mysql.r18.ru
diff --git a/acconfig.h b/acconfig.h
index 426ef45f6cd..5f47365709c 100644
--- a/acconfig.h
+++ b/acconfig.h
@@ -309,9 +309,6 @@
/* Use MySQL RAID */
#undef USE_RAID
-/* Use strcoll() functions when comparing and sorting. */
-#undef USE_STRCOLL
-
/* Program version */
#undef VERSION
diff --git a/client/sql_string.cc b/client/sql_string.cc
index 5083fb13105..8ab205d9fb1 100644
--- a/client/sql_string.cc
+++ b/client/sql_string.cc
@@ -135,14 +135,14 @@ bool String::set(double num,uint decimals, CHARSET_INFO *cs)
if (decimals >= NOT_FIXED_DEC)
{
sprintf(buff,"%.14g",num); // Enough for a DATETIME
- return copy(buff, (uint32) strlen(buff), my_charset_latin1, cs);
+ return copy(buff, (uint32) strlen(buff), &my_charset_latin1, cs);
}
#ifdef HAVE_FCONVERT
int decpt,sign;
char *pos,*to;
VOID(fconvert(num,(int) decimals,&decpt,&sign,buff+1));
- if (!my_isdigit(my_charset_latin1, buff[1]))
+ if (!my_isdigit(&my_charset_latin1, buff[1]))
{ // Nan or Inf
pos=buff+1;
if (sign)
@@ -150,7 +150,7 @@ bool String::set(double num,uint decimals, CHARSET_INFO *cs)
buff[0]='-';
pos=buff;
}
- return copy(pos,(uint32) strlen(pos), my_charset_latin1, cs);
+ return copy(pos,(uint32) strlen(pos), &my_charset_latin1, cs);
}
if (alloc((uint32) ((uint32) decpt+3+decimals)))
return TRUE;
@@ -200,7 +200,7 @@ end:
#else
sprintf(buff,"%.*f",(int) decimals,num);
#endif
- return copy(buff,(uint32) strlen(buff), my_charset_latin1, cs);
+ return copy(buff,(uint32) strlen(buff), &my_charset_latin1, cs);
#endif
}
@@ -576,7 +576,6 @@ int sortcmp(const String *x,const String *y)
const char *t= y->ptr();
uint32 x_len=x->length(),y_len=y->length(),len=min(x_len,y_len);
-#ifdef USE_STRCOLL
if (use_strnxfrm(x->str_charset))
{
#ifndef CMP_ENDSPACE
@@ -590,7 +589,6 @@ int sortcmp(const String *x,const String *y)
}
else
{
-#endif /* USE_STRCOLL */
x_len-=len; // For easy end space test
y_len-=len;
if (x->str_charset->sort_order)
@@ -633,9 +631,7 @@ int sortcmp(const String *x,const String *y)
#else
return (int) (x_len-y_len);
#endif /* CMP_ENDSPACE */
-#ifdef USE_STRCOLL
}
-#endif
}
diff --git a/configure.in b/configure.in
index be18ef2ada9..212737535a6 100644
--- a/configure.in
+++ b/configure.in
@@ -2256,9 +2256,6 @@ then
AC_DEFINE(USE_MB_IDENT)
fi
-# Temporary hack for USE_STRCOLL
-AC_DEFINE(USE_STRCOLL)
-
AC_SUBST(default_charset)
AC_DEFINE_UNQUOTED(DEFAULT_CHARSET_NAME,"$default_charset")
diff --git a/include/m_ctype.h b/include/m_ctype.h
index 91bc0e67e64..5cc934eb7cf 100644
--- a/include/m_ctype.h
+++ b/include/m_ctype.h
@@ -144,6 +144,8 @@ typedef struct charset_info_st
int (*longlong10_to_str)(struct charset_info_st *, char *to, uint n,
int radix, longlong val);
+ void (*fill)(struct charset_info_st *, char *to, uint len, int fill);
+
/* String-to-number convertion routines */
long (*strntol)(struct charset_info_st *, const char *s, uint l,
int base, char **e, int *err);
@@ -162,12 +164,22 @@ typedef struct charset_info_st
} CHARSET_INFO;
-extern CHARSET_INFO *my_charset_bin;
-extern CHARSET_INFO *my_charset_latin1;
-extern CHARSET_INFO *default_charset_info;
-extern CHARSET_INFO *system_charset_info;
-extern CHARSET_INFO *all_charsets[256];
-extern my_bool init_compiled_charsets(myf flags);
+extern CHARSET_INFO my_charset_bin;
+extern CHARSET_INFO my_charset_latin1;
+extern CHARSET_INFO my_charset_big5;
+extern CHARSET_INFO my_charset_czech;
+extern CHARSET_INFO my_charset_euc_kr;
+extern CHARSET_INFO my_charset_gb2312;
+extern CHARSET_INFO my_charset_gbk;
+extern CHARSET_INFO my_charset_latin1_de;
+extern CHARSET_INFO my_charset_sjis;
+extern CHARSET_INFO my_charset_tis620;
+extern CHARSET_INFO my_charset_ucs2;
+extern CHARSET_INFO my_charset_ujis;
+extern CHARSET_INFO my_charset_utf8;
+extern CHARSET_INFO my_charset_win1250ch;
+
+
extern my_bool my_parse_charset_xml(const char *bug, uint len,
int (*add)(CHARSET_INFO *cs));
@@ -220,6 +232,8 @@ int my_long10_to_str_8bit(CHARSET_INFO *, char *to, uint l, int radix,
int my_longlong10_to_str_8bit(CHARSET_INFO *, char *to, uint l, int radix,
longlong val);
+void my_fill_8bit(CHARSET_INFO *cs, char* to, uint l, int fill);
+
my_bool my_like_range_simple(CHARSET_INFO *cs,
const char *ptr, uint ptr_length,
int escape, int w_one, int w_many,
diff --git a/include/my_pthread.h b/include/my_pthread.h
index e0394bc978a..355d7c2e147 100644
--- a/include/my_pthread.h
+++ b/include/my_pthread.h
@@ -1,3 +1,4 @@
+
/* Copyright (C) 2000 MySQL AB
This program is free software; you can redistribute it and/or modify
@@ -587,7 +588,7 @@ extern int pthread_dummy(int);
*/
#define DEFAULT_THREAD_STACK (192*1024L)
#else
-#define DEFAULT_THREAD_STACK (192*1024L)
+#define DEFAULT_THREAD_STACK (192*1024)
#endif
struct st_my_thread_var
@@ -601,6 +602,8 @@ struct st_my_thread_var
long id;
int cmp_length;
int volatile abort;
+ struct st_my_thread_var *next,**prev;
+ void *opt_info;
#ifndef DBUG_OFF
gptr dbug;
char name[THREAD_NAME_SIZE+1];
diff --git a/include/my_sys.h b/include/my_sys.h
index 3d81a9e9219..4f41f6eeb94 100644
--- a/include/my_sys.h
+++ b/include/my_sys.h
@@ -201,6 +201,11 @@ extern int (*fatal_error_handler_hook)(uint my_err, const char *str,
myf MyFlags);
/* charsets */
+extern CHARSET_INFO *default_charset_info;
+extern CHARSET_INFO *system_charset_info;
+extern CHARSET_INFO *all_charsets[256];
+extern CHARSET_INFO compiled_charsets[];
+
extern uint get_charset_number(const char *cs_name);
extern const char *get_charset_name(uint cs_number);
extern CHARSET_INFO *get_charset(uint cs_number, myf flags);
diff --git a/isam/_key.c b/isam/_key.c
index 002ad480c56..871ec82eba7 100644
--- a/isam/_key.c
+++ b/isam/_key.c
@@ -53,9 +53,7 @@ uint _nisam_make_key(register N_INFO *info, uint keynr, uchar *key, const char *
}
*key++= (uchar) (length=(uint) (end-pos));
memcpy((byte*) key,(byte*) pos,(size_t) length);
-#ifdef USE_STRCOLL
if (!use_strnxfrm(default_charset_info))
-#endif
{
if (type == HA_KEYTYPE_TEXT)
my_tosort(default_charset_info,(byte*) key,length);
@@ -66,9 +64,7 @@ uint _nisam_make_key(register N_INFO *info, uint keynr, uchar *key, const char *
{
memcpy((byte*) key,(byte*) record+keyseg->base.start,
(size_t) keyseg->base.length);
-#ifdef USE_STRCOLL
if (!use_strnxfrm(default_charset_info))
-#endif
{
if (type == HA_KEYTYPE_TEXT)
my_tosort(default_charset_info,(byte*) key,(uint) keyseg->base.length);
@@ -149,9 +145,7 @@ uint _nisam_pack_key(register N_INFO *info, uint keynr, uchar *key, uchar *old,
}
else
memcpy((byte*) key,old,(size_t) length);
-#ifdef USE_STRCOLL
if (!use_strnxfrm(default_charset_info))
-#endif
{
if (type == HA_KEYTYPE_TEXT)
my_tosort(default_charset_info,(byte*) key,length);
diff --git a/isam/_search.c b/isam/_search.c
index d5e145ae0bf..1ceeab1e824 100644
--- a/isam/_search.c
+++ b/isam/_search.c
@@ -331,7 +331,6 @@ int _nisam_key_cmp(register N_KEYSEG *keyseg, register uchar *a, register uchar
(int) *as : b_length;
end= a+ min(key_length,(uint) length);
-#ifdef USE_STRCOLL
if (use_strnxfrm(default_charset_info)) {
if (((enum ha_base_keytype) keyseg->base.type) == HA_KEYTYPE_BINARY)
{
@@ -349,7 +348,6 @@ int _nisam_key_cmp(register N_KEYSEG *keyseg, register uchar *a, register uchar
}
}
else
-#endif
{
while (a < end)
if ((flag= (int) *a++ - (int) *b++))
@@ -382,7 +380,6 @@ int _nisam_key_cmp(register N_KEYSEG *keyseg, register uchar *a, register uchar
}
else
{
-#ifdef USE_STRCOLL
if (use_strnxfrm(default_charset_info)) {
if (((enum ha_base_keytype) keyseg->base.type) == HA_KEYTYPE_BINARY)
{
@@ -400,7 +397,6 @@ int _nisam_key_cmp(register N_KEYSEG *keyseg, register uchar *a, register uchar
}
}
else
-#endif
{
while (a < end)
if ((flag= (int) *a++ - (int) *b++))
diff --git a/libmysql/Makefile.shared b/libmysql/Makefile.shared
index 1f74cc23678..f7a5a1d97b7 100644
--- a/libmysql/Makefile.shared
+++ b/libmysql/Makefile.shared
@@ -35,12 +35,12 @@ mystringsobjects = strmov.lo strxmov.lo strxnmov.lo strnmov.lo \
strmake.lo strend.lo \
strnlen.lo strfill.lo is_prefix.lo \
int2str.lo str2int.lo strinstr.lo strcont.lo \
- strcend.lo bcmp.lo \
+ strcend.lo bcmp.lo ctype-latin1.lo \
bchange.lo bmove.lo bmove_upp.lo longlong2str.lo \
strtoull.lo strtoll.lo llstr.lo my_vsnprintf.lo \
ctype.lo ctype-simple.lo ctype-bin.lo ctype-mb.lo \
ctype-big5.lo ctype-czech.lo ctype-euc_kr.lo \
- ctype-win1250ch.lo ctype-utf8.lo \
+ ctype-win1250ch.lo ctype-utf8.lo ctype-extra.lo \
ctype-gb2312.lo ctype-gbk.lo ctype-latin1_de.lo \
ctype-sjis.lo ctype-tis620.lo ctype-ujis.lo xml.lo
diff --git a/myisam/mi_open.c b/myisam/mi_open.c
index 250e0483fe5..4eb7376cdb6 100644
--- a/myisam/mi_open.c
+++ b/myisam/mi_open.c
@@ -329,7 +329,11 @@ MI_INFO *mi_open(const char *name, int mode, uint open_flags)
{
*pos=ft_keysegs[j];
pos[0].language= pos[-1].language;
- pos[0].charset= pos[-1].charset;
+ if (!(pos[0].charset= pos[-1].charset))
+ {
+ my_errno=HA_ERR_CRASHED;
+ goto err;
+ }
pos++;
}
}
diff --git a/mysql-test/r/analyse.result b/mysql-test/r/analyse.result
index 0cb33526457..48882f42219 100644
--- a/mysql-test/r/analyse.result
+++ b/mysql-test/r/analyse.result
@@ -3,7 +3,7 @@ create table t1 (i int, j int);
insert into t1 values (1,2), (3,4), (5,6), (7,8);
select count(*) from t1 procedure analyse();
Field_name Min_value Max_value Min_length Max_length Empties_or_zeros Nulls Avg_value_or_avg_length Std Optimal_fieldtype
- -6510615555426900571 -6510615555426900571 -6510615555426900571 -6510615555426900571
+count(*) 4 4 1 1 0 0 4.0000 0.0000 ENUM('4') NOT NULL
select * from t1 procedure analyse();
Field_name Min_value Max_value Min_length Max_length Empties_or_zeros Nulls Avg_value_or_avg_length Std Optimal_fieldtype
t1.i 1 7 1 1 0 0 4.0000 2.2361 ENUM('1','3','5','7') NOT NULL
diff --git a/mysql-test/r/replace.result b/mysql-test/r/replace.result
index 0aa80e18ccc..4a71428b2f4 100644
--- a/mysql-test/r/replace.result
+++ b/mysql-test/r/replace.result
@@ -12,15 +12,17 @@ replace into t1 (gesuchnr,benutzer_id) values (1,1);
alter table t1 type=heap;
replace into t1 (gesuchnr,benutzer_id) values (1,1);
drop table t1;
-create table t1 (a tinyint not null auto_increment primary key, b char(20));
-insert into t1 values (126,"first"),(0,"last");
+create table t1 (a tinyint not null auto_increment primary key, b char(20) default "default_value");
+insert into t1 values (126,"first"),(63, "middle"),(0,"last");
insert into t1 values (0,"error");
Duplicate entry '127' for key 1
replace into t1 values (0,"error");
Duplicate entry '127' for key 1
replace into t1 values (126,"first updated");
+replace into t1 values (63,default);
select * from t1;
a b
126 first updated
+63 default_value
127 last
drop table t1;
diff --git a/mysql-test/t/replace.test b/mysql-test/t/replace.test
index 7aeb2475ab5..2afce2fcc84 100644
--- a/mysql-test/t/replace.test
+++ b/mysql-test/t/replace.test
@@ -27,12 +27,13 @@ drop table t1;
# Test when using replace on a key that has used up it's whole range
#
-create table t1 (a tinyint not null auto_increment primary key, b char(20));
-insert into t1 values (126,"first"),(0,"last");
+create table t1 (a tinyint not null auto_increment primary key, b char(20) default "default_value");
+insert into t1 values (126,"first"),(63, "middle"),(0,"last");
--error 1062
insert into t1 values (0,"error");
--error 1062
replace into t1 values (0,"error");
replace into t1 values (126,"first updated");
+replace into t1 values (63,default);
select * from t1;
drop table t1;
diff --git a/mysys/charset.c b/mysys/charset.c
index 591ba568e3d..68377aec355 100644
--- a/mysys/charset.c
+++ b/mysys/charset.c
@@ -75,6 +75,7 @@ static void simple_cs_init_functions(CHARSET_INFO *cs)
cs->snprintf = my_snprintf_8bit;
cs->long10_to_str= my_long10_to_str_8bit;
cs->longlong10_to_str= my_longlong10_to_str_8bit;
+ cs->fill = my_fill_8bit;
cs->strntol = my_strntol_8bit;
cs->strntoul = my_strntoul_8bit;
cs->strntoll = my_strntoll_8bit;
@@ -313,6 +314,78 @@ char *get_charsets_dir(char *buf)
DBUG_RETURN(strend(buf));
}
+CHARSET_INFO *all_charsets[256];
+CHARSET_INFO *default_charset_info = &my_charset_latin1;
+CHARSET_INFO *system_charset_info = &my_charset_latin1;
+
+#define MY_ADD_CHARSET(x) all_charsets[(x)->number]=(x)
+
+
+static my_bool init_compiled_charsets(myf flags __attribute__((unused)))
+{
+ CHARSET_INFO *cs;
+
+ MY_ADD_CHARSET(&my_charset_latin1);
+
+ MY_ADD_CHARSET(&my_charset_bin);
+
+#ifdef HAVE_CHARSET_big5
+ MY_ADD_CHARSET(&my_charset_big5);
+#endif
+
+#ifdef HAVE_CHARSET_czech
+ MY_ADD_CHARSET(&my_charset_czech);
+#endif
+
+#ifdef HAVE_CHARSET_euc_kr
+ MY_ADD_CHARSET(&my_charset_euc_kr);
+#endif
+
+#ifdef HAVE_CHARSET_gb2312
+ MY_ADD_CHARSET(&my_charset_gb2312);
+#endif
+
+#ifdef HAVE_CHARSET_gbk
+ MY_ADD_CHARSET(&my_charset_gbk);
+#endif
+
+#ifdef HAVE_CHARSET_latin1_de
+ MY_ADD_CHARSET(&my_charset_latin1_de);
+#endif
+
+#ifdef HAVE_CHARSET_sjis
+ MY_ADD_CHARSET(&my_charset_sjis);
+#endif
+
+#ifdef HAVE_CHARSET_tis620
+ MY_ADD_CHARSET(&my_charset_tis620);
+#endif
+
+#ifdef HAVE_CHARSET_ucs2
+ MY_ADD_CHARSET(&my_charset_ucs2);
+#endif
+
+#ifdef HAVE_CHARSET_ujis
+ MY_ADD_CHARSET(&my_charset_ujis);
+#endif
+
+#ifdef HAVE_CHARSET_utf8
+ MY_ADD_CHARSET(&my_charset_utf8);
+#endif
+
+#ifdef HAVE_CHARSET_win1250ch
+ MY_ADD_CHARSET(&my_charset_win1250ch);
+#endif
+
+ /* Copy compiled charsets */
+ for (cs=compiled_charsets; cs->name; cs++)
+ {
+ all_charsets[cs->number]=cs;
+ }
+
+ return FALSE;
+}
+
static my_bool init_available_charsets(myf myflags)
{
char fname[FN_REFLEN];
@@ -606,3 +679,5 @@ char *list_charsets(myf want_flags)
return p;
}
+
+
diff --git a/mysys/mf_keycache.c b/mysys/mf_keycache.c
index 6a037f13f05..9d45ec8d539 100644
--- a/mysys/mf_keycache.c
+++ b/mysys/mf_keycache.c
@@ -15,855 +15,1856 @@
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
/*
- This functions is handle keyblock cacheing for NISAM, MISAM and PISAM
- databases.
- One cache can handle many files. Every different blocksize has it owns
- set of buffers that are allocated from block_mem.
+ These functions are to handle keyblock cacheing
+ for NISAM, MISAM and PISAM databases.
+ One cache can handle many files.
+ It must contain buffers of the same blocksize.
init_key_cache() should be used to init cache handler.
- */
+*/
#include "mysys_priv.h"
#include "my_static.h"
#include <m_string.h>
#include <errno.h>
+#include <assert.h>
+#include <stdarg.h>
+
+/*
+ Some compilation flags have been added specifically for this module
+ to control the following:
+ - not to let a thread to yield the control when reading directly
+ from key cache, which might improve performance in many cases;
+ to enable this add:
+ #define SERIALIZED_READ_FROM_CACHE
+ - to set an upper bound for number of threads simultaneously
+ using the key cache; this setting helps to determine an optimal
+ size for hash table and improve performance when the number of
+ blocks in the key cache much less than the number of threads
+ accessing it;
+ to set this number equal to <N> add
+ #define MAX_THREADS <N>
+ - to substitute calls of pthread_cond_wait for calls of
+ pthread_cond_timedwait (wait with timeout set up);
+ this setting should be used only when you want to trap a deadlock
+ situation, which theoretically should not happen;
+ to set timeout equal to <T> seconds add
+ #define KEYCACHE_TIMEOUT <T>
+ - to enable the module traps and to send debug information from
+ key cache module to a special debug log add:
+ #define KEYCACHE_DEBUG
+ the name of this debug log file <LOG NAME> can be set through:
+ #define KEYCACHE_DEBUG_LOG <LOG NAME>
+ if the name is not defined, it's set by default;
+ if the KEYCACHE_DEBUG flag is not set up and we are in a debug
+ mode, i.e. when ! defined(DBUG_OFF), the debug information from the
+ module is sent to the regular debug log.
+
+ Example of the settings:
+ #define SERIALIZED_READ_FROM_CACHE
+ #define MAX_THREADS 100
+ #define KEYCACHE_TIMEOUT 1
+ #define KEYCACHE_DEBUG
+ #define KEYCACHE_DEBUG_LOG "my_key_cache_debug.log"
+*/
#if defined(MSDOS) && !defined(M_IC80386)
- /* We nead much memory */
+/* we nead much memory */
#undef my_malloc_lock
#undef my_free_lock
-#define my_malloc_lock(A,B) halloc((long) (A/IO_SIZE),IO_SIZE)
-#define my_free_lock(A,B) hfree(A)
-#endif
+#define my_malloc_lock(A,B) halloc((long) (A/IO_SIZE),IO_SIZE)
+#define my_free_lock(A,B) hfree(A)
+#endif /* defined(MSDOS) && !defined(M_IC80386) */
+
+#define STRUCT_PTR(TYPE, MEMBER, a) \
+ (TYPE *) ((char *) (a) - offsetof(TYPE, MEMBER))
+
+/* types of condition variables */
+#define COND_FOR_REQUESTED 0
+#define COND_FOR_SAVED 1
+#define COND_FOR_READERS 2
+
+typedef pthread_cond_t KEYCACHE_CONDVAR;
+typedef struct st_keycache_wqueue
+{ /* info about requests in a waiting queue */
+ struct st_my_thread_var *last_thread; /* circular list of waiting threads */
+} KEYCACHE_WQUEUE;
+
+typedef struct st_keycache_page
+{ /* descriptor of the page in the key cache block buffer */
+ int file; /* file to which the page belongs to */
+ my_off_t filepos; /* position of the page in the file */
+} KEYCACHE_PAGE;
+
+typedef struct st_hash_link
+{ /* element in the chain of a hash table bucket */
+ struct st_hash_link *next, **prev; /* to connect links in the same bucket */
+ struct st_block_link *block; /* reference to the block for the page: */
+ File file; /* from such a file */
+ my_off_t diskpos; /* with such an offset */
+ uint requests; /* number of requests for the page */
+} HASH_LINK; /* offset is always alighed for key_cache_block_size */
+
+/* simple states of a block */
+#define BLOCK_ERROR 1 /* an error occured when performing disk i/o */
+#define BLOCK_READ 2 /* the is page in the block buffer */
+#define BLOCK_IN_SWITCH 4 /* block is preparing to read new page */
+#define BLOCK_REASSIGNED 8 /* block does not accept requests for old page */
+#define BLOCK_IN_FLUSH 16 /* block is in flush operation */
+#define BLOCK_CHANGED 32 /* block buffer contains a dirty page */
+
+/* page status, returned by find_key_block */
+#define PAGE_READ 0
+#define PAGE_TO_BE_READ 1
+#define PAGE_WAIT_TO_BE_READ 2
+
+typedef struct st_block_link
+{ /* key cache block */
+ struct st_block_link
+ *next_used, **prev_used; /* to connect links in the LRU chain (ring) */
+ struct st_block_link
+ *next_changed, **prev_changed; /* for lists of file dirty/clean blocks */
+ struct st_hash_link *hash_link; /* backward ptr to referring hash_link */
+ KEYCACHE_WQUEUE wqueue[2]; /* queues on waiting requests for new/old pages */
+ uint requests; /* number of requests for the block */
+ byte *buffer; /* buffer for the block page */
+ uint offset; /* beginning of modified data in the buffer */
+ uint length; /* end of data in the buffer */
+ uint status; /* state of the block */
+ KEYCACHE_CONDVAR *condvar; /* condition variable for 'no readers' event */
+} BLOCK_LINK;
-/* size of map to be used to find changed files */
+static int flush_all_key_blocks();
+static void test_key_cache(const char *where, my_bool lock);
-#define CHANGED_BLOCKS_HASH 128 /* Must be power of 2 */
-#define CHANGED_BLOCKS_MASK (CHANGED_BLOCKS_HASH-1)
-#define FLUSH_CACHE 2000 /* Sort this many blocks at once */
+uint key_cache_block_size= /* size of the page buffer of a cache block */
+ DEFAULT_KEYCACHE_BLOCK_SIZE;
+static uint key_cache_shift;
+
+#define CHANGED_BLOCKS_HASH 128 /* must be power of 2 */
+#define FLUSH_CACHE 2000 /* sort this many blocks at once */
+
+static KEYCACHE_WQUEUE
+ waiting_for_hash_link; /* queue of requests waiting for a free hash link */
+static KEYCACHE_WQUEUE
+ waiting_for_block; /* queue of requests waiting for a free block */
+
+static HASH_LINK **_my_hash_root; /* arr. of entries into hash table buckets */
+static uint _my_hash_entries; /* max number of entries in the hash table */
+static HASH_LINK *_my_hash_link_root; /* memory for hash table links */
+static int _my_hash_links; /* max number of hash links */
+static int _my_hash_links_used; /* number of hash links currently used */
+static HASH_LINK *_my_free_hash_list; /* list of free hash links */
+static BLOCK_LINK *_my_block_root; /* memory for block links */
+static int _my_disk_blocks; /* max number of blocks in the cache */
+static byte HUGE_PTR *_my_block_mem; /* memory for block buffers */
+static BLOCK_LINK *_my_used_last; /* ptr to the last block of the LRU chain */
+ulong _my_blocks_used, /* number of currently used blocks */
+ _my_blocks_changed; /* number of currently dirty blocks */
+#if defined(KEYCACHE_DEBUG)
+static
+ulong _my_blocks_available; /* number of blocks available in the LRU chain */
+#endif /* defined(KEYCACHE_DEBUG) */
+ulong _my_cache_w_requests,_my_cache_write, /* counters */
+ _my_cache_r_requests,_my_cache_read; /* for statistics */
+static BLOCK_LINK
+ *changed_blocks[CHANGED_BLOCKS_HASH]; /* hash table for file dirty blocks */
+static BLOCK_LINK
+ *file_blocks[CHANGED_BLOCKS_HASH]; /* hash table for other file blocks */
+ /* that are not free */
+#ifndef DBUG_OFF
+static my_bool _my_printed;
+#endif
-typedef struct sec_link {
- struct sec_link *next_hash,**prev_hash;/* Blocks linked acc. to hash-value */
- struct sec_link *next_used,*prev_used;
- struct sec_link *next_changed,**prev_changed;
- File file;
- my_off_t diskpos;
- byte *buffer;
- my_bool changed;
-} SEC_LINK;
+#define KEYCACHE_HASH(f, pos) \
+ (((ulong) ((pos) >> key_cache_shift)+(ulong) (f)) & (_my_hash_entries-1))
+#define FILE_HASH(f) ((uint) (f) & (CHANGED_BLOCKS_HASH-1))
+#define DEFAULT_KEYCACHE_DEBUG_LOG "keycache_debug.log"
-static SEC_LINK *find_key_block(int file,my_off_t filepos,int *error);
-static int flush_all_key_blocks();
+#if defined(KEYCACHE_DEBUG) && ! defined(KEYCACHE_DEBUG_LOG)
+#define KEYCACHE_DEBUG_LOG DEFAULT_KEYCACHE_DEBUG_LOG
+#endif
- /* static variables in this file */
-static SEC_LINK *_my_block_root,**_my_hash_root,
- *_my_used_first,*_my_used_last;
-static int _my_disk_blocks;
-static uint _my_disk_blocks_used, _my_hash_blocks;
-static uint key_cache_shift;
-ulong _my_blocks_used,_my_blocks_changed;
-ulong _my_cache_w_requests,_my_cache_write,_my_cache_r_requests,
- _my_cache_read;
-uint key_cache_block_size=DEFAULT_KEYCACHE_BLOCK_SIZE;
-static byte HUGE_PTR *_my_block_mem;
-static SEC_LINK *changed_blocks[CHANGED_BLOCKS_HASH];
-static SEC_LINK *file_blocks[CHANGED_BLOCKS_HASH];
-#ifndef DBUG_OFF
-static my_bool _my_printed;
+#if defined(KEYCACHE_DEBUG_LOG)
+static FILE *keycache_debug_log=NULL;
+static void keycache_debug_print _VARARGS((const char *fmt,...));
+#define KEYCACHE_DEBUG_OPEN \
+ keycache_debug_log=fopen(KEYCACHE_DEBUG_LOG, "w")
+
+#define KEYCACHE_DEBUG_CLOSE \
+ if (keycache_debug_log) fclose(keycache_debug_log)
+#else
+#define KEYCACHE_DEBUG_OPEN
+#define KEYCACHE_DEBUG_CLOSE
+#endif /* defined(KEYCACHE_DEBUG_LOG) */
+
+#if defined(KEYCACHE_DEBUG_LOG) && defined(KEYCACHE_DEBUG)
+#define KEYCACHE_DBUG_PRINT(l, m) \
+ { if (keycache_debug_log) fprintf(keycache_debug_log, "%s: ", l); \
+ keycache_debug_print m; }
+
+#define KEYCACHE_DBUG_ASSERT(a) \
+ { if (! (a) && keycache_debug_log) fclose(keycache_debug_log); \
+ assert(a); }
+#else
+#define KEYCACHE_DBUG_PRINT(l, m) DBUG_PRINT(l, m)
+#define KEYCACHE_DBUG_ASSERT(a) DBUG_ASSERT(a)
+#endif /* defined(KEYCACHE_DEBUG_LOG) && defined(KEYCACHE_DEBUG) */
+
+#if defined(KEYCACHE_DEBUG) || !defined(DBUG_OFF)
+static long keycache_thread_id;
+#define KEYCACHE_THREAD_TRACE(l) \
+ KEYCACHE_DBUG_PRINT(l,("|thread %ld",keycache_thread_id))
+
+#define KEYCACHE_THREAD_TRACE_BEGIN(l) \
+ { struct st_my_thread_var *thread_var =my_thread_var; \
+ keycache_thread_id=my_thread_var->id; \
+ KEYCACHE_DBUG_PRINT(l,("[thread %ld",keycache_thread_id)) }
+
+#define KEYCACHE_THREAD_TRACE_END(l) \
+ KEYCACHE_DBUG_PRINT(l,("]thread %ld",keycache_thread_id))
+#else
+#define KEYCACHE_THREAD_TRACE_BEGIN(l)
+#define KEYCACHE_THREAD_TRACE_END(l)
+#define KEYCACHE_THREAD_TRACE(l)
+#endif /* defined(KEYCACHE_DEBUG) || !defined(DBUG_OFF) */
+
+#define BLOCK_NUMBER(b) \
+ ((uint) (((char*)(b) - (char *) _my_block_root) / sizeof(BLOCK_LINK)))
+#define HASH_LINK_NUMBER(h) \
+ ((uint) (((char*)(h) - (char *) _my_hash_link_root) / sizeof(HASH_LINK)))
+
+#if (defined(KEYCACHE_TIMEOUT) && !defined(__WIN__)) || defined(KEYCACHE_DEBUG)
+static int keycache_pthread_cond_wait(pthread_cond_t *cond,
+ pthread_mutex_t *mutex);
+#else
+#define keycache_pthread_cond_wait pthread_cond_wait
#endif
+#if defined(KEYCACHE_DEBUG)
+static int keycache_pthread_mutex_lock(pthread_mutex_t *mutex);
+static void keycache_pthread_mutex_unlock(pthread_mutex_t *mutex);
+static int keycache_pthread_cond_signal(pthread_cond_t *cond);
+static int keycache_pthread_cond_broadcast(pthread_cond_t *cond);
+#else
+#define keycache_pthread_mutex_lock pthread_mutex_lock
+#define keycache_pthread_mutex_unlock pthread_mutex_unlock
+#define keycache_pthread_cond_signal pthread_cond_signal
+#define keycache_pthread_cond_broadcast pthread_cond_broadcast
+#endif /* defined(KEYCACHE_DEBUG) */
+
+static uint next_power(uint value)
+{
+ uint old_value=1;
+ while (value)
+ {
+ old_value=value;
+ value&= value-1;
+ }
+ return (old_value << 1);
+}
- /* Init of disk_buffert */
- /* Returns blocks in use */
- /* ARGSUSED */
+/*
+ Initialize the key cache,
+ return number of blocks in it
+*/
int init_key_cache(ulong use_mem)
{
- uint blocks,length;
+ uint blocks, hash_links, length;
+ int error;
+
DBUG_ENTER("init_key_cache");
-
+
+ KEYCACHE_DEBUG_OPEN;
if (key_cache_inited && _my_disk_blocks > 0)
{
- DBUG_PRINT("warning",("key cache already in use")); /* purecov: inspected */
- DBUG_RETURN(0); /* purecov: inspected */
+ DBUG_PRINT("warning",("key cache already in use"));
+ DBUG_RETURN(0);
}
if (! key_cache_inited)
{
key_cache_inited=TRUE;
_my_disk_blocks= -1;
key_cache_shift=my_bit_log2(key_cache_block_size);
- DBUG_PRINT("info",("key_cache_block_size: %u key_cache_shift: %u",
- key_cache_block_size, key_cache_shift));
+ DBUG_PRINT("info",("key_cache_block_size: %u",
+ key_cache_block_size));
#ifndef DBUG_OFF
_my_printed=0;
#endif
}
-
- blocks= (uint) (use_mem/(sizeof(SEC_LINK)+sizeof(SEC_LINK*)*5/4+
- key_cache_block_size));
- /* No use to have very few blocks */
+
+ _my_cache_w_requests=_my_cache_r_requests=_my_cache_read=_my_cache_write=0;
+
+ _my_block_mem=NULL;
+ _my_block_root=NULL;
+
+ blocks= (uint) (use_mem/(sizeof(BLOCK_LINK)+2*sizeof(HASH_LINK)+
+ sizeof(HASH_LINK*)*5/4+key_cache_block_size));
+ /* It doesn't make sense to have too few blocks (less than 8) */
if (blocks >= 8 && _my_disk_blocks < 0)
{
for (;;)
{
- /* Set my_hash_blocks to the next bigger 2 power */
- _my_hash_blocks=(uint) 1 << (my_bit_log2(blocks*5/4)+1);
- while ((length=(uint) blocks*sizeof(SEC_LINK)+
- sizeof(SEC_LINK*)*_my_hash_blocks)+
- ((ulong) blocks << key_cache_shift) >
- use_mem)
- blocks--;
- if ((_my_block_mem=my_malloc_lock((ulong) blocks << key_cache_shift,
- MYF(0))))
+ /* Set _my_hash_entries to the next bigger 2 power */
+ if ((_my_hash_entries=next_power(blocks)) < blocks*5/4)
+ _my_hash_entries<<=1;
+ hash_links=2*blocks;
+#if defined(MAX_THREADS)
+ if (hash_links < MAX_THREADS + blocks - 1)
+ hash_links=MAX_THREADS + blocks - 1;
+#endif
+ while ((length=blocks*sizeof(BLOCK_LINK)+hash_links*sizeof(HASH_LINK)+
+ sizeof(HASH_LINK*)*_my_hash_entries)+
+ ((ulong) blocks << key_cache_shift) >
+ use_mem)
+ blocks--;
+ /* Allocate memory for cache page buffers */
+ if ((_my_block_mem=my_malloc_lock((ulong) blocks*key_cache_block_size,
+ MYF(0))))
+ {
+ /*
+ Allocate memory for blocks, hash_links and hash entries;
+ For each block 2 hash links are allocated
+ */
+ if ((_my_block_root=(BLOCK_LINK*) my_malloc((uint) length,MYF(0))))
+ break;
+ my_free_lock(_my_block_mem,MYF(0));
+ }
+ if (blocks < 8)
{
- if ((_my_block_root=(SEC_LINK*) my_malloc((uint) length,MYF(0))) != 0)
- break;
- my_free_lock(_my_block_mem,MYF(0));
+ my_errno=ENOMEM;
+ goto err;
}
- if (blocks < 8)
- goto err;
blocks=blocks/4*3;
}
_my_disk_blocks=(int) blocks;
- _my_hash_root= (SEC_LINK**) (_my_block_root+blocks);
- bzero((byte*) _my_hash_root,_my_hash_blocks*sizeof(SEC_LINK*));
- _my_used_first=_my_used_last=0;
- _my_blocks_used=_my_disk_blocks_used=_my_blocks_changed=0;
- _my_cache_w_requests=_my_cache_r_requests=_my_cache_read=_my_cache_write=0;
- DBUG_PRINT("exit",("disk_blocks: %d block_root: %lx _my_hash_blocks: %d hash_root: %lx",
- _my_disk_blocks,_my_block_root,_my_hash_blocks,
- _my_hash_root));
+ _my_hash_links=hash_links;
+ _my_hash_root=(HASH_LINK**) (_my_block_root+blocks);
+ _my_hash_link_root=(HASH_LINK*) (_my_hash_root+_my_hash_entries);
+ bzero((byte*) _my_block_root,_my_disk_blocks*sizeof(BLOCK_LINK));
+ bzero((byte*) _my_hash_root,_my_hash_entries*sizeof(HASH_LINK*));
+ bzero((byte*) _my_hash_link_root,_my_hash_links*sizeof(HASH_LINK));
+ _my_hash_links_used=0;
+ _my_free_hash_list=NULL;
+ _my_blocks_used=_my_blocks_changed=0;
+#if defined(KEYCACHE_DEBUG)
+ _my_blocks_available=0;
+#endif
+ /* The LRU chain is empty after initialization */
+ _my_used_last=NULL;
+
+ waiting_for_hash_link.last_thread=NULL;
+ waiting_for_block.last_thread=NULL;
+ DBUG_PRINT("exit",
+ ("disk_blocks: %d block_root: %lx hash_entries: %d hash_root: %lx \
+ hash_links: %d hash_link_root %lx",
+ _my_disk_blocks,_my_block_root,_my_hash_entries,_my_hash_root,
+ _my_hash_links,_my_hash_link_root));
}
bzero((gptr) changed_blocks,sizeof(changed_blocks[0])*CHANGED_BLOCKS_HASH);
bzero((gptr) file_blocks,sizeof(file_blocks[0])*CHANGED_BLOCKS_HASH);
+
DBUG_RETURN((int) blocks);
-
+
err:
- my_errno=ENOMEM;
+ error=my_errno;
+ if (_my_block_mem)
+ my_free_lock((gptr) _my_block_mem,MYF(0));
+ if (_my_block_mem)
+ my_free((gptr) _my_block_root,MYF(0));
+ my_errno=error;
DBUG_RETURN(0);
-} /* init_key_cache */
+}
/*
- Resize the key cache
-
- SYNOPSIS
- resize_key_cache()
- use_mem Bytes to use for new key cache
-
- RETURN VALUES
- 0 Error
- # number of blocks in key cache
+ Resize the key cache
*/
-
-
int resize_key_cache(ulong use_mem)
{
- int block;
- pthread_mutex_lock(&THR_LOCK_keycache);
+ int blocks;
+ keycache_pthread_mutex_lock(&THR_LOCK_keycache);
if (flush_all_key_blocks())
{
- /* TODO: If this happens, we should write a warning in the log file ! */
- pthread_mutex_unlock(&THR_LOCK_keycache);
+ /* TODO: if this happens, we should write a warning in the log file ! */
+ keycache_pthread_mutex_unlock(&THR_LOCK_keycache);
return 0;
}
end_key_cache();
- /* The following will work even if memory is 0 */
- block=init_key_cache(use_mem);
- pthread_mutex_unlock(&THR_LOCK_keycache);
- return block;
+ /* the following will work even if memory is 0 */
+ blocks=init_key_cache(use_mem);
+ keycache_pthread_mutex_unlock(&THR_LOCK_keycache);
+ return blocks;
}
- /* Remove key_cache from memory */
-
+/*
+ Remove key_cache from memory
+*/
void end_key_cache(void)
{
DBUG_ENTER("end_key_cache");
- if (! _my_blocks_changed)
+ if (_my_disk_blocks > 0)
{
- if (_my_disk_blocks > 0)
+ if (_my_block_mem)
{
my_free_lock((gptr) _my_block_mem,MYF(0));
my_free((gptr) _my_block_root,MYF(0));
- _my_disk_blocks= -1;
}
+ _my_disk_blocks= -1;
}
+ KEYCACHE_DEBUG_CLOSE;
key_cache_inited=0;
- _my_hash_blocks=_my_blocks_used=0;
DBUG_PRINT("status",
- ("used: %d changed: %d w_requests: %ld writes: %ld r_requests: %ld reads: %ld",
- _my_blocks_used,_my_blocks_changed,_my_cache_w_requests,
- _my_cache_write,_my_cache_r_requests,_my_cache_read));
+ ("used: %d changed: %d w_requests: %ld \
+ writes: %ld r_requests: %ld reads: %ld",
+ _my_blocks_used,_my_blocks_changed,_my_cache_w_requests,
+ _my_cache_write,_my_cache_r_requests,_my_cache_read));
DBUG_VOID_RETURN;
} /* end_key_cache */
-static inline void link_into_file_blocks(SEC_LINK *next, int file)
+/*
+ Link a thread into double-linked queue of waiting threads
+*/
+static inline void link_into_queue(KEYCACHE_WQUEUE *wqueue,
+ struct st_my_thread_var *thread)
+{
+ struct st_my_thread_var *last;
+ if (! (last=wqueue->last_thread))
+ { /* Queue is empty */
+ thread->next=thread;
+ thread->prev=&thread->next;
+ }
+ else
+ {
+ thread->prev=last->next->prev;
+ last->next->prev=&thread->next;
+ thread->next=last->next;
+ last->next=thread;
+ }
+ wqueue->last_thread=thread;
+}
+
+/*
+ Unlink a thread from double-linked queue of waiting threads
+*/
+static inline void unlink_from_queue(KEYCACHE_WQUEUE *wqueue,
+ struct st_my_thread_var *thread)
+{
+ KEYCACHE_DBUG_PRINT("unlink_from_queue", ("thread %ld", thread->id));
+ if (thread->next == thread)
+ /* The queue contains only one member */
+ wqueue->last_thread=NULL;
+ else
+ {
+ thread->next->prev=thread->prev;
+ *thread->prev=thread->next;
+ if (wqueue->last_thread == thread)
+ wqueue->last_thread=STRUCT_PTR(struct st_my_thread_var, next,
+ thread->prev);
+ }
+ thread->next=NULL;
+}
+
+
+/*
+ Add a thread to single-linked queue of waiting threads
+*/
+static inline void add_to_queue(KEYCACHE_WQUEUE *wqueue,
+ struct st_my_thread_var *thread)
+{
+ struct st_my_thread_var *last;
+ if (! (last=wqueue->last_thread))
+ thread->next=thread;
+ else
+ {
+ thread->next=last->next;
+ last->next=thread;
+ }
+ wqueue->last_thread=thread;
+}
+
+
+/*
+ Remove all threads from queue signaling them to proceed
+*/
+static inline void release_queue(KEYCACHE_WQUEUE *wqueue)
+{
+ struct st_my_thread_var *last=wqueue->last_thread;
+ struct st_my_thread_var *next=last->next;
+ struct st_my_thread_var *thread;
+ do
+ {
+ thread=next;
+ keycache_pthread_cond_signal(&thread->suspend);
+ KEYCACHE_DBUG_PRINT("release_queue: signal", ("thread %ld", thread->id));
+ next=thread->next;
+ thread->next=NULL;
+ }
+ while (thread != last);
+ wqueue->last_thread=NULL;
+}
+
+
+/*
+ Unlink a block from the chain of dirty/clean blocks
+*/
+static inline void unlink_changed(BLOCK_LINK *block)
{
- reg1 SEC_LINK **ptr= &file_blocks[(uint) file & CHANGED_BLOCKS_MASK];
- next->prev_changed= ptr;
- if ((next->next_changed= *ptr))
- (*ptr)->prev_changed= &next->next_changed;
- *ptr=next;
+ if (block->next_changed)
+ block->next_changed->prev_changed=block->prev_changed;
+ *block->prev_changed=block->next_changed;
}
-static inline void relink_into_file_blocks(SEC_LINK *next, int file)
+/*
+ Link a block into the chain of dirty/clean blocks
+*/
+static inline void link_changed(BLOCK_LINK *block, BLOCK_LINK **phead)
{
- reg1 SEC_LINK **ptr= &file_blocks[(uint) file & CHANGED_BLOCKS_MASK];
- if (next->next_changed)
- next->next_changed->prev_changed=next->prev_changed;
- *next->prev_changed=next->next_changed;
- next->prev_changed= ptr;
- if ((next->next_changed= *ptr))
- (*ptr)->prev_changed= &next->next_changed;
- *ptr=next;
+ block->prev_changed=phead;
+ if ((block->next_changed=*phead))
+ (*phead)->prev_changed= &block->next_changed;
+ *phead=block;
}
-static inline void link_changed_to_file(SEC_LINK *next,int file)
+
+/*
+ Unlink a block from the chain of dirty/clean blocks, if it's asked for,
+ and link it to the chain of clean blocks for the specified file
+*/
+static inline void link_to_file_list(BLOCK_LINK *block,int file,
+ my_bool unlink)
{
- reg1 SEC_LINK **ptr= &file_blocks[(uint) file & CHANGED_BLOCKS_MASK];
- if (next->next_changed)
- next->next_changed->prev_changed=next->prev_changed;
- *next->prev_changed=next->next_changed;
- next->prev_changed= ptr;
- if ((next->next_changed= *ptr))
- (*ptr)->prev_changed= &next->next_changed;
- *ptr=next;
- next->changed=0;
- _my_blocks_changed--;
+ if (unlink)
+ unlink_changed(block);
+ link_changed(block,&file_blocks[FILE_HASH(file)]);
+ if (block->status & BLOCK_CHANGED)
+ {
+ block->status&=~BLOCK_CHANGED;
+ _my_blocks_changed--;
+ }
}
-static inline void link_file_to_changed(SEC_LINK *next)
+
+/*
+ Unlink a block from the chain of clean blocks for the specified
+ file and link it to the chain of dirty blocks for this file
+*/
+static inline void link_to_changed_list(BLOCK_LINK *block)
{
- reg1 SEC_LINK **ptr= &changed_blocks[(uint) next->file & CHANGED_BLOCKS_MASK];
- if (next->next_changed)
- next->next_changed->prev_changed=next->prev_changed;
- *next->prev_changed=next->next_changed;
- next->prev_changed= ptr;
- if ((next->next_changed= *ptr))
- (*ptr)->prev_changed= &next->next_changed;
- *ptr=next;
- next->changed=1;
+ unlink_changed(block);
+ link_changed(block,&changed_blocks[FILE_HASH(block->hash_link->file)]);
+ block->status|=BLOCK_CHANGED;
_my_blocks_changed++;
}
-#if !defined(DBUG_OFF) && !defined(EXTRA_DEBUG)
-#define DBUG_OFF /* This should work */
+/*
+ Link a block to the LRU chain at the beginning or at the end
+*/
+static void link_block(BLOCK_LINK *block, my_bool at_end)
+{
+ KEYCACHE_DBUG_ASSERT(! (block->hash_link && block->hash_link->requests));
+ if (waiting_for_block.last_thread) {
+ /* Signal that in the LRU chain an available block has appeared */
+ struct st_my_thread_var *last_thread=waiting_for_block.last_thread;
+ struct st_my_thread_var *first_thread=last_thread->next;
+ struct st_my_thread_var *next_thread=first_thread;
+ HASH_LINK *hash_link= (HASH_LINK *) first_thread->opt_info;
+ struct st_my_thread_var *thread;
+ do
+ {
+ thread=next_thread;
+ next_thread=thread->next;
+ /*
+ We notify about the event all threads that ask
+ for the same page as the first thread in the queue
+ */
+ if ((HASH_LINK *) thread->opt_info == hash_link)
+ {
+ keycache_pthread_cond_signal(&thread->suspend);
+ unlink_from_queue(&waiting_for_block, thread);
+ block->requests++;
+ }
+ }
+ while (thread != last_thread);
+ hash_link->block=block;
+ KEYCACHE_THREAD_TRACE("link_block: after signaling");
+#if defined(KEYCACHE_DEBUG)
+ KEYCACHE_DBUG_PRINT("link_block",
+ ("linked,unlinked block %u status=%x #requests=%u #available=%u",
+ BLOCK_NUMBER(block),block->status,
+ block->requests,_my_blocks_available));
#endif
+ return;
+ }
+ if (_my_used_last)
+ {
+ _my_used_last->next_used->prev_used=&block->next_used;
+ block->next_used=_my_used_last->next_used;
+ block->prev_used=&_my_used_last->next_used;
+ _my_used_last->next_used=block;
+ if (at_end)
+ _my_used_last=block;
+ }
+ else
+ {
+ /* The LRU chain is empty */
+ _my_used_last=block->next_used=block;
+ block->prev_used=&block->next_used;
+ }
+ KEYCACHE_THREAD_TRACE("link_block");
+#if defined(KEYCACHE_DEBUG)
+ _my_blocks_available++;
+ KEYCACHE_DBUG_PRINT("link_block",
+ ("linked block %u:%1u status=%x #requests=%u #available=%u",
+ BLOCK_NUMBER(block),at_end,block->status,
+ block->requests,_my_blocks_available));
+ KEYCACHE_DBUG_ASSERT(_my_blocks_available <= _my_blocks_used);
+#endif
+}
-#ifndef DBUG_OFF
-static void test_key_cache(const char *where, my_bool lock);
+
+/*
+ Unlink a block from the LRU chain
+*/
+static inline void unlink_block(BLOCK_LINK *block)
+{
+ if (block->next_used == block)
+ /* The list contains only one member */
+ _my_used_last=NULL;
+ else
+ {
+ block->next_used->prev_used=block->prev_used;
+ *block->prev_used=block->next_used;
+ if (_my_used_last == block)
+ _my_used_last=STRUCT_PTR(BLOCK_LINK, next_used, block->prev_used);
+ }
+ block->next_used=NULL;
+
+ KEYCACHE_THREAD_TRACE("unlink_block");
+#if defined(KEYCACHE_DEBUG)
+ _my_blocks_available--;
+ KEYCACHE_DBUG_PRINT("unlink_block",
+ ("unlinked block %u status=%x #requests=%u #available=%u",
+ BLOCK_NUMBER(block),block->status,
+ block->requests,_my_blocks_available));
+ KEYCACHE_DBUG_ASSERT(_my_blocks_available >= 0);
+#endif
+}
+
+
+/*
+ Register requests for a block
+*/
+static inline void reg_requests(BLOCK_LINK *block, int count)
+{
+ if (! block->requests)
+ /* First request for the block unlinks it */
+ unlink_block(block);
+ block->requests+=count;
+}
+
+
+/*
+ Unregister request for a block
+ linking it to the LRU chain if it's the last request
+*/
+static inline void unreg_request(BLOCK_LINK *block, int at_end)
+{
+ if (! --block->requests)
+ link_block(block, at_end);
+}
+
+/*
+ Remove a reader of the page in block
+*/
+static inline void remove_reader(BLOCK_LINK *block)
+{
+ if (! --block->hash_link->requests && block->condvar)
+ keycache_pthread_cond_signal(block->condvar);
+}
+
+
+/*
+ Wait until the last reader of the page in block
+ signals on its termination
+*/
+static inline void wait_for_readers(BLOCK_LINK *block)
+{
+ struct st_my_thread_var *thread=my_thread_var;
+ while (block->hash_link->requests)
+ {
+ block->condvar=&thread->suspend;
+ keycache_pthread_cond_wait(&thread->suspend,&THR_LOCK_keycache);
+ block->condvar=NULL;
+ }
+}
+
+
+/*
+ add a hash link to a bucket in the hash_table
+*/
+static inline void link_hash(HASH_LINK **start, HASH_LINK *hash_link)
+{
+ if (*start)
+ (*start)->prev=&hash_link->next;
+ hash_link->next=*start;
+ hash_link->prev=start;
+ *start=hash_link;
+}
+
+
+/*
+ Remove a hash link from the hash table
+*/
+static inline void unlink_hash(HASH_LINK *hash_link)
+{
+ KEYCACHE_DBUG_PRINT("unlink_hash", ("file %u, filepos %lu #requests=%u",
+ (uint) hash_link->file,(ulong) hash_link->diskpos, hash_link->requests));
+ KEYCACHE_DBUG_ASSERT(hash_link->requests == 0);
+ if ((*hash_link->prev=hash_link->next))
+ hash_link->next->prev=hash_link->prev;
+ hash_link->block=NULL;
+ if (waiting_for_hash_link.last_thread)
+ { /* Signal that A free hash link appeared */
+ struct st_my_thread_var *last_thread=waiting_for_hash_link.last_thread;
+ struct st_my_thread_var *first_thread=last_thread->next;
+ struct st_my_thread_var *next_thread=first_thread;
+ KEYCACHE_PAGE *first_page= (KEYCACHE_PAGE *) (first_thread->opt_info);
+ struct st_my_thread_var *thread;
+
+ hash_link->file=first_page->file;
+ hash_link->diskpos=first_page->filepos;
+ do
+ {
+ KEYCACHE_PAGE *page;
+ thread=next_thread;
+ page= (KEYCACHE_PAGE *) thread->opt_info;
+ next_thread=thread->next;
+ /*
+ We notify about the event all threads that ask
+ for the same page as the first thread in the queue
+ */
+ if (page->file == hash_link->file && page->filepos == hash_link->diskpos)
+ {
+ keycache_pthread_cond_signal(&thread->suspend);
+ unlink_from_queue(&waiting_for_hash_link, thread);
+ }
+ }
+ while (thread != last_thread);
+ link_hash(&_my_hash_root[KEYCACHE_HASH(hash_link->file,
+ hash_link->diskpos)], hash_link);
+ return;
+ }
+ hash_link->next=_my_free_hash_list;
+ _my_free_hash_list=hash_link;
+}
+
+/*
+ Get the hash link for a page
+*/
+static inline HASH_LINK *get_hash_link(int file, my_off_t filepos)
+{
+ reg1 HASH_LINK *hash_link, **start;
+ KEYCACHE_PAGE page;
+#if defined(KEYCACHE_DEBUG)
+ int cnt;
+#endif
+
+ KEYCACHE_DBUG_PRINT("get_hash_link", ("file %u, filepos %lu",
+ (uint) file,(ulong) filepos));
+
+restart:
+ /*
+ Find the bucket in the hash table for the pair (file, filepos);
+ start contains the head of the bucket list,
+ hash_link points to the first member of the list
+ */
+ hash_link=*(start=&_my_hash_root[KEYCACHE_HASH(file, filepos)]);
+#if defined(KEYCACHE_DEBUG)
+ cnt=0;
+#endif
+ /* Look for an element for the pair (file, filepos) in the bucket chain */
+ while (hash_link &&
+ (hash_link->diskpos != filepos || hash_link->file != file))
+ {
+ hash_link= hash_link->next;
+#if defined(KEYCACHE_DEBUG)
+ cnt++;
+ if (! (cnt <= _my_hash_links_used))
+ {
+ int i;
+ for (i=0, hash_link=*start ;
+ i < cnt ; i++, hash_link=hash_link->next)
+ {
+ KEYCACHE_DBUG_PRINT("get_hash_link", ("file %u, filepos %lu",
+ (uint) hash_link->file,(ulong) hash_link->diskpos));
+ }
+ }
+ KEYCACHE_DBUG_ASSERT(n <= _my_hash_links_used);
+#endif
+ }
+ if (! hash_link)
+ { /* There is no hash link in the hash table for the pair (file, filepos) */
+ if (_my_free_hash_list)
+ {
+ hash_link=_my_free_hash_list;
+ _my_free_hash_list=hash_link->next;
+ }
+ else if (_my_hash_links_used < _my_hash_links)
+ {
+ hash_link= &_my_hash_link_root[_my_hash_links_used++];
+ }
+ else
+ { /* Wait for a free hash link */
+ struct st_my_thread_var *thread=my_thread_var;
+ KEYCACHE_DBUG_PRINT("get_hash_link", ("waiting"));
+ page.file=file; page.filepos=filepos;
+ thread->opt_info= (void *) &page;
+ link_into_queue(&waiting_for_hash_link, thread);
+ keycache_pthread_cond_wait(&thread->suspend,&THR_LOCK_keycache);
+ thread->opt_info=NULL;
+ goto restart;
+ }
+ hash_link->file=file;
+ hash_link->diskpos=filepos;
+ link_hash(start, hash_link);
+ }
+ /* Register the request for the page */
+ hash_link->requests++;
+
+ return hash_link;
+}
+
+
+/*
+ Get a block for the file page requested by a keycache read/write operation;
+ If the page is not in the cache return a free block, if there is none
+ return the lru block after saving its buffer if the page is dirty
+*/
+static BLOCK_LINK *find_key_block(int file, my_off_t filepos,
+ int wrmode, int *page_st)
+{
+ HASH_LINK *hash_link;
+ BLOCK_LINK *block;
+ int error=0;
+ int page_status;
+
+ DBUG_ENTER("find_key_block");
+ KEYCACHE_THREAD_TRACE("find_key_block:begin");
+ DBUG_PRINT("enter", ("file %u, filepos %lu, wrmode %lu",
+ (uint) file,(ulong) filepos,(uint) wrmode));
+ KEYCACHE_DBUG_PRINT("find_key_block", ("file %u, filepos %lu, wrmode %lu",
+ (uint) file,(ulong) filepos,(uint) wrmode));
+#if !defined(DBUG_OFF) && defined(EXTRA_DEBUG)
+ DBUG_EXECUTE("check_keycache2",test_key_cache("start of find_key_block",0););
#endif
+
+restart:
+ /* Find the hash link for the requested page (file, filepos) */
+ hash_link=get_hash_link(file, filepos);
+
+ page_status=-1;
+ if ((block=hash_link->block) &&
+ block->hash_link == hash_link && (block->status & BLOCK_READ))
+ page_status=PAGE_READ;
+
+ if (page_status == PAGE_READ && (block->status & BLOCK_IN_SWITCH))
+ { /* This is a request for a page to be removed from cache */
+
+ KEYCACHE_DBUG_PRINT("find_key_block",
+ ("request for old page in block %u",BLOCK_NUMBER(block)));
+ /*
+ Only reading requests can proceed until the old dirty page is flushed,
+ all others are to be suspended, then resubmitted
+ */
+ if (!wrmode && !(block->status & BLOCK_REASSIGNED))
+ reg_requests(block,1);
+ else
+ {
+ hash_link->requests--;
+ KEYCACHE_DBUG_PRINT("find_key_block",
+ ("request waiting for old page to be saved"));
+ {
+ struct st_my_thread_var *thread=my_thread_var;
+ /* Put the request into the queue of those waiting for the old page */
+ add_to_queue(&block->wqueue[COND_FOR_SAVED], thread);
+ /* Wait until the request can be resubmitted */
+ do
+ {
+ keycache_pthread_cond_wait(&thread->suspend, &THR_LOCK_keycache);
+ }
+ while(thread->next);
+ }
+ KEYCACHE_DBUG_PRINT("find_key_block",
+ ("request for old page resubmitted"));
+ /* Resubmit the request */
+ goto restart;
+ }
+ }
+ else
+ { /* This is a request for a new page or for a page not to be removed */
+ if (! block)
+ { /* No block is assigned for the page yet */
+ if (_my_blocks_used < (uint) _my_disk_blocks)
+ { /* There are some never used blocks, take first of them */
+ hash_link->block=block= &_my_block_root[_my_blocks_used];
+ block->buffer=ADD_TO_PTR(_my_block_mem,
+ ((ulong) _my_blocks_used*key_cache_block_size),
+ byte*);
+ block->status=0;
+ block->length=0;
+ block->offset=key_cache_block_size;
+ block->requests=1;
+ _my_blocks_used++;
+ link_to_file_list(block, file, 0);
+ block->hash_link=hash_link;
+ page_status=PAGE_TO_BE_READ;
+ KEYCACHE_DBUG_PRINT("find_key_block",
+ ("got never used block %u",BLOCK_NUMBER(block)));
+ }
+ else
+ { /* There are no never used blocks, use a block from the LRU chain */
+ /*
+ Wait until a new block is added to the LRU chain;
+ several threads might wait here for the same page,
+ all of them must get the same block
+ */
+
+ if (! _my_used_last)
+ {
+ struct st_my_thread_var *thread=my_thread_var;
+ thread->opt_info=(void *) hash_link;
+ link_into_queue(&waiting_for_block, thread);
+ do
+ {
+ keycache_pthread_cond_wait(&thread->suspend,&THR_LOCK_keycache);
+ }
+ while (thread->next);
+ thread->opt_info=NULL;
+ }
+ block=hash_link->block;
+ if (! block)
+ {
+ /*
+ Take the first block from the LRU chain
+ unlinking it from the chain
+ */
+ block=_my_used_last->next_used;
+ reg_requests(block,1);
+ hash_link->block=block;
+ }
+
+ if (block->hash_link != hash_link && ! (block->status & BLOCK_IN_SWITCH) )
+ { /* this is a primary request for a new page */
+ block->status|=BLOCK_IN_SWITCH;
+
+ KEYCACHE_DBUG_PRINT("find_key_block",
+ ("got block %u for new page",BLOCK_NUMBER(block)));
+
+ if (block->status & BLOCK_CHANGED)
+ { /* The block contains a dirty page - push it out of the cache */
+
+ KEYCACHE_DBUG_PRINT("find_key_block",("block is dirty"));
+
+ keycache_pthread_mutex_unlock(&THR_LOCK_keycache);
+ /*
+ The call is thread safe because only the current
+ thread might change the block->hash_link value
+ */
+ error=my_pwrite(block->hash_link->file,block->buffer,
+ block->length,block->hash_link->diskpos,
+ MYF(MY_NABP | MY_WAIT_IF_FULL));
+ keycache_pthread_mutex_lock(&THR_LOCK_keycache);
+ _my_cache_write++;
+ }
+
+ block->status|=BLOCK_REASSIGNED;
+ if (block->hash_link)
+ {
+ /*
+ Wait until all pending read requests
+ for this page are executed
+ (we could have avoided this waiting, if we had read
+ a page in the cache in a sweep, without yielding control)
+ */
+ wait_for_readers(block);
+
+ /* Remove the hash link for this page from the hash table */
+ unlink_hash(block->hash_link);
+ /* All pending requests for this page must be resubmitted */
+ if (block->wqueue[COND_FOR_SAVED].last_thread)
+ release_queue(&block->wqueue[COND_FOR_SAVED]);
+ }
+ link_to_file_list(block, file, block->hash_link ? 1 : 0);
+ block->status=error? BLOCK_ERROR : 0;
+ block->length=0;
+ block->offset=key_cache_block_size;
+ block->hash_link=hash_link;
+ page_status=PAGE_TO_BE_READ;
+
+ KEYCACHE_DBUG_ASSERT(block->hash_link->block == block);
+ KEYCACHE_DBUG_ASSERT(hash_link->block->hash_link == hash_link);
+ }
+ else
+ {
+ /* This is for secondary requests for a new page only */
+ page_status = block->hash_link == hash_link &&
+ (block->status & BLOCK_READ) ?
+ PAGE_READ : PAGE_WAIT_TO_BE_READ;
+ }
+ }
+
+ _my_cache_read++;
+ }
+ else
+ {
+ reg_requests(block,1);
+ page_status = block->hash_link == hash_link &&
+ (block->status & BLOCK_READ) ?
+ PAGE_READ : PAGE_WAIT_TO_BE_READ;
+ }
+ }
+
+ KEYCACHE_DBUG_ASSERT(page_status != -1);
+ *page_st=page_status;
+
+#if !defined(DBUG_OFF) && defined(EXTRA_DEBUG)
+ DBUG_EXECUTE("check_keycache2",test_key_cache("end of find_key_block",0););
+#endif
+ KEYCACHE_THREAD_TRACE("find_key_block:end");
+ DBUG_RETURN(block);
+}
- /*
- ** read a key_buffer
- ** filepos must point at a even key_cache_block_size block
- ** if return_buffer is set then the intern buffer is returned if
- ** it can be used
- ** Returns adress to where data is read
- */
+/*
+ Read into a key cache block buffer from disk;
+ do not to report error when the size of successfully read
+ portion is less than read_length, but not less than min_length
+*/
+static void read_block(BLOCK_LINK *block, uint read_length,
+ uint min_length, my_bool primary)
+{
+ uint got_length;
+
+ /* On entry THR_LOCK_keycache is locked */
+
+ KEYCACHE_THREAD_TRACE("read_block");
+ if (primary)
+ { /*
+ This code is executed only by threads
+ that submitted primary requests
+ */
+
+ KEYCACHE_DBUG_PRINT("read_block",
+ ("page to be read by primary request"));
+
+ /* Page is not in buffer yet, is to be read from disk */
+ keycache_pthread_mutex_unlock(&THR_LOCK_keycache);
+ got_length=my_pread(block->hash_link->file,block->buffer,
+ read_length,block->hash_link->diskpos,MYF(0));
+ keycache_pthread_mutex_lock(&THR_LOCK_keycache);
+ if (got_length < min_length)
+ block->status|=BLOCK_ERROR;
+ else
+ {
+ block->status=BLOCK_READ;
+ block->length=got_length;
+ }
+ KEYCACHE_DBUG_PRINT("read_block",
+ ("primary request: new page in cache"));
+ /* Signal that all pending requests for this page now can be processed */
+ if (block->wqueue[COND_FOR_REQUESTED].last_thread)
+ release_queue(&block->wqueue[COND_FOR_REQUESTED]);
+ }
+ else
+ { /*
+ This code is executed only by threads
+ that submitted secondary requests
+ */
+ KEYCACHE_DBUG_PRINT("read_block",
+ ("secondary request waiting for new page to be read"));
+ {
+ struct st_my_thread_var *thread=my_thread_var;
+ /* Put the request into a queue and wait until it can be processed */
+ add_to_queue(&block->wqueue[COND_FOR_REQUESTED],thread);
+ do
+ {
+ keycache_pthread_cond_wait(&thread->suspend,&THR_LOCK_keycache);
+ }
+ while (thread->next);
+ }
+ KEYCACHE_DBUG_PRINT("read_block",
+ ("secondary request: new page in cache"));
+ }
+}
+
+
+/*
+ Read a block of data from a cached file into a buffer;
+ if return_buffer is set then the cache buffer is returned if
+ it can be used;
+ filepos must be a multiple of 'block_length', but it doesn't
+ have to be a multiple of key_cache_block_size;
+ returns adress from where data is read
+*/
byte *key_cache_read(File file, my_off_t filepos, byte *buff, uint length,
- uint block_length __attribute__((unused)),
- int return_buffer __attribute__((unused)))
+ uint block_length __attribute__((unused)),
+ int return_buffer __attribute__((unused)))
{
- reg1 SEC_LINK *next;
int error=0;
DBUG_ENTER("key_cache_read");
DBUG_PRINT("enter", ("file %u, filepos %lu, length %u",
- (uint) file, (ulong) filepos, length));
-
-#ifndef THREAD
- if (block_length > key_cache_block_size)
- return_buffer=0;
-#endif
+ (uint) file,(ulong) filepos,length));
+
if (_my_disk_blocks > 0)
- { /* We have key_cacheing */
+ { /* Key cache is used */
+ reg1 BLOCK_LINK *block;
+ uint offset= (uint) (filepos & (key_cache_block_size-1));
byte *start=buff;
uint read_length;
- pthread_mutex_lock(&THR_LOCK_keycache);
- if (_my_disk_blocks <= 0) /* Resize failed */
- {
- pthread_mutex_unlock(&THR_LOCK_keycache);
- goto no_key_cache;
- }
+ uint status;
+ int page_st;
+
+#ifndef THREAD
+ if (block_length > key_cache_block_size || offset)
+ return_buffer=0;
+#endif
+
+ /* Read data in key_cache_block_size increments */
+ filepos-= offset;
do
{
+ read_length= length > key_cache_block_size ?
+ key_cache_block_size : length;
+ KEYCACHE_DBUG_ASSERT(read_length > 0);
+ keycache_pthread_mutex_lock(&THR_LOCK_keycache);
_my_cache_r_requests++;
- read_length= (length > key_cache_block_size ? key_cache_block_size :
- length);
- if (!(next=find_key_block(file,filepos,&error)))
+ block=find_key_block(file,filepos,0,&page_st);
+ if (page_st != PAGE_READ)
{
- pthread_mutex_unlock(&THR_LOCK_keycache);
- DBUG_RETURN ((byte*) 0); /* Got a fatal error */
+ /* The requested page is to be read into the block buffer */
+ read_block(block,key_cache_block_size,read_length+offset,
+ page_st == PAGE_TO_BE_READ);
}
- if (error)
- { /* Didn't find it in cache */
- if (my_pread(file,next->buffer,read_length,filepos,MYF(MY_NABP)))
- {
- pthread_mutex_unlock(&THR_LOCK_keycache);
- DBUG_RETURN((byte*) 0);
- }
- _my_cache_read++;
+ else if (! (block->status & BLOCK_ERROR) &&
+ block->length < read_length + offset)
+ {
+ /*
+ Impossible if nothing goes wrong:
+ this could only happen if we are using a file with
+ small key blocks and are trying to read outside the file
+ */
+ my_errno=-1;
+ block->status|=BLOCK_ERROR;
}
-#ifndef THREAD /* buffer may be used a long time */
- if (return_buffer)
+
+ if (! ((status=block->status) & BLOCK_ERROR))
{
- pthread_mutex_unlock(&THR_LOCK_keycache);
- DBUG_RETURN (next->buffer);
+#ifndef THREAD
+ if (! return_buffer)
+#endif
+ {
+#if !defined(SERIALIZED_READ_FROM_CACHE)
+ keycache_pthread_mutex_unlock(&THR_LOCK_keycache);
+#endif
+
+ /* Copy data from the cache buffer */
+ if (!(read_length & 511))
+ bmove512(buff,block->buffer+offset,read_length);
+ else
+ memcpy(buff,block->buffer+offset,(size_t) read_length);
+
+#if !defined(SERIALIZED_READ_FROM_CACHE)
+ keycache_pthread_mutex_lock(&THR_LOCK_keycache);
+#endif
+ }
}
+
+ remove_reader(block);
+ /*
+ Link the block into the LRU chain
+ if it's the last submitted request for the block
+ */
+ unreg_request(block,1);
+
+ keycache_pthread_mutex_unlock(&THR_LOCK_keycache);
+
+ if (status & BLOCK_ERROR)
+ DBUG_RETURN((byte *) 0);
+
+#ifndef THREAD
+ if (return_buffer)
+ return (block->buffer);
#endif
- if (! (read_length & 511))
- bmove512(buff,next->buffer,read_length);
- else
- memcpy(buff,next->buffer,(size_t) read_length);
+
buff+=read_length;
filepos+=read_length;
+ offset=0;
+
} while ((length-= read_length));
- pthread_mutex_unlock(&THR_LOCK_keycache);
DBUG_RETURN(start);
}
-
-no_key_cache:
- _my_cache_r_requests++;
- _my_cache_read++;
+
+ /* Key cache is not used */
+ statistic_increment(_my_cache_r_requests,&THR_LOCK_keycache);
+ statistic_increment(_my_cache_read,&THR_LOCK_keycache);
if (my_pread(file,(byte*) buff,length,filepos,MYF(MY_NABP)))
error=1;
- DBUG_RETURN(error ? (byte*) 0 : buff);
-} /* key_cache_read */
-
+ DBUG_RETURN(error? (byte*) 0 : buff);
+}
- /* write a key_buffer */
- /* We don't have to use pwrite because of write locking */
- /* buff must point at a even key_cache_block_size block */
+/*
+ Write a buffer into disk;
+ filepos must be a multiple of 'block_length', but it doesn't
+ have to be a multiple of key cache block size;
+ if !dont_write then all dirty pages involved in writing should
+ have been flushed from key cache before the function starts
+*/
int key_cache_write(File file, my_off_t filepos, byte *buff, uint length,
- uint block_length __attribute__((unused)),
- int dont_write)
+ uint block_length __attribute__((unused)),
+ int dont_write)
{
- reg1 SEC_LINK *next;
+ reg1 BLOCK_LINK *block;
int error=0;
+
DBUG_ENTER("key_cache_write");
- DBUG_PRINT("enter", ("file %u, filepos %lu, length %u",
- (uint) file, (ulong) filepos, length));
+ DBUG_PRINT("enter", ("file %u, filepos %lu, length %u block_length %u",
+ (uint) file,(ulong) filepos,length,block_length));
if (!dont_write)
- { /* Forced write of buffer */
- _my_cache_write++;
+ { /* Force writing from buff into disk */
+ statistic_increment(_my_cache_write, &THR_LOCK_keycache);
if (my_pwrite(file,buff,length,filepos,MYF(MY_NABP | MY_WAIT_IF_FULL)))
DBUG_RETURN(1);
}
-
+
#if !defined(DBUG_OFF) && defined(EXTRA_DEBUG)
DBUG_EXECUTE("check_keycache",test_key_cache("start of key_cache_write",1););
#endif
+
if (_my_disk_blocks > 0)
- { /* We have key_cacheing */
+ { /* Key cache is used */
uint read_length;
- pthread_mutex_lock(&THR_LOCK_keycache);
- if (_my_disk_blocks <= 0) /* If resize failed */
- {
- pthread_mutex_unlock(&THR_LOCK_keycache);
- goto no_key_cache;
- }
-
- _my_cache_w_requests++;
+ uint offset= (uint) (filepos & (key_cache_block_size-1));
+ int page_st;
+
+ /* Write data in key_cache_block_size increments */
+ filepos-= offset;
do
{
- read_length= length > key_cache_block_size ? key_cache_block_size : length;
- if (!(next=find_key_block(file,filepos,&error)))
- goto end; /* Fatal error */
- if (!dont_write) /* If we wrote buff at start */
+ read_length= length > key_cache_block_size ?
+ key_cache_block_size : length;
+ KEYCACHE_DBUG_ASSERT(read_length > 0);
+ keycache_pthread_mutex_lock(&THR_LOCK_keycache);
+ _my_cache_w_requests++;
+ block=find_key_block(file, filepos, 1, &page_st);
+ if (page_st != PAGE_READ &&
+ (offset || read_length < key_cache_block_size))
+ read_block(block,
+ offset + read_length >= key_cache_block_size?
+ offset : key_cache_block_size,
+ offset,page_st == PAGE_TO_BE_READ);
+
+ if (!dont_write)
+ { /* buff has been written to disk at start */
+ if ((block->status & BLOCK_CHANGED) &&
+ (!offset && read_length >= key_cache_block_size))
+ link_to_file_list(block, block->hash_link->file, 1);
+ }
+ else if (! (block->status & BLOCK_CHANGED))
+ link_to_changed_list(block);
+
+ set_if_smaller(block->offset,offset)
+ set_if_bigger(block->length,read_length+offset);
+
+ if (! (block->status & BLOCK_ERROR))
{
- if (next->changed) /* Unlink from changed list */
- link_changed_to_file(next,next->file);
+ if (!(read_length & 511))
+ bmove512(block->buffer+offset,buff,read_length);
+ else
+ memcpy(block->buffer+offset,buff,(size_t) read_length);
}
- else if (!next->changed)
- link_file_to_changed(next); /* Add to changed list */
-
- if (!(read_length & 511))
- bmove512(next->buffer,buff,read_length);
- else
- memcpy(next->buffer,buff,(size_t) read_length);
+
+ block->status|=BLOCK_READ;
+
+ /* Unregister the request */
+ block->hash_link->requests--;
+ unreg_request(block,1);
+
+ if (block->status & BLOCK_ERROR)
+ {
+ keycache_pthread_mutex_unlock(&THR_LOCK_keycache);
+ error=1;
+ break;
+ }
+
+ keycache_pthread_mutex_unlock(&THR_LOCK_keycache);
+
buff+=read_length;
filepos+=read_length;
+ offset=0;
+
} while ((length-= read_length));
- error=0;
- pthread_mutex_unlock(&THR_LOCK_keycache);
- goto end;
- }
-
-no_key_cache:
- if (dont_write)
- { /* We must write, no cache */
- _my_cache_w_requests++;
- _my_cache_write++;
- if (my_pwrite(file,(byte*) buff,length,filepos,
- MYF(MY_NABP | MY_WAIT_IF_FULL)))
- error=1;
- }
-
-end:
-#if !defined(DBUG_OFF) && defined(EXTRA_DEBUG)
- DBUG_EXECUTE("check_keycache",test_key_cache("end of key_cache_write",1););
-#endif
- DBUG_RETURN(error);
-} /* key_cache_write */
-
-
- /* Find block in cache */
- /* IF found sector and error is set then next->changed is cleared */
-
-static SEC_LINK *find_key_block(int file, my_off_t filepos, int *error)
-{
- reg1 SEC_LINK *next,**start;
- DBUG_ENTER("find_key_block");
- DBUG_PRINT("enter", ("file %u, filepos %lu",
- (uint) file, (ulong) filepos));
-
-#if !defined(DBUG_OFF) && defined(EXTRA_DEBUG)
- DBUG_EXECUTE("check_keycache2",test_key_cache("start of find_key_block",0););
-#endif
-
- *error=0;
- next= *(start= &_my_hash_root[((ulong) (filepos >> key_cache_shift)+(ulong) file) &
- (_my_hash_blocks-1)]);
- while (next && (next->diskpos != filepos || next->file != file))
- next= next->next_hash;
-
- if (next)
- { /* Found block */
- if (next != _my_used_last)
- { /* Relink used-chain */
- if (next == _my_used_first)
- _my_used_first=next->next_used;
- else
- {
- next->prev_used->next_used = next->next_used;
- next->next_used->prev_used = next->prev_used;
- }
- next->prev_used=_my_used_last;
- _my_used_last->next_used=next;
- }
}
else
- { /* New block */
- if (_my_disk_blocks_used+1 <= (uint) _my_disk_blocks)
- { /* There are unused blocks */
- next= &_my_block_root[_my_blocks_used++]; /* Link in hash-chain */
- next->buffer=ADD_TO_PTR(_my_block_mem,
- ((ulong) _my_disk_blocks_used << key_cache_shift),
- byte*);
- /* link first in file_blocks */
- next->changed=0;
- link_into_file_blocks(next,file);
- _my_disk_blocks_used++;
- if (!_my_used_first)
- _my_used_first=next;
- if (_my_used_last)
- _my_used_last->next_used=next; /* Last in used-chain */
+ {
+ /* Key cache is not used */
+ if (dont_write)
+ {
+ statistic_increment(_my_cache_w_requests, &THR_LOCK_keycache);
+ statistic_increment(_my_cache_write, &THR_LOCK_keycache);
+ if (my_pwrite(file,(byte*) buff,length,filepos,MYF(MY_NABP | MY_WAIT_IF_FULL)))
+ error=1;
}
- else
- { /* Reuse old block */
- next= _my_used_first;
- if (next->changed)
- {
- if (my_pwrite(next->file,next->buffer,key_cache_block_size,
- next->diskpos,
- MYF(MY_NABP | MY_WAIT_IF_FULL)))
- {
- *error=1;
- return((SEC_LINK*) 0);
- }
- _my_cache_write++;
- link_changed_to_file(next,file);
- }
- else
- {
- if (next->file == -1)
- link_into_file_blocks(next,file);
- else
- relink_into_file_blocks(next,file);
- }
- if (next->prev_hash) /* If in hash-link */
- if ((*next->prev_hash=next->next_hash) != 0) /* Remove from link */
- next->next_hash->prev_hash= next->prev_hash;
+ }
- _my_used_last->next_used=next;
- _my_used_first=next->next_used;
- }
- if (*start) /* Link in first in h.-chain */
- (*start)->prev_hash= &next->next_hash;
- next->next_hash= *start; next->prev_hash=start; *start=next;
- next->prev_used=_my_used_last;
- next->file=file;
- next->diskpos=filepos;
- *error=1; /* Block wasn't in memory */
- }
- _my_used_last=next;
#if !defined(DBUG_OFF) && defined(EXTRA_DEBUG)
- DBUG_EXECUTE("check_keycache2",test_key_cache("end of find_key_block",0););
+ DBUG_EXECUTE("exec",test_key_cache("end of key_cache_write",1););
#endif
- DBUG_RETURN(next);
-} /* find_key_block */
+ DBUG_RETURN(error);
+}
-static void free_block(SEC_LINK *used)
+/*
+ Free block: remove reference to it from hash table,
+ remove it from the chain file of dirty/clean blocks
+ and add it at the beginning of the LRU chain
+*/
+static void free_block(BLOCK_LINK *block)
{
- used->file= -1;
- used->changed=0;
- if (used != _my_used_first) /* Relink used-chain */
+ KEYCACHE_THREAD_TRACE("free block");
+ KEYCACHE_DBUG_PRINT("free_block",
+ ("block %u to be freed",BLOCK_NUMBER(block)));
+ if (block->hash_link)
{
- if (used == _my_used_last)
- _my_used_last=used->prev_used;
- else
- {
- used->prev_used->next_used = used->next_used;
- used->next_used->prev_used = used->prev_used;
- }
- used->next_used=_my_used_first;
- used->next_used->prev_used=used;
- _my_used_first=used;
+ block->status|=BLOCK_REASSIGNED;
+ wait_for_readers(block);
+ unlink_hash(block->hash_link);
}
- if ((*used->prev_hash=used->next_hash)) /* Relink hash-chain */
- used->next_hash->prev_hash= used->prev_hash;
- if (used->next_changed) /* Relink changed/file list */
- used->next_changed->prev_changed=used->prev_changed;
- *used->prev_changed=used->next_changed;
- used->prev_hash=0; used->next_hash=0; /* Safety */
+
+ unlink_changed(block);
+ block->status=0;
+ block->length=0;
+ block->offset=key_cache_block_size;
+ KEYCACHE_THREAD_TRACE("free block");
+ KEYCACHE_DBUG_PRINT("free_block",
+ ("block is freed"));
+ unreg_request(block,0);
+ block->hash_link=NULL;
}
- /* Flush all changed blocks to disk. Free used blocks if requested */
-
-static int cmp_sec_link(SEC_LINK **a, SEC_LINK **b)
+static int cmp_sec_link(BLOCK_LINK **a, BLOCK_LINK **b)
{
- return (((*a)->diskpos < (*b)->diskpos) ? -1 :
- ((*a)->diskpos > (*b)->diskpos) ? 1 : 0);
+ return (((*a)->hash_link->diskpos < (*b)->hash_link->diskpos) ? -1 :
+ ((*a)->hash_link->diskpos > (*b)->hash_link->diskpos) ? 1 : 0);
}
-static int flush_cached_blocks(File file, SEC_LINK **cache, uint count)
+/*
+ Flush a portion of changed blocks to disk,
+ free used blocks if requested
+*/
+static int flush_cached_blocks(File file, BLOCK_LINK **cache,
+ BLOCK_LINK **end,
+ enum flush_type type)
{
- uint last_errno=0;
- qsort((byte*) cache, count, sizeof(*cache), (qsort_cmp) cmp_sec_link);
- for ( ; count-- ; cache++)
+ int error;
+ int last_errno=0;
+ uint count=end-cache;
+
+ /* Don't lock the cache during the flush */
+ keycache_pthread_mutex_unlock(&THR_LOCK_keycache);
+ /*
+ As all blocks referred in 'cache' are marked by BLOCK_IN_FLUSH
+ we are guarunteed no thread will change them
+ */
+ qsort((byte*) cache,count,sizeof(*cache),(qsort_cmp) cmp_sec_link);
+
+ keycache_pthread_mutex_lock(&THR_LOCK_keycache);
+ for ( ; cache != end ; cache++)
{
- if (my_pwrite(file,(*cache)->buffer,key_cache_block_size,
- (*cache)->diskpos,
- MYF(MY_NABP | MY_WAIT_IF_FULL)))
+ BLOCK_LINK *block= *cache;
+
+ KEYCACHE_DBUG_PRINT("flush_cached_blocks",
+ ("block %u to be flushed", BLOCK_NUMBER(block)));
+ keycache_pthread_mutex_unlock(&THR_LOCK_keycache);
+ error=my_pwrite(file,block->buffer+block->offset,block->length,
+ block->hash_link->diskpos,MYF(MY_NABP | MY_WAIT_IF_FULL));
+ keycache_pthread_mutex_lock(&THR_LOCK_keycache);
+ _my_cache_write++;
+ if (error)
{
+ block->status|= BLOCK_ERROR;
if (!last_errno)
- last_errno=errno ? errno : -1;
+ last_errno=errno ? errno : -1;
+ }
+ /* type will never be FLUSH_IGNORE_CHANGED here */
+ if (! (type == FLUSH_KEEP || type == FLUSH_FORCE_WRITE))
+ {
+ _my_blocks_changed--;
+ free_block(block);
+ }
+ else
+ {
+ block->status&=~BLOCK_IN_FLUSH;
+ link_to_file_list(block,file,1);
+ unreg_request(block,1);
}
+
}
return last_errno;
}
-static int flush_key_blocks_int(File file, enum flush_type type)
+/*
+ Flush all blocks for a file to disk
+*/
+int flush_key_blocks(File file, enum flush_type type)
{
- int error=0,last_errno=0;
- uint count=0;
- SEC_LINK *cache_buff[FLUSH_CACHE],**cache,**pos,**end;
- SEC_LINK *used,*next;
- DBUG_ENTER("flush_key_blocks_int");
+ int last_errno=0;
+ BLOCK_LINK *cache_buff[FLUSH_CACHE],**cache;
+ DBUG_ENTER("flush_key_blocks");
DBUG_PRINT("enter",("file: %d blocks_used: %d blocks_changed: %d",
- file,_my_blocks_used,_my_blocks_changed));
-
- cache=cache_buff; /* If no key cache */
- if (_my_disk_blocks > 0 &&
- (!my_disable_flush_key_blocks || type != FLUSH_KEEP))
- {
+ file,_my_blocks_used,_my_blocks_changed));
+
#if !defined(DBUG_OFF) && defined(EXTRA_DEBUG)
DBUG_EXECUTE("check_keycache",test_key_cache("start of flush_key_blocks",0););
#endif
+
+ keycache_pthread_mutex_lock(&THR_LOCK_keycache);
+
+ cache=cache_buff;
+ if (_my_disk_blocks > 0 &&
+ (!my_disable_flush_key_blocks || type != FLUSH_KEEP))
+ { /* Key cache exists and flush is not disabled */
+ int error=0;
+ uint count=0;
+ BLOCK_LINK **pos,**end;
+ BLOCK_LINK *first_in_switch=NULL;
+ BLOCK_LINK *block, *next;
+#if defined(KEYCACHE_DEBUG)
+ uint cnt=0;
+#endif
+
if (type != FLUSH_IGNORE_CHANGED)
{
- /* Count how many key blocks we have to cache to be able to
- write everything with so few seeks as possible */
-
- for (used=changed_blocks[(uint) file & CHANGED_BLOCKS_MASK];
- used ;
- used=used->next_changed)
+ /*
+ Count how many key blocks we have to cache to be able
+ to flush all dirty pages with minimum seek moves
+ */
+ for (block=changed_blocks[FILE_HASH(file)] ;
+ block ;
+ block=block->next_changed)
{
- if (used->file == file)
- count++;
- }
- /* Only allocate a new buffer if its bigger than the one we have */
- if (count > FLUSH_CACHE)
- {
- if (!(cache=(SEC_LINK**) my_malloc(sizeof(SEC_LINK*)*count,MYF(0))))
+ if (block->hash_link->file == file)
{
- cache=cache_buff; /* Fall back to safe buffer */
- count=FLUSH_CACHE;
+ count++;
+ KEYCACHE_DBUG_ASSERT(count<=_my_blocks_used);
}
}
+ /* Allocate a new buffer only if its bigger than the one we have */
+ if (count > FLUSH_CACHE &&
+ !(cache=(BLOCK_LINK**) my_malloc(sizeof(BLOCK_LINK*)*count,MYF(0))))
+ {
+ cache=cache_buff;
+ count=FLUSH_CACHE;
+ }
}
-
- /* Go through the keys and write them to buffer to be flushed */
+
+ /* Retrieve the blocks and write them to a buffer to be flushed */
+restart:
end=(pos=cache)+count;
- for (used=changed_blocks[(uint) file & CHANGED_BLOCKS_MASK];
- used ;
- used=next)
+ for (block=changed_blocks[FILE_HASH(file)] ;
+ block ;
+ block=next)
{
- next=used->next_changed;
- if (used->file == file)
+#if defined(KEYCACHE_DEBUG)
+ cnt++;
+ KEYCACHE_DBUG_ASSERT(cnt <= _my_blocks_used);
+#endif
+ next=block->next_changed;
+ if (block->hash_link->file == file)
{
- if (type != FLUSH_IGNORE_CHANGED)
- {
- if (pos == end)
- {
- if ((error=flush_cached_blocks(file, cache, count)))
- last_errno=error;
- pos=cache;
- }
- *pos++=used;
- _my_cache_write++;
- }
- if (type != FLUSH_KEEP && type != FLUSH_FORCE_WRITE)
- {
- /* This will not destroy position or data */
- _my_blocks_changed--;
- free_block(used);
- }
- else
- link_changed_to_file(used,file);
+ /*
+ Mark the block with BLOCK_IN_FLUSH in order not to let
+ other threads to use it for new pages and interfere with
+ our sequence ot flushing dirty file pages
+ */
+ block->status|= BLOCK_IN_FLUSH;
+
+ if (! (block->status & BLOCK_IN_SWITCH))
+ { /*
+ We care only for the blocks for which flushing was not
+ initiated by other threads as a result of page swapping
+ */
+ reg_requests(block,1);
+ if (type != FLUSH_IGNORE_CHANGED)
+ { /* It's not a temporary file */
+ if (pos == end)
+ { /*
+ This happens only if there is not enough
+ memory for the big block
+ */
+ if ((error=flush_cached_blocks(file,cache,end,type)))
+ last_errno=error;
+ /*
+ Restart the scan as some other thread might have changed
+ the changed blocks chain: the blocks that were in switch
+ state before the flush started have to be excluded
+ */
+ goto restart;
+ }
+ *pos++=block;
+ }
+ else
+ {
+ /* It's a temporary file */
+ _my_blocks_changed--;
+ free_block(block);
+ }
+ }
+ else
+ { /* Link the block into a list of blocks 'in switch' */
+ unlink_changed(block);
+ link_changed(block,&first_in_switch);
+ }
}
}
if (pos != cache)
{
- if ((error=flush_cached_blocks(file, cache, (uint) (pos-cache))))
- last_errno=error;
+ if ((error=flush_cached_blocks(file,cache,pos,type)))
+ last_errno=error;
+ }
+ /* Wait until list of blocks in switch is empty */
+ while (first_in_switch)
+ {
+#if defined(KEYCACHE_DEBUG)
+ cnt=0;
+#endif
+ block=first_in_switch;
+ {
+ struct st_my_thread_var *thread=my_thread_var;
+ add_to_queue(&block->wqueue[COND_FOR_SAVED], thread);
+ do
+ {
+ keycache_pthread_cond_wait(&thread->suspend,&THR_LOCK_keycache);
+ }
+ while (thread->next);
+ }
+#if defined(KEYCACHE_DEBUG)
+ cnt++;
+ KEYCACHE_DBUG_ASSERT(cnt <= _my_blocks_used);
+#endif
}
/* The following happens very seldom */
- if (type != FLUSH_KEEP && type != FLUSH_FORCE_WRITE)
+ if (! (type == FLUSH_KEEP || type == FLUSH_FORCE_WRITE))
{
- for (used=file_blocks[(uint) file & CHANGED_BLOCKS_MASK];
- used ;
- used=next)
+#if defined(KEYCACHE_DEBUG)
+ cnt=0;
+#endif
+ for (block=file_blocks[FILE_HASH(file)] ;
+ block ;
+ block=next)
{
- next=used->next_changed;
- if (used->file == file && (!used->changed ||
- type == FLUSH_IGNORE_CHANGED))
- free_block(used);
+#if defined(KEYCACHE_DEBUG)
+ cnt++;
+ KEYCACHE_DBUG_ASSERT(cnt <= _my_blocks_used);
+#endif
+ next=block->next_changed;
+ if (block->hash_link->file == file &&
+ (! (block->status & BLOCK_CHANGED)
+ || type == FLUSH_IGNORE_CHANGED))
+ {
+ reg_requests(block,1);
+ free_block(block);
+ }
}
}
+ }
+
+ keycache_pthread_mutex_unlock(&THR_LOCK_keycache);
+
#ifndef DBUG_OFF
- DBUG_EXECUTE("check_keycache",test_key_cache("end of flush_key_blocks",0););
+ DBUG_EXECUTE("check_keycache",
+ test_key_cache("end of flush_key_blocks",0););
#endif
- }
if (cache != cache_buff)
my_free((gptr) cache,MYF(0));
if (last_errno)
- errno=last_errno; /* Return first error */
+ errno=last_errno; /* Return first error */
DBUG_RETURN(last_errno != 0);
}
-/*
- Flush all blocks for a specific file to disk
+/*
+ Flush all blocks in the key cache to disk
+*/
+static int flush_all_key_blocks()
+{
+#if defined(KEYCACHE_DEBUG)
+ uint cnt=0;
+#endif
+ while (_my_blocks_changed > 0)
+ {
+ BLOCK_LINK *block;
+ for (block=_my_used_last->next_used ; ; block=block->next_used)
+ {
+ if (block->hash_link)
+ {
+#if defined(KEYCACHE_DEBUG)
+ cnt++;
+ KEYCACHE_DBUG_ASSERT(cnt <= _my_blocks_used);
+#endif
+ if (flush_key_blocks(block->hash_link->file, FLUSH_RELEASE))
+ return 1;
+ break;
+ }
+ if (block == _my_used_last)
+ break;
+ }
+ }
+ return 0;
+}
- SYNOPSIS
- flush_all_key_blocks()
- file File descriptor
- type Type of flush operation
- RETURN VALUES
- 0 Ok
- 1 Error
+#ifndef DBUG_OFF
+/*
+ Test if disk-cache is ok
*/
+static void test_key_cache(const char *where __attribute__((unused)),
+ my_bool lock __attribute__((unused)))
+{
+ /* TODO */
+}
+#endif
-int flush_key_blocks(File file, enum flush_type type)
+#if defined(KEYCACHE_TIMEOUT)
+
+#define KEYCACHE_DUMP_FILE "keycache_dump.txt"
+#define MAX_QUEUE_LEN 100
+
+
+static void keycache_dump()
{
- int res;
- pthread_mutex_lock(&THR_LOCK_keycache);
- res=flush_key_blocks_int(file, type);
- pthread_mutex_unlock(&THR_LOCK_keycache);
- return res;
+ FILE *keycache_dump_file=fopen(KEYCACHE_DUMP_FILE, "w");
+ struct st_my_thread_var *thread_var =my_thread_var;
+ struct st_my_thread_var *last;
+ struct st_my_thread_var *thread;
+ BLOCK_LINK *block;
+ HASH_LINK *hash_link;
+ KEYCACHE_PAGE *page;
+ uint i;
+
+ fprintf(keycache_dump_file, "thread:%u\n", thread->id);
+
+ i=0;
+ thread=last=waiting_for_hash_link.last_thread;
+ fprintf(keycache_dump_file, "queue of threads waiting for hash link\n");
+ if (thread)
+ do
+ {
+ thread=thread->next;
+ page= (KEYCACHE_PAGE *) thread->opt_info;
+ fprintf(keycache_dump_file,
+ "thread:%u, (file,filepos)=(%u,%lu)\n",
+ thread->id,(uint) page->file,(ulong) page->filepos);
+ if (++i == MAX_QUEUE_LEN)
+ break;
+ }
+ while (thread != last);
+
+ i=0;
+ thread=last=waiting_for_block.last_thread;
+ fprintf(keycache_dump_file, "queue of threads waiting for block\n");
+ if (thread)
+ do
+ {
+ thread=thread->next;
+ hash_link= (HASH_LINK *) thread->opt_info;
+ fprintf(keycache_dump_file,
+ "thread:%u hash_link:%u (file,filepos)=(%u,%lu)\n",
+ thread->id, (uint) HASH_LINK_NUMBER(hash_link),
+ (uint) hash_link->file,(ulong) hash_link->diskpos);
+ if (++i == MAX_QUEUE_LEN)
+ break;
+ }
+ while (thread != last);
+
+ for (i=0 ; i< _my_blocks_used ; i++)
+ {
+ int j;
+ block=&_my_block_root[i];
+ hash_link=block->hash_link;
+ fprintf(keycache_dump_file,
+ "block:%u hash_link:%d status:%x #requests=%u waiting_for_readers:%d\n",
+ i, (int) (hash_link ? HASH_LINK_NUMBER(hash_link) : -1),
+ block->status, block->requests, block->condvar ? 1 : 0);
+ for (j=0 ; j < 2; j++)
+ {
+ KEYCACHE_WQUEUE *wqueue=&block->wqueue[j];
+ thread=last=wqueue->last_thread;
+ fprintf(keycache_dump_file, "queue #%d\n", j);
+ if (thread)
+ do
+ {
+ thread=thread->next;
+ fprintf(keycache_dump_file,
+ "thread:%u\n", thread->id);
+ if (++i == MAX_QUEUE_LEN)
+ break;
+ }
+ while (thread != last);
+ }
+ }
+ fprintf(keycache_dump_file, "LRU chain:");
+ block=_my_used_last;
+ if (block)
+ do
+ {
+ block=block->next_used;
+ fprintf(keycache_dump_file,
+ "block:%u, ", BLOCK_NUMBER(block));
+ }
+ while (block != _my_used_last);
+ fprintf(keycache_dump_file, "\n");
+
+ fclose(keycache_dump_file);
}
+#endif /* defined(KEYCACHE_TIMEOUT) */
-/*
- Flush all blocks in the key cache to disk
+#if defined(KEYCACHE_TIMEOUT) && !defined(__WIN__)
- SYNOPSIS
- flush_all_key_blocks()
- NOTE
- We must have a lock on THR_LOCK_keycache before calling this function
+static int keycache_pthread_cond_wait(pthread_cond_t *cond,
+ pthread_mutex_t *mutex)
+{
+ int rc;
+ struct timeval now; /* time when we started waiting */
+ struct timespec timeout; /* timeout value for the wait function */
+ struct timezone tz;
+#if defined(KEYCACHE_DEBUG)
+ int cnt=0;
+#endif
+
+ /* Get current time */
+ gettimeofday(&now, &tz);
+ /* Prepare timeout value */
+ timeout.tv_sec = now.tv_sec + KEYCACHE_TIMEOUT;
+ timeout.tv_nsec = now.tv_usec * 1000; /* timeval uses microseconds. */
+ /* timespec uses nanoseconds. */
+ /* 1 nanosecond = 1000 micro seconds. */
+ KEYCACHE_THREAD_TRACE_END("started waiting");
+#if defined(KEYCACHE_DEBUG)
+ cnt++;
+ if (cnt % 100 == 0)
+ fprintf(keycache_debug_log, "waiting...\n");
+ fflush(keycache_debug_log);
+#endif
+ rc = pthread_cond_timedwait(cond, mutex, &timeout);
+ KEYCACHE_THREAD_TRACE_BEGIN("finished waiting");
+#if defined(KEYCACHE_DEBUG)
+ if (rc == ETIMEDOUT)
+ {
+ fprintf(keycache_debug_log,"aborted by keycache timeout\n");
+ fclose(keycache_debug_log);
+ abort();
+ }
+#endif
+
+ if (rc == ETIMEDOUT)
+ keycache_dump();
+
+#if defined(KEYCACHE_DEBUG)
+ KEYCACHE_DBUG_ASSERT(rc != ETIMEDOUT);
+#else
+ assert(rc != ETIMEDOUT);
+#endif
+ return rc;
+}
+#else
+#if defined(KEYCACHE_DEBUG)
+static int keycache_pthread_cond_wait(pthread_cond_t *cond,
+ pthread_mutex_t *mutex)
+{
+ int rc;
+ KEYCACHE_THREAD_TRACE_END("started waiting");
+ rc = pthread_cond_wait(cond, mutex);
+ KEYCACHE_THREAD_TRACE_BEGIN("finished waiting");
+ return rc;
+}
+#endif
+#endif /* defined(KEYCACHE_TIMEOUT) && !defined(__WIN__) */
- RETURN VALUES
- 0 Ok
- 1 Error
-*/
+#if defined(KEYCACHE_DEBUG)
-static int flush_all_key_blocks()
+static int keycache_pthread_mutex_lock(pthread_mutex_t *mutex)
{
- int error=0;
- while (_my_blocks_changed > 0)
- if (flush_key_blocks_int(_my_used_first->file, FLUSH_RELEASE))
- error=1;
- return error;
+ int rc;
+ rc=pthread_mutex_lock(mutex);
+ KEYCACHE_THREAD_TRACE_BEGIN("");
+ return rc;
}
-#ifndef DBUG_OFF
+static void keycache_pthread_mutex_unlock(pthread_mutex_t *mutex)
+{
+ KEYCACHE_THREAD_TRACE_END("");
+ pthread_mutex_unlock(mutex);
+}
- /* Test if disk-cache is ok */
-static void test_key_cache(const char *where, my_bool lock)
+static int keycache_pthread_cond_signal(pthread_cond_t *cond)
{
- reg1 uint i,error;
- ulong found,changed;
- SEC_LINK *pos,**prev;
+ int rc;
+ KEYCACHE_THREAD_TRACE("signal");
+ rc=pthread_cond_signal(cond);
+ return rc;
+}
- if (lock)
- {
- pthread_mutex_lock(&THR_LOCK_keycache);
- if (_my_disk_blocks <= 0) /* No active key cache */
- {
- pthread_mutex_unlock(&THR_LOCK_keycache);
- return;
- }
- }
- found=error=0;
- for (i= 0 ; i < _my_hash_blocks ; i++)
- {
- for (pos= *(prev= &_my_hash_root[i]) ;
- pos && found < _my_blocks_used+2 ;
- found++, pos= *(prev= &pos->next_hash))
- {
- if (prev != pos->prev_hash)
- {
- error=1;
- DBUG_PRINT("error",
- ("hash: %d pos: %lx : prev: %lx != pos->prev: %lx",
- i,(ulong) pos,(ulong) prev,(ulong) pos->prev_hash));
- }
+static int keycache_pthread_cond_broadcast(pthread_cond_t *cond)
+{
+ int rc;
+ KEYCACHE_THREAD_TRACE("signal");
+ rc=pthread_cond_broadcast(cond);
+ return rc;
+}
- if (((pos->diskpos >> key_cache_shift)+pos->file) % _my_hash_blocks != i)
- {
- DBUG_PRINT("error",("hash: %d pos: %lx : Wrong disk_buffer %ld",
- i,(ulong) pos,(ulong) pos->diskpos));
- error=1;
- }
- }
- }
- if (found > _my_blocks_used)
- {
- DBUG_PRINT("error",("Found too many hash_pointers"));
- error=1;
- }
- if (error && !_my_printed)
- { /* Write all hash-pointers */
- _my_printed=1;
- for (i=0 ; i < _my_hash_blocks ; i++)
- {
- DBUG_PRINT("loop",("hash: %d _my_hash_root: %lx",i,&_my_hash_root[i]));
- pos= _my_hash_root[i]; found=0;
- while (pos && found < 10)
- {
- DBUG_PRINT("loop",("pos: %lx prev: %lx next: %lx file: %d disk_buffer: %ld", (ulong) pos, (ulong) pos->prev_hash, (ulong) pos->next_hash, (ulong) pos->file, (ulong) pos->diskpos));
- found++; pos= pos->next_hash;
- }
- }
- }
+#if defined(KEYCACHE_DEBUG_LOG)
- found=changed=0;
- if ((pos=_my_used_first))
- {
- while (pos != _my_used_last && found < _my_blocks_used+2)
- {
- found++;
- if (pos->changed)
- changed++;
- if (pos->next_used->prev_used != pos)
- {
- DBUG_PRINT("error",("pos: %lx next_used: %lx next_used->prev: %lx",
- (ulong) pos,
- (ulong) pos->next_used,
- (ulong) pos->next_used->prev_hash));
- error=1;
- }
- pos=pos->next_used;
- }
- found++;
- if (pos->changed)
- changed++;
- }
- if (found != _my_blocks_used)
+static void keycache_debug_print(const char * fmt,...)
+{
+ va_list args;
+ va_start(args,fmt);
+ if (keycache_debug_log)
{
- DBUG_PRINT("error",("Found %lu of %lu keyblocks",found,_my_blocks_used));
- error=1;
+ VOID(vfprintf(keycache_debug_log, fmt, args));
+ VOID(fputc('\n',keycache_debug_log));
}
+ va_end(args);
+}
+#endif /* defined(KEYCACHE_DEBUG_LOG) */
- for (i= 0 ; i < CHANGED_BLOCKS_HASH ; i++)
- {
- found=0;
- prev= &changed_blocks[i];
- for (pos= *prev ; pos && found < _my_blocks_used+2; pos=pos->next_changed)
- {
- found++;
- if (pos->prev_changed != prev)
- {
- DBUG_PRINT("error",("changed_block list %d doesn't point backwards properly",i));
- error=1;
- }
- prev= &pos->next_changed;
- if (((uint) pos->file & CHANGED_BLOCKS_MASK) != i)
- {
- DBUG_PRINT("error",("Wrong file %d in changed blocks: %d",pos->file,i));
- error=1;
- }
- changed--;
- }
- if (pos)
- {
- DBUG_PRINT("error",("changed_blocks %d has recursive link",i));
- error=1;
- }
+#if defined(KEYCACHE_DEBUG_LOG)
+
+
+void keycache_debug_log_close(void)
+{
+ if (keycache_debug_log)
+ fclose(keycache_debug_log);
+}
+#endif /* defined(KEYCACHE_DEBUG_LOG) */
+
+#endif /* defined(KEYCACHE_DEBUG) */
- found=0;
- prev= &file_blocks[i];
- for (pos= *prev ; pos && found < _my_blocks_used+2; pos=pos->next_changed)
- {
- found++;
- if (pos->prev_changed != prev)
- {
- DBUG_PRINT("error",("file_block list %d doesn't point backwards properly",i));
- error=1;
- }
- prev= &pos->next_changed;
- if (((uint) pos->file & CHANGED_BLOCKS_MASK) != i)
- {
- DBUG_PRINT("error",("Wrong file %d in file_blocks: %d",pos->file,i));
- error=1;
- }
- }
- if (pos)
- {
- DBUG_PRINT("error",("File_blocks %d has recursive link",i));
- error=1;
- }
- }
- if (changed != 0)
- {
- DBUG_PRINT("error",("Found %lu blocks that wasn't in changed blocks",
- changed));
- error=1;
- }
- if (error)
- DBUG_PRINT("error",("Found error at %s",where));
- if (lock)
- pthread_mutex_unlock(&THR_LOCK_keycache);
- return;
-} /* test_key_cache */
-#endif
diff --git a/regex/Makefile.am b/regex/Makefile.am
index fe72f29b16c..2e23efcbf2a 100644
--- a/regex/Makefile.am
+++ b/regex/Makefile.am
@@ -17,7 +17,7 @@
INCLUDES = @MT_INCLUDES@ -I$(top_srcdir)/include
noinst_LIBRARIES = libregex.a
-LDADD = libregex.a ../strings/libmystrings.a ../mysys/libmysys.a
+LDADD = libregex.a ../strings/libmystrings.a
noinst_HEADERS = cclass.h cname.h regex2.h utils.h engine.c regex.h
libregex_a_SOURCES = regerror.c regcomp.c regexec.c regfree.c reginit.c
noinst_PROGRAMS = re
diff --git a/regex/main.c b/regex/main.c
index 70d75e6ec50..f43a112a661 100644
--- a/regex/main.c
+++ b/regex/main.c
@@ -74,7 +74,7 @@ char *argv[];
exit(status);
}
- err = regcomp(&re, argv[optind++], copts, default_charset_info);
+ err = regcomp(&re, argv[optind++], copts, &my_charset_latin1);
if (err) {
len = regerror(err, &re, erbuf, sizeof(erbuf));
fprintf(stderr, "error %s, %d/%d `%s'\n",
@@ -226,7 +226,7 @@ int opts; /* may not match f1 */
strcpy(f0copy, f0);
re.re_endp = (opts&REG_PEND) ? f0copy + strlen(f0copy) : NULL;
fixstr(f0copy);
- err = regcomp(&re, f0copy, opts, default_charset_info);
+ err = regcomp(&re, f0copy, opts, &my_charset_latin1);
if (err != 0 && (!opt('C', f1) || err != efind(f2))) {
/* unexpected error or wrong error */
len = regerror(err, &re, erbuf, sizeof(erbuf));
diff --git a/regex/regcomp.c b/regex/regcomp.c
index 8a4ebbdfe17..d95a0ddf5d0 100644
--- a/regex/regcomp.c
+++ b/regex/regcomp.c
@@ -117,7 +117,7 @@ CHARSET_INFO *charset;
# define GOODFLAGS(f) ((f)&~REG_DUMP)
#endif
- regex_init(); /* Init cclass if neaded */
+ regex_init(charset); /* Init cclass if neaded */
preg->charset=charset;
cflags = GOODFLAGS(cflags);
if ((cflags&REG_EXTENDED) && (cflags&REG_NOSPEC))
diff --git a/regex/regex.h b/regex/regex.h
index 1602f66d190..e0fb0c77dc9 100644
--- a/regex/regex.h
+++ b/regex/regex.h
@@ -76,7 +76,7 @@ extern void regfree(regex_t *);
/* === reginit.c === */
-extern void regex_init(void); /* Should be called for multithread progs */
+extern void regex_init(CHARSET_INFO *cs); /* Should be called for multithread progs */
extern void regex_end(void); /* If one wants a clean end */
#ifdef __cplusplus
diff --git a/regex/reginit.c b/regex/reginit.c
index fe81f88a342..09ffff37ef0 100644
--- a/regex/reginit.c
+++ b/regex/reginit.c
@@ -7,12 +7,11 @@
static bool regex_inited=0;
-void regex_init()
+void regex_init(CHARSET_INFO *cs)
{
char buff[CCLASS_LAST][256];
int count[CCLASS_LAST];
uint i;
- CHARSET_INFO *cs=default_charset_info;
if (!regex_inited)
{
diff --git a/sql/convert.cc b/sql/convert.cc
index 29abdde7ddc..84003af3922 100644
--- a/sql/convert.cc
+++ b/sql/convert.cc
@@ -433,7 +433,7 @@ CONVERT *get_convert_set(const char *name)
{
for (CONVERT **ptr=convert_tables ; *ptr ; ptr++)
{
- if (!my_strcasecmp(my_charset_latin1,(*ptr)->name,name))
+ if (!my_strcasecmp(&my_charset_latin1,(*ptr)->name,name))
return (*ptr);
}
return 0;
diff --git a/sql/des_key_file.cc b/sql/des_key_file.cc
index 22cf9094486..aa74a7880db 100644
--- a/sql/des_key_file.cc
+++ b/sql/des_key_file.cc
@@ -34,7 +34,7 @@ static int initialized;
1 Error
*/
-#define des_cs my_charset_latin1
+#define des_cs &my_charset_latin1
bool
load_des_key_file(const char *file_name)
diff --git a/sql/field.cc b/sql/field.cc
index 0fa306fe718..89ca6ff96c2 100644
--- a/sql/field.cc
+++ b/sql/field.cc
@@ -287,7 +287,7 @@ uint Field::fill_cache_field(CACHE_FIELD *copy)
bool Field::get_date(TIME *ltime,bool fuzzydate)
{
char buff[40];
- String tmp(buff,sizeof(buff),my_charset_bin),tmp2,*res;
+ String tmp(buff,sizeof(buff),&my_charset_bin),tmp2,*res;
if (!(res=val_str(&tmp,&tmp2)) ||
str_to_TIME(res->ptr(),res->length(),ltime,fuzzydate) == TIMESTAMP_NONE)
return 1;
@@ -297,7 +297,7 @@ bool Field::get_date(TIME *ltime,bool fuzzydate)
bool Field::get_time(TIME *ltime)
{
char buff[40];
- String tmp(buff,sizeof(buff),my_charset_bin),tmp2,*res;
+ String tmp(buff,sizeof(buff),&my_charset_bin),tmp2,*res;
if (!(res=val_str(&tmp,&tmp2)) ||
str_to_time(res->ptr(),res->length(),ltime))
return 1;
@@ -311,23 +311,23 @@ void Field::store_time(TIME *ltime,timestamp_type type)
char buff[25];
switch (type) {
case TIMESTAMP_NONE:
- store("",0,my_charset_bin); // Probably an error
+ store("",0,&my_charset_bin); // Probably an error
break;
case TIMESTAMP_DATE:
sprintf(buff,"%04d-%02d-%02d", ltime->year,ltime->month,ltime->day);
- store(buff,10,my_charset_bin);
+ store(buff,10,&my_charset_bin);
break;
case TIMESTAMP_FULL:
sprintf(buff,"%04d-%02d-%02d %02d:%02d:%02d",
ltime->year,ltime->month,ltime->day,
ltime->hour,ltime->minute,ltime->second);
- store(buff,19,my_charset_bin);
+ store(buff,19,&my_charset_bin);
break;
case TIMESTAMP_TIME:
{
ulong length= my_sprintf(buff, (buff, "%02d:%02d:%02d",
ltime->hour,ltime->minute,ltime->second));
- store(buff,(uint) length, my_charset_bin);
+ store(buff,(uint) length, &my_charset_bin);
break;
}
}
@@ -357,7 +357,7 @@ void Field_null::sql_type(String &res) const
void
Field_decimal::reset(void)
{
- Field_decimal::store("0",1,my_charset_bin);
+ Field_decimal::store("0",1,&my_charset_bin);
}
void Field_decimal::overflow(bool negative)
@@ -402,12 +402,12 @@ void Field_decimal::overflow(bool negative)
int Field_decimal::store(const char *from, uint len, CHARSET_INFO *cs)
{
char buff[80];
- String tmp(buff,sizeof(buff), my_charset_bin);
+ String tmp(buff,sizeof(buff), &my_charset_bin);
/* Convert character set if the old one is multi byte */
if (cs->mbmaxlen > 1)
{
- tmp.copy(from, len, cs, my_charset_bin);
+ tmp.copy(from, len, cs, &my_charset_bin);
from= tmp.ptr();
len= tmp.length();
}
@@ -471,7 +471,7 @@ int Field_decimal::store(const char *from, uint len, CHARSET_INFO *cs)
tmp_dec++;
/* skip pre-space */
- while (from != end && my_isspace(my_charset_bin,*from))
+ while (from != end && my_isspace(&my_charset_bin,*from))
from++;
if (from == end)
{
@@ -508,13 +508,13 @@ int Field_decimal::store(const char *from, uint len, CHARSET_INFO *cs)
for (; from!=end && *from == '0'; from++) ; // Read prezeros
pre_zeros_end=int_digits_from=from;
/* Read non zero digits at the left of '.'*/
- for (; from != end && my_isdigit(my_charset_bin, *from) ; from++) ;
+ for (; from != end && my_isdigit(&my_charset_bin, *from) ; from++) ;
int_digits_end=from;
if (from!=end && *from == '.') // Some '.' ?
from++;
frac_digits_from= from;
/* Read digits at the right of '.' */
- for (;from!=end && my_isdigit(my_charset_bin, *from); from++) ;
+ for (;from!=end && my_isdigit(&my_charset_bin, *from); from++) ;
frac_digits_end=from;
// Some exponentiation symbol ?
if (from != end && (*from == 'e' || *from == 'E'))
@@ -530,7 +530,7 @@ int Field_decimal::store(const char *from, uint len, CHARSET_INFO *cs)
exponents will become small (e.g. 1e4294967296 will become 1e0, and the
field will finally contain 1 instead of its max possible value).
*/
- for (;from!=end && my_isdigit(my_charset_bin, *from); from++)
+ for (;from!=end && my_isdigit(&my_charset_bin, *from); from++)
{
exponent=10*exponent+(*from-'0');
if (exponent>MAX_EXPONENT)
@@ -548,7 +548,7 @@ int Field_decimal::store(const char *from, uint len, CHARSET_INFO *cs)
if (current_thd->count_cuted_fields)
{
// Skip end spaces
- for (;from != end && my_isspace(my_charset_bin, *from); from++) ;
+ for (;from != end && my_isspace(&my_charset_bin, *from); from++) ;
if (from != end) // If still something left, warn
{
current_thd->cuted_fields++;
@@ -841,17 +841,17 @@ int Field_decimal::store(longlong nr)
double Field_decimal::val_real(void)
{
int not_used;
- return my_strntod(my_charset_bin, ptr, field_length, NULL, &not_used);
+ return my_strntod(&my_charset_bin, ptr, field_length, NULL, &not_used);
}
longlong Field_decimal::val_int(void)
{
int not_used;
if (unsigned_flag)
- return my_strntoull(my_charset_bin, ptr, field_length, 10, NULL,
+ return my_strntoull(&my_charset_bin, ptr, field_length, 10, NULL,
&not_used);
else
- return my_strntoll( my_charset_bin, ptr, field_length, 10, NULL,
+ return my_strntoll(&my_charset_bin, ptr, field_length, 10, NULL,
&not_used);
}
@@ -862,7 +862,7 @@ String *Field_decimal::val_str(String *val_buffer __attribute__((unused)),
char *str;
for (str=ptr ; *str == ' ' ; str++) ;
uint tmp_length=(uint) (str-ptr);
- val_ptr->set_charset(my_charset_bin);
+ val_ptr->set_charset(&my_charset_bin);
if (field_length < tmp_length) // Error in data
val_ptr->length(0);
else
@@ -883,9 +883,9 @@ int Field_decimal::cmp(const char *a_ptr,const char *b_ptr)
for (end=a_ptr+field_length;
a_ptr != end &&
(*a_ptr == *b_ptr ||
- ((my_isspace(my_charset_bin,*a_ptr) || *a_ptr == '+' ||
+ ((my_isspace(&my_charset_bin,*a_ptr) || *a_ptr == '+' ||
*a_ptr == '0') &&
- (my_isspace(my_charset_bin,*b_ptr) || *b_ptr == '+' ||
+ (my_isspace(&my_charset_bin,*b_ptr) || *b_ptr == '+' ||
*b_ptr == '0')));
a_ptr++,b_ptr++)
{
@@ -913,7 +913,7 @@ void Field_decimal::sort_string(char *to,uint length)
char *str,*end;
for (str=ptr,end=ptr+length;
str != end &&
- ((my_isspace(my_charset_bin,*str) || *str == '+' ||
+ ((my_isspace(&my_charset_bin,*str) || *str == '+' ||
*str == '0')) ;
str++)
*to++=' ';
@@ -925,7 +925,7 @@ void Field_decimal::sort_string(char *to,uint length)
*to++=1; // Smaller than any number
str++;
while (str != end)
- if (my_isdigit(my_charset_bin,*str))
+ if (my_isdigit(&my_charset_bin,*str))
*to++= (char) ('9' - *str++);
else
*to++= *str++;
@@ -1103,7 +1103,7 @@ longlong Field_tiny::val_int(void)
String *Field_tiny::val_str(String *val_buffer,
String *val_ptr __attribute__((unused)))
{
- CHARSET_INFO *cs= my_charset_bin;
+ CHARSET_INFO *cs= &my_charset_bin;
uint length;
uint mlength=max(field_length+1,5*cs->mbmaxlen);
val_buffer->alloc(mlength);
@@ -1341,7 +1341,7 @@ longlong Field_short::val_int(void)
String *Field_short::val_str(String *val_buffer,
String *val_ptr __attribute__((unused)))
{
- CHARSET_INFO *cs= my_charset_bin;
+ CHARSET_INFO *cs= &my_charset_bin;
uint length;
uint mlength=max(field_length+1,7*cs->mbmaxlen);
val_buffer->alloc(mlength);
@@ -1586,7 +1586,7 @@ longlong Field_medium::val_int(void)
String *Field_medium::val_str(String *val_buffer,
String *val_ptr __attribute__((unused)))
{
- CHARSET_INFO *cs= my_charset_bin;
+ CHARSET_INFO *cs= &my_charset_bin;
uint length;
uint mlength=max(field_length+1,10*cs->mbmaxlen);
val_buffer->alloc(mlength);
@@ -1816,7 +1816,7 @@ longlong Field_long::val_int(void)
String *Field_long::val_str(String *val_buffer,
String *val_ptr __attribute__((unused)))
{
- CHARSET_INFO *cs= my_charset_bin;
+ CHARSET_INFO *cs= &my_charset_bin;
uint length;
uint mlength=max(field_length+1,12*cs->mbmaxlen);
val_buffer->alloc(mlength);
@@ -2038,7 +2038,7 @@ longlong Field_longlong::val_int(void)
String *Field_longlong::val_str(String *val_buffer,
String *val_ptr __attribute__((unused)))
{
- CHARSET_INFO *cs= my_charset_bin;
+ CHARSET_INFO *cs= &my_charset_bin;
uint length;
uint mlength=max(field_length+1,22*cs->mbmaxlen);
val_buffer->alloc(mlength);
@@ -2844,10 +2844,10 @@ String *Field_timestamp::val_str(String *val_buffer,
if (temp == 0L)
{ /* Zero time is "000000" */
- val_ptr->set("0000-00-00 00:00:00", 19, my_charset_bin);
+ val_ptr->set("0000-00-00 00:00:00", 19, &my_charset_bin);
return val_ptr;
}
- val_buffer->set_charset(my_charset_bin); // Safety
+ val_buffer->set_charset(&my_charset_bin); // Safety
time_arg=(time_t) temp;
localtime_r(&time_arg,&tm_tmp);
l_time=&tm_tmp;
@@ -3880,7 +3880,7 @@ int Field_string::store(const char *from,uint length,CHARSET_INFO *cs)
{
memcpy(ptr,from,length);
if (length < field_length)
- bfill(ptr+length,field_length-length,' ');
+ field_charset->fill(field_charset,ptr+length,field_length-length,' ');
}
else
{
@@ -3888,14 +3888,12 @@ int Field_string::store(const char *from,uint length,CHARSET_INFO *cs)
if (current_thd->count_cuted_fields)
{ // Check if we loosed some info
const char *end=from+length;
- for (from+=field_length ; from != end ; from++)
+ from+= field_length;
+ from+= field_charset->scan(field_charset, from, end, MY_SEQ_SPACES);
+ if (from != end)
{
- if (!my_isspace(field_charset,*from))
- {
- current_thd->cuted_fields++;
- error=1;
- break;
- }
+ current_thd->cuted_fields++;
+ error=1;
}
}
}
@@ -3909,7 +3907,7 @@ int Field_string::store(double nr)
int width=min(field_length,DBL_DIG+5);
sprintf(buff,"%-*.*g",width,max(width-5,0),nr);
end=strcend(buff,' ');
- return Field_string::store(buff,(uint) (end - buff), my_charset_bin);
+ return Field_string::store(buff,(uint) (end - buff), &my_charset_bin);
}
@@ -4069,7 +4067,7 @@ int Field_varstring::store(double nr)
int width=min(field_length,DBL_DIG+5);
sprintf(buff,"%-*.*g",width,max(width-5,0),nr);
end=strcend(buff,' ');
- return Field_varstring::store(buff,(uint) (end - buff), my_charset_bin);
+ return Field_varstring::store(buff,(uint) (end - buff), &my_charset_bin);
}
diff --git a/sql/field.h b/sql/field.h
index 97900938e9d..f13ef2ee735 100644
--- a/sql/field.h
+++ b/sql/field.h
@@ -78,10 +78,11 @@ public:
virtual void reset_fields() {}
virtual void set_default()
{
- memcpy(ptr, ptr + table->rec_buff_length, pack_length());
+ my_ptrdiff_t offset = table->default_values() - table->record[0];
+ memcpy(ptr, ptr + offset, pack_length());
if (null_ptr)
*null_ptr= ((*null_ptr & (uchar) ~null_bit) |
- null_ptr[table->rec_buff_length] & null_bit);
+ null_ptr[offset] & null_bit);
}
virtual bool binary() const { return 1; }
virtual bool zero_pack() const { return 1; }
@@ -204,7 +205,7 @@ public:
uint fill_cache_field(struct st_cache_field *copy);
virtual bool get_date(TIME *ltime,bool fuzzydate);
virtual bool get_time(TIME *ltime);
- virtual CHARSET_INFO *charset(void) const { return my_charset_bin; }
+ virtual CHARSET_INFO *charset(void) const { return &my_charset_bin; }
virtual void set_charset(CHARSET_INFO *charset) { }
friend bool reopen_table(THD *,struct st_table *,bool);
friend int cre_myisam(my_string name, register TABLE *form, uint options,
@@ -787,7 +788,7 @@ public:
enum ha_base_keytype key_type() const
{ return binary() ? HA_KEYTYPE_BINARY : HA_KEYTYPE_TEXT; }
bool zero_pack() const { return 0; }
- void reset(void) { bfill(ptr,field_length,' '); }
+ void reset(void) { charset()->fill(charset(),ptr,field_length,' '); }
int store(const char *to,uint length,CHARSET_INFO *charset);
int store(double nr);
int store(longlong nr);
@@ -942,11 +943,11 @@ public:
enum utype unireg_check_arg, const char *field_name_arg,
struct st_table *table_arg,uint blob_pack_length)
:Field_blob(ptr_arg, null_ptr_arg, null_bit_arg, unireg_check_arg,
- field_name_arg, table_arg, blob_pack_length,my_charset_bin) {}
+ field_name_arg, table_arg, blob_pack_length,&my_charset_bin) {}
Field_geom(uint32 len_arg,bool maybe_null_arg, const char *field_name_arg,
struct st_table *table_arg)
:Field_blob(len_arg, maybe_null_arg, field_name_arg,
- table_arg, my_charset_bin) {}
+ table_arg, &my_charset_bin) {}
enum ha_base_keytype key_type() const { return HA_KEYTYPE_VARBINARY; }
enum_field_types type() const { return FIELD_TYPE_GEOMETRY;}
void sql_type(String &str) const;
diff --git a/sql/filesort.cc b/sql/filesort.cc
index 0e0b2c8f33a..27c4b962515 100644
--- a/sql/filesort.cc
+++ b/sql/filesort.cc
@@ -75,7 +75,7 @@ ha_rows filesort(THD *thd, TABLE *table, SORT_FIELD *sortorder, uint s_length,
uchar **sort_keys;
IO_CACHE tempfile, buffpek_pointers, *selected_records_file, *outfile;
SORTPARAM param;
- CHARSET_INFO *charset=my_charset_bin;
+ CHARSET_INFO *charset= &my_charset_bin;
DBUG_ENTER("filesort");
DBUG_EXECUTE("info",TEST_filesort(sortorder,s_length););
#ifdef SKIP_DBUG_IN_FILESORT
@@ -123,11 +123,9 @@ ha_rows filesort(THD *thd, TABLE *table, SORT_FIELD *sortorder, uint s_length,
if (param.sort_length == param.ref_length && records > param.max_rows)
records=param.max_rows; /* purecov: inspected */
-#ifdef USE_STRCOLL
if (use_strnxfrm(charset) &&
!(param.tmp_buffer=my_malloc(param.sort_length,MYF(MY_WME))))
goto err;
-#endif
memavl= thd->variables.sortbuff_size;
while (memavl >= MIN_SORT_MEMORY)
@@ -200,10 +198,8 @@ ha_rows filesort(THD *thd, TABLE *table, SORT_FIELD *sortorder, uint s_length,
error =0;
err:
-#ifdef USE_STRCOLL
if (param.tmp_buffer)
x_free(param.tmp_buffer);
-#endif
x_free((gptr) sort_keys);
x_free((gptr) buffpek);
close_cached_file(&tempfile);
@@ -494,7 +490,6 @@ static void make_sortkey(register SORTPARAM *param,
diff=0; /* purecov: inspected */
length=sort_field->length;
}
-#ifdef USE_STRCOLL
if (use_strnxfrm(cs))
{
if (item->binary())
@@ -520,15 +515,12 @@ static void make_sortkey(register SORTPARAM *param,
}
else
{
-#endif
if (res->ptr() != (char*) to)
memcpy(to,res->ptr(),length);
bzero((char *)to+length,diff);
if (!item->binary())
my_tosort(cs, (char*) to,length);
-#ifdef USE_STRCOLL
}
-#endif
break;
}
case INT_RESULT:
@@ -930,34 +922,27 @@ sortlength(SORT_FIELD *sortorder, uint s_length)
else
{
sortorder->length=sortorder->field->pack_length();
-#ifdef USE_STRCOLL
if (!sortorder->field->binary())
{
CHARSET_INFO *cs=sortorder->field->charset();
if (use_strnxfrm(cs))
sortorder->length= sortorder->length*cs->strxfrm_multiply;
}
-#endif
}
if (sortorder->field->maybe_null())
length++; // Place for NULL marker
}
else
{
-#ifdef USE_STRCOLL
-
-#endif
switch ((sortorder->result_type=sortorder->item->result_type())) {
case STRING_RESULT:
sortorder->length=sortorder->item->max_length;
-#ifdef USE_STRCOLL
if (!sortorder->item->binary())
{
CHARSET_INFO *cs=sortorder->item->charset();
if (use_strnxfrm(cs))
sortorder->length= sortorder->length*cs->strxfrm_multiply;
}
-#endif
break;
case INT_RESULT:
#if SIZEOF_LONG_LONG > 4
diff --git a/sql/hostname.cc b/sql/hostname.cc
index 0c86c3305b7..0124fa6d060 100644
--- a/sql/hostname.cc
+++ b/sql/hostname.cc
@@ -221,10 +221,10 @@ my_string ip_to_hostname(struct in_addr *in, uint *errors)
/* Don't accept hostnames that starts with digits because they may be
false ip:s */
- if (my_isdigit(my_charset_latin1,name[0]))
+ if (my_isdigit(&my_charset_latin1,name[0]))
{
char *pos;
- for (pos= name+1 ; my_isdigit(my_charset_latin1,*pos); pos++) ;
+ for (pos= name+1 ; my_isdigit(&my_charset_latin1,*pos); pos++) ;
if (*pos == '.')
{
DBUG_PRINT("error",("mysqld doesn't accept hostnames that starts with a number followed by a '.'"));
diff --git a/sql/item.cc b/sql/item.cc
index 359ba486a71..ad35d36b0fd 100644
--- a/sql/item.cc
+++ b/sql/item.cc
@@ -115,7 +115,7 @@ bool Item_string::eq(const Item *item, bool binary_cmp) const
bool Item::get_date(TIME *ltime,bool fuzzydate)
{
char buff[40];
- String tmp(buff,sizeof(buff), my_charset_bin),*res;
+ String tmp(buff,sizeof(buff), &my_charset_bin),*res;
if (!(res=val_str(&tmp)) ||
str_to_TIME(res->ptr(),res->length(),ltime,fuzzydate) == TIMESTAMP_NONE)
{
@@ -133,7 +133,7 @@ bool Item::get_date(TIME *ltime,bool fuzzydate)
bool Item::get_time(TIME *ltime)
{
char buff[40];
- String tmp(buff,sizeof(buff),my_charset_bin),*res;
+ String tmp(buff,sizeof(buff),&my_charset_bin),*res;
if (!(res=val_str(&tmp)) ||
str_to_time(res->ptr(),res->length(),ltime))
{
@@ -883,7 +883,7 @@ Item_varbinary::Item_varbinary(const char *str, uint str_length)
char *ptr=(char*) sql_alloc(max_length+1);
if (!ptr)
return;
- str_value.set(ptr,max_length,my_charset_bin);
+ str_value.set(ptr,max_length,&my_charset_bin);
char *end=ptr+max_length;
if (max_length*2 != str_length)
*ptr++=char_val(*str++); // Not even, assume 0 prefix
@@ -1155,6 +1155,53 @@ bool Item_ref::check_loop(uint id)
DBUG_RETURN((*ref)->check_loop(id));
}
+bool Item_default_value::eq(const Item *item, bool binary_cmp) const
+{
+ return item->type() == DEFAULT_VALUE_ITEM &&
+ ((Item_default_value *)item)->arg->eq(arg, binary_cmp);
+}
+
+bool Item_default_value::fix_fields(THD *thd, struct st_table_list *table_list, Item **items)
+{
+ if (!arg)
+ return false;
+ bool res= arg->fix_fields(thd, table_list, items);
+ if (res)
+ return res;
+ /* arg->type() can be only REF_ITEM or FIELD_ITEM for it defined as
+ simple_ident in sql_yacc.yy
+ */
+ if (arg->type() == REF_ITEM)
+ {
+ Item_ref *ref= (Item_ref *)arg;
+ if (ref->ref[0]->type() != FIELD_ITEM)
+ {
+ return 1;
+ }
+ arg= ref->ref[0];
+ }
+ Item_field *field_arg= (Item_field *)arg;
+ Field *def_field= (Field*) sql_alloc(field_arg->field->size_of());
+ if (!def_field)
+ return 1;
+ memcpy(def_field, field_arg->field, field_arg->field->size_of());
+ def_field->move_field(def_field->table->default_values() -
+ def_field->table->record[0]);
+ set_field(def_field);
+ return 0;
+}
+
+void Item_default_value::print(String *str)
+{
+ if (!arg)
+ {
+ str->append("DEFAULT");
+ return;
+ }
+ str->append("DEFAULT(");
+ arg->print(str);
+ str->append(')');
+}
/*
If item is a const function, calculate it and return a const item
@@ -1185,7 +1232,7 @@ Item *resolve_const_item(Item *item,Item *comp_item)
if (res_type == STRING_RESULT)
{
char buff[MAX_FIELD_WIDTH];
- String tmp(buff,sizeof(buff),my_charset_bin),*result;
+ String tmp(buff,sizeof(buff),&my_charset_bin),*result;
result=item->val_str(&tmp);
if (item->null_value)
{
@@ -1240,8 +1287,8 @@ bool field_is_equal_to_item(Field *field,Item *item)
{
char item_buff[MAX_FIELD_WIDTH];
char field_buff[MAX_FIELD_WIDTH];
- String item_tmp(item_buff,sizeof(item_buff),my_charset_bin),*item_result;
- String field_tmp(field_buff,sizeof(field_buff),my_charset_bin);
+ String item_tmp(item_buff,sizeof(item_buff),&my_charset_bin),*item_result;
+ String field_tmp(field_buff,sizeof(field_buff),&my_charset_bin);
item_result=item->val_str(&item_tmp);
if (item->null_value)
return 1; // This must be true
diff --git a/sql/item.h b/sql/item.h
index 3852a63e722..7aa33b25db8 100644
--- a/sql/item.h
+++ b/sql/item.h
@@ -33,10 +33,11 @@ public:
enum Type {FIELD_ITEM, FUNC_ITEM, SUM_FUNC_ITEM, STRING_ITEM,
INT_ITEM, REAL_ITEM, NULL_ITEM, VARBIN_ITEM,
- COPY_STR_ITEM, FIELD_AVG_ITEM, DEFAULT_ITEM,
+ COPY_STR_ITEM, FIELD_AVG_ITEM, DEFAULT_VALUE_ITEM,
PROC_ITEM,COND_ITEM, REF_ITEM, FIELD_STD_ITEM,
FIELD_VARIANCE_ITEM, CONST_ITEM,
SUBSELECT_ITEM, ROW_ITEM, CACHE_ITEM};
+
enum cond_result { COND_UNDEF,COND_OK,COND_TRUE,COND_FALSE };
String str_value; /* used to store value */
@@ -167,9 +168,9 @@ public:
bool get_date(TIME *ltime,bool fuzzydate);
bool get_time(TIME *ltime);
bool is_null() { return field->is_null(); }
+ friend class Item_default_value;
};
-
class Item_null :public Item
{
public:
@@ -375,26 +376,6 @@ public:
void print(String *str);
};
-
-/* For INSERT ... VALUES (DEFAULT) */
-
-class Item_default :public Item
-{
-public:
- Item_default() { name= (char*) "DEFAULT"; }
- enum Type type() const { return DEFAULT_ITEM; }
- int save_in_field(Field *field, bool no_conversions)
- {
- field->set_default();
- return 0;
- }
- virtual double val() { return 0.0; }
- virtual longlong val_int() { return 0; }
- virtual String *val_str(String *str) { return 0; }
- bool basic_const_item() const { return 1; }
-};
-
-
/* for show tables */
class Item_datetime :public Item_string
@@ -679,6 +660,36 @@ public:
bool cmp(void);
};
+class Item_default_value : public Item_field
+{
+public:
+ Item *arg;
+ Item_default_value() :
+ Item_field((const char *)NULL, (const char *)NULL, (const char *)NULL), arg(NULL) {}
+ Item_default_value(Item *a) :
+ Item_field((const char *)NULL, (const char *)NULL, (const char *)NULL), arg(a) {}
+ enum Type type() const { return DEFAULT_VALUE_ITEM; }
+ bool eq(const Item *item, bool binary_cmp) const;
+ bool fix_fields(THD *, struct st_table_list *, Item **);
+ bool check_loop(uint id)
+ {
+ return Item_field::check_loop(id) || arg->check_loop(id);
+ }
+ void set_outer_resolving() { arg->set_outer_resolving(); }
+ void print(String *str);
+ virtual bool basic_const_item() const { return true; }
+ int save_in_field(Field *field, bool no_conversions)
+ {
+ if (!arg)
+ {
+ field->set_default();
+ return 0;
+ }
+ return Item_field::save_in_field(field, no_conversions);
+ }
+ table_map used_tables() const { return (table_map)0L; }
+};
+
class Item_cache: public Item
{
public:
diff --git a/sql/item_cmpfunc.cc b/sql/item_cmpfunc.cc
index 06b7dc451dc..94894fdb918 100644
--- a/sql/item_cmpfunc.cc
+++ b/sql/item_cmpfunc.cc
@@ -282,7 +282,7 @@ bool Item_in_optimizer::fix_fields(THD *thd, struct st_table_list *tables,
if (args[0]->maybe_null)
maybe_null=1;
if (args[0]->binary())
- set_charset(my_charset_bin);
+ set_charset(&my_charset_bin);
with_sum_func= args[0]->with_sum_func;
used_tables_cache= args[0]->used_tables();
const_item_cache= args[0]->const_item();
@@ -648,11 +648,11 @@ Item_func_if::fix_length_and_dec()
{
cached_result_type = STRING_RESULT;
set_charset( (args[1]->binary() || args[2]->binary()) ?
- my_charset_bin : args[1]->charset());
+ &my_charset_bin : args[1]->charset());
}
else
{
- set_charset(my_charset_bin); // Number
+ set_charset(&my_charset_bin); // Number
if (arg1_type == REAL_RESULT || arg2_type == REAL_RESULT)
cached_result_type = REAL_RESULT;
else
@@ -1680,7 +1680,7 @@ longlong Item_func_like::val_int()
null_value=0;
if ((res->charset()->state & MY_CS_BINSORT) ||
(res2->charset()->state & MY_CS_BINSORT))
- set_charset(my_charset_bin);
+ set_charset(&my_charset_bin);
if (canDoTurboBM)
return turboBM_matches(res->ptr(), res->length()) ? 1 : 0;
return my_wildcmp(charset(),
@@ -1767,7 +1767,7 @@ Item_func_regex::fix_fields(THD *thd, TABLE_LIST *tables, Item **ref)
max_length= 1;
decimals= 0;
if (args[0]->binary() || args[1]->binary())
- set_charset(my_charset_bin);
+ set_charset(&my_charset_bin);
used_tables_cache=args[0]->used_tables() | args[1]->used_tables();
const_item_cache=args[0]->const_item() && args[1]->const_item();
diff --git a/sql/item_func.cc b/sql/item_func.cc
index 477b759be61..112af20f14e 100644
--- a/sql/item_func.cc
+++ b/sql/item_func.cc
@@ -115,7 +115,7 @@ Item_func::fix_fields(THD *thd, TABLE_LIST *tables, Item **ref)
if ((*arg)->maybe_null)
maybe_null=1;
if ((*arg)->binary())
- set_charset(my_charset_bin);
+ set_charset(&my_charset_bin);
with_sum_func= with_sum_func || (*arg)->with_sum_func;
used_tables_cache|=(*arg)->used_tables();
const_item_cache&= (*arg)->const_item();
@@ -856,7 +856,7 @@ void Item_func_min_max::fix_length_and_dec()
maybe_null=0;
cmp_type=item_cmp_type(cmp_type,args[i]->result_type());
if (args[i]->binary())
- set_charset(my_charset_bin);
+ set_charset(&my_charset_bin);
}
}
@@ -1325,7 +1325,7 @@ udf_handler::fix_fields(THD *thd, TABLE_LIST *tables, Item_result_field *func,
if ((*arg)->fix_fields(thd, tables, arg) || (*arg)->check_cols(1))
return 1;
if ((*arg)->binary())
- func->set_charset(my_charset_bin);
+ func->set_charset(&my_charset_bin);
if ((*arg)->maybe_null)
func->maybe_null=1;
func->with_sum_func= func->with_sum_func || (*arg)->with_sum_func;
@@ -1894,7 +1894,7 @@ longlong Item_func_set_last_insert_id::val_int()
longlong Item_func_benchmark::val_int()
{
char buff[MAX_FIELD_WIDTH];
- String tmp(buff,sizeof(buff), my_charset_bin);
+ String tmp(buff,sizeof(buff), &my_charset_bin);
THD *thd=current_thd;
for (ulong loop=0 ; loop < loop_count && !thd->killed; loop++)
@@ -2040,7 +2040,7 @@ Item_func_set_user_var::update()
case STRING_RESULT:
{
char buffer[MAX_FIELD_WIDTH];
- String tmp(buffer,sizeof(buffer),my_charset_bin);
+ String tmp(buffer,sizeof(buffer),&my_charset_bin);
(void) val_str(&tmp);
break;
}
@@ -2235,7 +2235,7 @@ longlong Item_func_inet_aton::val_int()
char c = '.'; // we mark c to indicate invalid IP in case length is 0
char buff[36];
- String *s,tmp(buff,sizeof(buff),my_charset_bin);
+ String *s,tmp(buff,sizeof(buff),&my_charset_bin);
if (!(s = args[0]->val_str(&tmp))) // If null value
goto err;
null_value=0;
diff --git a/sql/item_strfunc.cc b/sql/item_strfunc.cc
index 03dd940db51..21d28048848 100644
--- a/sql/item_strfunc.cc
+++ b/sql/item_strfunc.cc
@@ -236,7 +236,7 @@ String *Item_func_concat::val_str(String *str)
for (i=1 ; i < arg_count ; i++)
{
if (args[i]->binary())
- set_charset(my_charset_bin);
+ set_charset(&my_charset_bin);
if (res->length() == 0)
{
if (!(res=args[i]->val_str(str)))
@@ -1490,7 +1490,7 @@ String *Item_func_soundex::val_str(String *str)
{
String *res =args[0]->val_str(str);
char last_ch,ch;
- CHARSET_INFO *cs=my_charset_latin1;
+ CHARSET_INFO *cs= &my_charset_latin1;
if ((null_value=args[0]->null_value))
return 0; /* purecov: inspected */
@@ -2204,7 +2204,7 @@ String *Item_func_charset::val_str(String *str)
if ((null_value=(args[0]->null_value || !res->charset())))
return 0;
str->copy(res->charset()->name,strlen(res->charset()->name),
- my_charset_latin1, thd_charset());
+ &my_charset_latin1, thd_charset());
return str;
}
diff --git a/sql/item_strfunc.h b/sql/item_strfunc.h
index 339a49a3580..68675eafc52 100644
--- a/sql/item_strfunc.h
+++ b/sql/item_strfunc.h
@@ -526,12 +526,12 @@ public:
{
String *tmp=args[0]->val_str(a);
null_value=args[0]->null_value;
- tmp->set_charset(my_charset_bin);
+ tmp->set_charset(&my_charset_bin);
return tmp;
}
void fix_length_and_dec()
{
- set_charset(my_charset_bin);
+ set_charset(&my_charset_bin);
max_length=args[0]->max_length;
}
void print(String *str) { print_op(str); }
@@ -547,7 +547,7 @@ public:
const char *func_name() const { return "load_file"; }
void fix_length_and_dec()
{
- set_charset(my_charset_bin);
+ set_charset(&my_charset_bin);
maybe_null=1;
max_length=MAX_BLOB_WIDTH;
}
diff --git a/sql/item_timefunc.cc b/sql/item_timefunc.cc
index 744c0c1fa49..a032e25cec8 100644
--- a/sql/item_timefunc.cc
+++ b/sql/item_timefunc.cc
@@ -31,28 +31,28 @@
static String month_names[] =
{
- String("January", my_charset_latin1),
- String("February", my_charset_latin1),
- String("March", my_charset_latin1),
- String("April", my_charset_latin1),
- String("May", my_charset_latin1),
- String("June", my_charset_latin1),
- String("July", my_charset_latin1),
- String("August", my_charset_latin1),
- String("September", my_charset_latin1),
- String("October", my_charset_latin1),
- String("November", my_charset_latin1),
- String("December", my_charset_latin1)
+ String("January", &my_charset_latin1),
+ String("February", &my_charset_latin1),
+ String("March", &my_charset_latin1),
+ String("April", &my_charset_latin1),
+ String("May", &my_charset_latin1),
+ String("June", &my_charset_latin1),
+ String("July", &my_charset_latin1),
+ String("August", &my_charset_latin1),
+ String("September", &my_charset_latin1),
+ String("October", &my_charset_latin1),
+ String("November", &my_charset_latin1),
+ String("December", &my_charset_latin1)
};
static String day_names[] =
{
- String("Monday", my_charset_latin1),
- String("Tuesday", my_charset_latin1),
- String("Wednesday", my_charset_latin1),
- String("Thursday", my_charset_latin1),
- String("Friday", my_charset_latin1),
- String("Saturday", my_charset_latin1),
- String("Sunday", my_charset_latin1)
+ String("Monday", &my_charset_latin1),
+ String("Tuesday", &my_charset_latin1),
+ String("Wednesday", &my_charset_latin1),
+ String("Thursday", &my_charset_latin1),
+ String("Friday", &my_charset_latin1),
+ String("Saturday", &my_charset_latin1),
+ String("Sunday", &my_charset_latin1)
};
/*
@@ -416,7 +416,7 @@ String *Item_date::val_str(String *str)
return (String*) 0;
if (!value) // zero daynr
{
- str->copy("0000-00-00",10,my_charset_latin1,thd_charset());
+ str->copy("0000-00-00",10,&my_charset_latin1,thd_charset());
return str;
}
@@ -425,7 +425,7 @@ String *Item_date::val_str(String *str)
(int) (value/10000L) % 10000,
(int) (value/100)%100,
(int) (value%100));
- str->copy(tmpbuff,10,my_charset_latin1,thd_charset());
+ str->copy(tmpbuff,10,&my_charset_latin1,thd_charset());
return str;
}
@@ -529,7 +529,7 @@ void Item_func_now::fix_length_and_dec()
{
struct tm tm_tmp,*start;
time_t query_start=current_thd->query_start();
- CHARSET_INFO *cs=my_charset_bin;
+ CHARSET_INFO *cs= &my_charset_bin;
decimals=0;
max_length=19*cs->mbmaxlen;
@@ -595,7 +595,7 @@ String *Item_func_sec_to_time::val_str(String *str)
uint sec= (uint) ((ulonglong) seconds % 3600);
length= my_sprintf(buff,(buff,"%s%02lu:%02u:%02u",sign,(long) (seconds/3600),
sec/60, sec % 60));
- str->copy(buff, length, my_charset_latin1, thd_charset());
+ str->copy(buff, length, &my_charset_latin1, thd_charset());
return str;
}
diff --git a/sql/log.cc b/sql/log.cc
index b0e904969e7..0c06ae551aa 100644
--- a/sql/log.cc
+++ b/sql/log.cc
@@ -30,7 +30,7 @@
#include <stdarg.h>
#include <m_ctype.h> // For test_if_number
-#define files_charset_info my_charset_latin1
+#define files_charset_info &my_charset_latin1
MYSQL_LOG mysql_log,mysql_update_log,mysql_slow_log,mysql_bin_log;
extern I_List<i_string> binlog_do_db, binlog_ignore_db;
diff --git a/sql/log_event.cc b/sql/log_event.cc
index 509e62ba03b..a46b95507c8 100644
--- a/sql/log_event.cc
+++ b/sql/log_event.cc
@@ -24,7 +24,7 @@
#include <my_dir.h>
#endif /* MYSQL_CLIENT */
-#define log_cs my_charset_latin1
+#define log_cs &my_charset_latin1
/*****************************************************************************
diff --git a/sql/mysqld.cc b/sql/mysqld.cc
index 1bbd5914d36..86d07207c51 100644
--- a/sql/mysqld.cc
+++ b/sql/mysqld.cc
@@ -33,7 +33,7 @@
#include <thr_alarm.h>
#include <ft_global.h>
-#define mysqld_charset my_charset_latin1
+#define mysqld_charset &my_charset_latin1
#ifndef DBUG_OFF
#define ONE_THREAD
@@ -1937,7 +1937,7 @@ static int init_common_variables(const char *conf_file_name, int argc,
set_var_init();
mysys_uses_curses=0;
#ifdef USE_REGEX
- regex_init();
+ regex_init(&my_charset_latin1);
#endif
if (set_default_charset_by_name(sys_charset.value, MYF(MY_WME)))
return 1;
@@ -4736,8 +4736,8 @@ get_one_option(int optid, const struct my_option *opt __attribute__((unused)),
int err;
char *end;
uint length= strlen(argument);
- long value= my_strntol(my_charset_latin1, argument, length, 10, &end, &err);
- if (test_if_int(argument,(uint) length, end, my_charset_latin1))
+ long value= my_strntol(&my_charset_latin1, argument, length, 10, &end, &err);
+ if (test_if_int(argument,(uint) length, end, &my_charset_latin1))
berkeley_lock_scan_time= value;
else
{
diff --git a/sql/opt_range.cc b/sql/opt_range.cc
index 33309d35157..980390f04bf 100644
--- a/sql/opt_range.cc
+++ b/sql/opt_range.cc
@@ -2794,7 +2794,7 @@ static void
print_key(KEY_PART *key_part,const char *key,uint used_length)
{
char buff[1024];
- String tmp(buff,sizeof(buff),my_charset_bin);
+ String tmp(buff,sizeof(buff),&my_charset_bin);
for (uint length=0;
length < used_length ;
diff --git a/sql/share/charsets/cp1256.xml b/sql/share/charsets/cp1256.xml
index 4947839a728..2a6f6032358 100644
--- a/sql/share/charsets/cp1256.xml
+++ b/sql/share/charsets/cp1256.xml
@@ -4,7 +4,7 @@
<charsets>
-<charset name="">
+<charset name="cp1256">
<ctype>
<map>
diff --git a/sql/sql_acl.cc b/sql/sql_acl.cc
index 645d0439961..3dc370b7b63 100644
--- a/sql/sql_acl.cc
+++ b/sql/sql_acl.cc
@@ -397,7 +397,7 @@ static ulong get_access(TABLE *form, uint fieldnr)
{
ulong access_bits=0,bit;
char buff[2];
- String res(buff,sizeof(buff),my_charset_latin1);
+ String res(buff,sizeof(buff),&my_charset_latin1);
Field **pos;
for (pos=form->field+fieldnr, bit=1;
@@ -406,7 +406,7 @@ static ulong get_access(TABLE *form, uint fieldnr)
pos++ , bit<<=1)
{
(*pos)->val_str(&res,&res);
- if (my_toupper(my_charset_latin1, res[0]) == 'Y')
+ if (my_toupper(&my_charset_latin1, res[0]) == 'Y')
access_bits|= bit;
}
return access_bits;
@@ -706,7 +706,7 @@ static void acl_update_user(const char *user, const char *host,
{
if (!acl_user->host.hostname && !host[0] ||
acl_user->host.hostname &&
- !my_strcasecmp(my_charset_latin1, host, acl_user->host.hostname))
+ !my_strcasecmp(&my_charset_latin1, host, acl_user->host.hostname))
{
acl_user->access=privileges;
if (mqh->bits & 1)
@@ -801,7 +801,7 @@ static void acl_update_db(const char *user, const char *host, const char *db,
{
if (!acl_db->host.hostname && !host[0] ||
acl_db->host.hostname &&
- !my_strcasecmp(my_charset_latin1, host, acl_db->host.hostname))
+ !my_strcasecmp(&my_charset_latin1, host, acl_db->host.hostname))
{
if (!acl_db->db && !db[0] ||
acl_db->db && !strcmp(db,acl_db->db))
@@ -865,7 +865,7 @@ ulong acl_get(const char *host, const char *ip, const char *bin_ip,
end=strmov((tmp_db=strmov(key+sizeof(struct in_addr),user)+1),db);
if (lower_case_table_names)
{
- my_casedn_str(my_charset_latin1, tmp_db);
+ my_casedn_str(&my_charset_latin1, tmp_db);
db=tmp_db;
}
key_length=(uint) (end-key);
@@ -983,7 +983,7 @@ static void init_check_host(void)
DBUG_ENTER("init_check_host");
VOID(my_init_dynamic_array(&acl_wild_hosts,sizeof(struct acl_host_and_ip),
acl_users.elements,1));
- VOID(hash_init(&acl_check_hosts,my_charset_latin1,acl_users.elements,0,0,
+ VOID(hash_init(&acl_check_hosts,&my_charset_latin1,acl_users.elements,0,0,
(hash_get_key) check_get_key,0,HASH_CASE_INSENSITIVE));
if (!allow_all_hosts)
{
@@ -999,7 +999,7 @@ static void init_check_host(void)
{ // Check if host already exists
acl_host_and_ip *acl=dynamic_element(&acl_wild_hosts,j,
acl_host_and_ip *);
- if (!my_strcasecmp(my_charset_latin1,
+ if (!my_strcasecmp(&my_charset_latin1,
acl_user->host.hostname, acl->hostname))
break; // already stored
}
@@ -1078,7 +1078,7 @@ bool check_change_password(THD *thd, const char *host, const char *user)
}
if (!thd->slave_thread &&
(strcmp(thd->user,user) ||
- my_strcasecmp(my_charset_latin1, host, thd->host_or_ip)))
+ my_strcasecmp(&my_charset_latin1, host, thd->host_or_ip)))
{
if (check_access(thd, UPDATE_ACL, "mysql",0,1))
return(1);
@@ -1242,7 +1242,7 @@ static bool compare_hostname(const acl_host_and_ip *host, const char *hostname,
return (tmp & host->ip_mask) == host->ip;
}
return (!host->hostname ||
- (hostname && !wild_case_compare(my_charset_latin1,
+ (hostname && !wild_case_compare(&my_charset_latin1,
hostname,host->hostname)) ||
(ip && !wild_compare(ip,host->hostname)));
}
@@ -1266,8 +1266,8 @@ static bool update_user_table(THD *thd, const char *host, const char *user,
tables.db=(char*) "mysql";
if (!(table=open_ltable(thd,&tables,TL_WRITE)))
DBUG_RETURN(1); /* purecov: deadcode */
- table->field[0]->store(host,(uint) strlen(host), my_charset_latin1);
- table->field[1]->store(user,(uint) strlen(user), my_charset_latin1);
+ table->field[0]->store(host,(uint) strlen(host), &my_charset_latin1);
+ table->field[1]->store(user,(uint) strlen(user), &my_charset_latin1);
if (table->file->index_read_idx(table->record[0],0,
(byte*) table->field[0]->ptr,0,
@@ -1277,7 +1277,7 @@ static bool update_user_table(THD *thd, const char *host, const char *user,
DBUG_RETURN(1); /* purecov: deadcode */
}
store_record(table,1);
- table->field[2]->store(new_password,(uint) strlen(new_password), my_charset_latin1);
+ table->field[2]->store(new_password,(uint) strlen(new_password), &my_charset_latin1);
if ((error=table->file->update_row(table->record[1],table->record[0])))
{
table->file->print_error(error,MYF(0)); /* purecov: deadcode */
@@ -1344,8 +1344,8 @@ static int replace_user_table(THD *thd, TABLE *table, const LEX_USER &combo,
password=combo.password.str;
}
- table->field[0]->store(combo.host.str,combo.host.length, my_charset_latin1);
- table->field[1]->store(combo.user.str,combo.user.length, my_charset_latin1);
+ table->field[0]->store(combo.host.str,combo.host.length, &my_charset_latin1);
+ table->field[1]->store(combo.user.str,combo.user.length, &my_charset_latin1);
table->file->index_init(0);
if (table->file->index_read(table->record[0],
(byte*) table->field[0]->ptr,0,
@@ -1366,16 +1366,16 @@ static int replace_user_table(THD *thd, TABLE *table, const LEX_USER &combo,
}
old_row_exists = 0;
restore_record(table,2); // cp empty row from record[2]
- table->field[0]->store(combo.host.str,combo.host.length, my_charset_latin1);
- table->field[1]->store(combo.user.str,combo.user.length, my_charset_latin1);
- table->field[2]->store(password,(uint) strlen(password), my_charset_latin1);
+ table->field[0]->store(combo.host.str,combo.host.length, &my_charset_latin1);
+ table->field[1]->store(combo.user.str,combo.user.length, &my_charset_latin1);
+ table->field[2]->store(password,(uint) strlen(password), &my_charset_latin1);
}
else
{
old_row_exists = 1;
store_record(table,1); // Save copy for update
if (combo.password.str) // If password given
- table->field[2]->store(password,(uint) strlen(password), my_charset_latin1);
+ table->field[2]->store(password,(uint) strlen(password), &my_charset_latin1);
}
/* Update table columns with new privileges */
@@ -1388,7 +1388,7 @@ static int replace_user_table(THD *thd, TABLE *table, const LEX_USER &combo,
tmp_field++, priv <<= 1)
{
if (priv & rights) // set requested privileges
- (*tmp_field)->store(&what, 1, my_charset_latin1);
+ (*tmp_field)->store(&what, 1, &my_charset_latin1);
}
rights=get_access(table,3);
DBUG_PRINT("info",("table->fields: %d",table->fields));
@@ -1397,39 +1397,39 @@ static int replace_user_table(THD *thd, TABLE *table, const LEX_USER &combo,
/* We write down SSL related ACL stuff */
switch (thd->lex.ssl_type) {
case SSL_TYPE_ANY:
- table->field[24]->store("ANY",3, my_charset_latin1);
- table->field[25]->store("", 0, my_charset_latin1);
- table->field[26]->store("", 0, my_charset_latin1);
- table->field[27]->store("", 0, my_charset_latin1);
+ table->field[24]->store("ANY",3, &my_charset_latin1);
+ table->field[25]->store("", 0, &my_charset_latin1);
+ table->field[26]->store("", 0, &my_charset_latin1);
+ table->field[27]->store("", 0, &my_charset_latin1);
break;
case SSL_TYPE_X509:
- table->field[24]->store("X509",4, my_charset_latin1);
- table->field[25]->store("", 0, my_charset_latin1);
- table->field[26]->store("", 0, my_charset_latin1);
- table->field[27]->store("", 0, my_charset_latin1);
+ table->field[24]->store("X509",4, &my_charset_latin1);
+ table->field[25]->store("", 0, &my_charset_latin1);
+ table->field[26]->store("", 0, &my_charset_latin1);
+ table->field[27]->store("", 0, &my_charset_latin1);
break;
case SSL_TYPE_SPECIFIED:
- table->field[24]->store("SPECIFIED",9, my_charset_latin1);
- table->field[25]->store("", 0, my_charset_latin1);
- table->field[26]->store("", 0, my_charset_latin1);
- table->field[27]->store("", 0, my_charset_latin1);
+ table->field[24]->store("SPECIFIED",9, &my_charset_latin1);
+ table->field[25]->store("", 0, &my_charset_latin1);
+ table->field[26]->store("", 0, &my_charset_latin1);
+ table->field[27]->store("", 0, &my_charset_latin1);
if (thd->lex.ssl_cipher)
table->field[25]->store(thd->lex.ssl_cipher,
- strlen(thd->lex.ssl_cipher), my_charset_latin1);
+ strlen(thd->lex.ssl_cipher), &my_charset_latin1);
if (thd->lex.x509_issuer)
table->field[26]->store(thd->lex.x509_issuer,
- strlen(thd->lex.x509_issuer), my_charset_latin1);
+ strlen(thd->lex.x509_issuer), &my_charset_latin1);
if (thd->lex.x509_subject)
table->field[27]->store(thd->lex.x509_subject,
- strlen(thd->lex.x509_subject), my_charset_latin1);
+ strlen(thd->lex.x509_subject), &my_charset_latin1);
break;
case SSL_TYPE_NOT_SPECIFIED:
break;
case SSL_TYPE_NONE:
- table->field[24]->store("", 0, my_charset_latin1);
- table->field[25]->store("", 0, my_charset_latin1);
- table->field[26]->store("", 0, my_charset_latin1);
- table->field[27]->store("", 0, my_charset_latin1);
+ table->field[24]->store("", 0, &my_charset_latin1);
+ table->field[25]->store("", 0, &my_charset_latin1);
+ table->field[26]->store("", 0, &my_charset_latin1);
+ table->field[27]->store("", 0, &my_charset_latin1);
break;
}
@@ -1518,9 +1518,9 @@ static int replace_db_table(TABLE *table, const char *db,
DBUG_RETURN(-1);
}
- table->field[0]->store(combo.host.str,combo.host.length, my_charset_latin1);
- table->field[1]->store(db,(uint) strlen(db), my_charset_latin1);
- table->field[2]->store(combo.user.str,combo.user.length, my_charset_latin1);
+ table->field[0]->store(combo.host.str,combo.host.length, &my_charset_latin1);
+ table->field[1]->store(db,(uint) strlen(db), &my_charset_latin1);
+ table->field[2]->store(combo.user.str,combo.user.length, &my_charset_latin1);
table->file->index_init(0);
if (table->file->index_read(table->record[0],(byte*) table->field[0]->ptr,0,
HA_READ_KEY_EXACT))
@@ -1533,9 +1533,9 @@ static int replace_db_table(TABLE *table, const char *db,
}
old_row_exists = 0;
restore_record(table,2); // cp empty row from record[2]
- table->field[0]->store(combo.host.str,combo.host.length, my_charset_latin1);
- table->field[1]->store(db,(uint) strlen(db), my_charset_latin1);
- table->field[2]->store(combo.user.str,combo.user.length, my_charset_latin1);
+ table->field[0]->store(combo.host.str,combo.host.length, &my_charset_latin1);
+ table->field[1]->store(db,(uint) strlen(db), &my_charset_latin1);
+ table->field[2]->store(combo.user.str,combo.user.length, &my_charset_latin1);
}
else
{
@@ -1547,7 +1547,7 @@ static int replace_db_table(TABLE *table, const char *db,
for (i= 3, priv= 1; i < table->fields; i++, priv <<= 1)
{
if (priv & store_rights) // do it if priv is chosen
- table->field [i]->store(&what,1, my_charset_latin1);// set requested privileges
+ table->field [i]->store(&what,1, &my_charset_latin1);// set requested privileges
}
rights=get_access(table,3);
rights=fix_rights_for_db(rights);
@@ -1628,13 +1628,13 @@ public:
tname= strdup_root(&memex,t);
if (lower_case_table_names)
{
- my_casedn_str(my_charset_latin1, db);
- my_casedn_str(my_charset_latin1, tname);
+ my_casedn_str(&my_charset_latin1, db);
+ my_casedn_str(&my_charset_latin1, tname);
}
key_length =(uint) strlen(d)+(uint) strlen(u)+(uint) strlen(t)+3;
hash_key = (char*) alloc_root(&memex,key_length);
strmov(strmov(strmov(hash_key,user)+1,db)+1,tname);
- (void) hash_init(&hash_columns,my_charset_latin1,
+ (void) hash_init(&hash_columns,&my_charset_latin1,
0,0,0, (hash_get_key) get_key_column,0,
HASH_CASE_INSENSITIVE);
}
@@ -1657,8 +1657,8 @@ public:
}
if (lower_case_table_names)
{
- my_casedn_str(my_charset_latin1, db);
- my_casedn_str(my_charset_latin1, tname);
+ my_casedn_str(&my_charset_latin1, db);
+ my_casedn_str(&my_charset_latin1, tname);
}
key_length = ((uint) strlen(db) + (uint) strlen(user) +
(uint) strlen(tname) + 3);
@@ -1669,22 +1669,22 @@ public:
privs = fix_rights_for_table(privs);
cols = fix_rights_for_column(cols);
- (void) hash_init(&hash_columns,my_charset_latin1,
+ (void) hash_init(&hash_columns,&my_charset_latin1,
0,0,0, (hash_get_key) get_key_column,0,
HASH_CASE_INSENSITIVE);
if (cols)
{
int key_len;
- col_privs->field[0]->store(host,(uint) strlen(host), my_charset_latin1);
- col_privs->field[1]->store(db,(uint) strlen(db), my_charset_latin1);
- col_privs->field[2]->store(user,(uint) strlen(user), my_charset_latin1);
- col_privs->field[3]->store(tname,(uint) strlen(tname), my_charset_latin1);
+ col_privs->field[0]->store(host,(uint) strlen(host), &my_charset_latin1);
+ col_privs->field[1]->store(db,(uint) strlen(db), &my_charset_latin1);
+ col_privs->field[2]->store(user,(uint) strlen(user), &my_charset_latin1);
+ col_privs->field[3]->store(tname,(uint) strlen(tname), &my_charset_latin1);
key_len=(col_privs->field[0]->pack_length()+
col_privs->field[1]->pack_length()+
col_privs->field[2]->pack_length()+
col_privs->field[3]->pack_length());
key_copy(key,col_privs,0,key_len);
- col_privs->field[4]->store("",0, my_charset_latin1);
+ col_privs->field[4]->store("",0, &my_charset_latin1);
col_privs->file->index_init(0);
if (col_privs->file->index_read(col_privs->record[0],
(byte*) col_privs->field[0]->ptr,
@@ -1752,15 +1752,15 @@ static GRANT_TABLE *table_hash_search(const char *host,const char* ip,
if (exact)
{
if ((host &&
- !my_strcasecmp(my_charset_latin1, host, grant_table->host)) ||
+ !my_strcasecmp(&my_charset_latin1, host, grant_table->host)) ||
(ip && !strcmp(ip,grant_table->host)))
return grant_table;
}
else
{
- if ((host && !wild_case_compare(my_charset_latin1,
+ if ((host && !wild_case_compare(&my_charset_latin1,
host,grant_table->host)) ||
- (ip && !wild_case_compare(my_charset_latin1,
+ (ip && !wild_case_compare(&my_charset_latin1,
ip,grant_table->host)))
found=grant_table; // Host ok
}
@@ -1788,10 +1788,10 @@ static int replace_column_table(GRANT_TABLE *g_t,
byte key[MAX_KEY_LENGTH];
DBUG_ENTER("replace_column_table");
- table->field[0]->store(combo.host.str,combo.host.length, my_charset_latin1);
- table->field[1]->store(db,(uint) strlen(db), my_charset_latin1);
- table->field[2]->store(combo.user.str,combo.user.length, my_charset_latin1);
- table->field[3]->store(table_name,(uint) strlen(table_name), my_charset_latin1);
+ table->field[0]->store(combo.host.str,combo.host.length, &my_charset_latin1);
+ table->field[1]->store(db,(uint) strlen(db), &my_charset_latin1);
+ table->field[2]->store(combo.user.str,combo.user.length, &my_charset_latin1);
+ table->field[3]->store(table_name,(uint) strlen(table_name), &my_charset_latin1);
key_length=(table->field[0]->pack_length()+ table->field[1]->pack_length()+
table->field[2]->pack_length()+ table->field[3]->pack_length());
key_copy(key,table,0,key_length);
@@ -1808,7 +1808,7 @@ static int replace_column_table(GRANT_TABLE *g_t,
ulong privileges = xx->rights;
bool old_row_exists=0;
key_restore(table,key,0,key_length);
- table->field[4]->store(xx->column.ptr(),xx->column.length(),my_charset_latin1);
+ table->field[4]->store(xx->column.ptr(),xx->column.length(),&my_charset_latin1);
if (table->file->index_read(table->record[0],(byte*) table->field[0]->ptr,
0, HA_READ_KEY_EXACT))
@@ -1824,7 +1824,7 @@ static int replace_column_table(GRANT_TABLE *g_t,
old_row_exists = 0;
restore_record(table,2); // Get empty record
key_restore(table,key,0,key_length);
- table->field[4]->store(xx->column.ptr(),xx->column.length(), my_charset_latin1);
+ table->field[4]->store(xx->column.ptr(),xx->column.length(), &my_charset_latin1);
}
else
{
@@ -1896,7 +1896,7 @@ static int replace_column_table(GRANT_TABLE *g_t,
{
GRANT_COLUMN *grant_column = NULL;
char colum_name_buf[HOSTNAME_LENGTH+1];
- String column_name(colum_name_buf,sizeof(colum_name_buf),my_charset_latin1);
+ String column_name(colum_name_buf,sizeof(colum_name_buf),&my_charset_latin1);
privileges&= ~rights;
table->field[6]->store((longlong)
@@ -1966,10 +1966,10 @@ static int replace_table_table(THD *thd, GRANT_TABLE *grant_table,
}
restore_record(table,2); // Get empty record
- table->field[0]->store(combo.host.str,combo.host.length, my_charset_latin1);
- table->field[1]->store(db,(uint) strlen(db), my_charset_latin1);
- table->field[2]->store(combo.user.str,combo.user.length, my_charset_latin1);
- table->field[3]->store(table_name,(uint) strlen(table_name), my_charset_latin1);
+ table->field[0]->store(combo.host.str,combo.host.length, &my_charset_latin1);
+ table->field[1]->store(db,(uint) strlen(db), &my_charset_latin1);
+ table->field[2]->store(combo.user.str,combo.user.length, &my_charset_latin1);
+ table->field[3]->store(table_name,(uint) strlen(table_name), &my_charset_latin1);
store_record(table,1); // store at pos 1
if (table->file->index_read_idx(table->record[0],0,
@@ -2014,7 +2014,7 @@ static int replace_table_table(THD *thd, GRANT_TABLE *grant_table,
}
}
- table->field[4]->store(grantor,(uint) strlen(grantor), my_charset_latin1);
+ table->field[4]->store(grantor,(uint) strlen(grantor), &my_charset_latin1);
table->field[6]->store((longlong) store_table_rights);
table->field[7]->store((longlong) store_col_rights);
rights=fix_rights_for_table(store_table_rights);
@@ -2274,7 +2274,7 @@ int mysql_grant (THD *thd, const char *db, List <LEX_USER> &list,
if (lower_case_table_names && db)
{
strmov(tmp_db,db);
- my_casedn_str(my_charset_latin1, tmp_db);
+ my_casedn_str(&my_charset_latin1, tmp_db);
db=tmp_db;
}
@@ -2363,7 +2363,7 @@ my_bool grant_init(THD *org_thd)
DBUG_ENTER("grant_init");
grant_option = FALSE;
- (void) hash_init(&column_priv_hash,my_charset_latin1,
+ (void) hash_init(&column_priv_hash,&my_charset_latin1,
0,0,0, (hash_get_key) get_grant_table,
(hash_free_key) free_grant_table,0);
init_sql_alloc(&memex,1024,0);
@@ -2696,9 +2696,9 @@ bool check_grant_db(THD *thd,const char *db)
idx);
if (len < grant_table->key_length &&
!memcmp(grant_table->hash_key,helping,len) &&
- (thd->host && !wild_case_compare(my_charset_latin1,
+ (thd->host && !wild_case_compare(&my_charset_latin1,
thd->host,grant_table->host) ||
- (thd->ip && !wild_case_compare(my_charset_latin1,
+ (thd->ip && !wild_case_compare(&my_charset_latin1,
thd->ip,grant_table->host))))
{
error=0; // Found match
@@ -2825,7 +2825,7 @@ int mysql_show_grants(THD *thd,LEX_USER *lex_user)
if (!(host=acl_user->host.hostname))
host="%";
if (!strcmp(lex_user->user.str,user) &&
- !my_strcasecmp(my_charset_latin1, lex_user->host.str, host))
+ !my_strcasecmp(&my_charset_latin1, lex_user->host.str, host))
break;
}
if (counter == acl_users.elements)
@@ -2835,7 +2835,7 @@ int mysql_show_grants(THD *thd,LEX_USER *lex_user)
DBUG_RETURN(-1);
}
- Item_string *field=new Item_string("",0,my_charset_latin1);
+ Item_string *field=new Item_string("",0,&my_charset_latin1);
List<Item> field_list;
field->name=buff;
field->max_length=1024;
@@ -2853,7 +2853,7 @@ int mysql_show_grants(THD *thd,LEX_USER *lex_user)
acl_user->ssl_type != SSL_TYPE_NONE)
{
want_access=acl_user->access;
- String global(buff,sizeof(buff),my_charset_latin1);
+ String global(buff,sizeof(buff),&my_charset_latin1);
global.length(0);
global.append("GRANT ",6);
@@ -2972,12 +2972,12 @@ int mysql_show_grants(THD *thd,LEX_USER *lex_user)
host="";
if (!strcmp(lex_user->user.str,user) &&
- !my_strcasecmp(my_charset_latin1, lex_user->host.str, host))
+ !my_strcasecmp(&my_charset_latin1, lex_user->host.str, host))
{
want_access=acl_db->access;
if (want_access)
{
- String db(buff,sizeof(buff),my_charset_latin1);
+ String db(buff,sizeof(buff),&my_charset_latin1);
db.length(0);
db.append("GRANT ",6);
@@ -3031,12 +3031,12 @@ int mysql_show_grants(THD *thd,LEX_USER *lex_user)
host="";
if (!strcmp(lex_user->user.str,user) &&
- !my_strcasecmp(my_charset_latin1, lex_user->host.str, host))
+ !my_strcasecmp(&my_charset_latin1, lex_user->host.str, host))
{
want_access=grant_table->privs;
if ((want_access | grant_table->cols) != 0)
{
- String global(buff,sizeof(buff),my_charset_latin1);
+ String global(buff,sizeof(buff),&my_charset_latin1);
global.length(0);
global.append("GRANT ",6);
diff --git a/sql/sql_cache.cc b/sql/sql_cache.cc
index df06bcfd5c0..9a4ce1b81a4 100644
--- a/sql/sql_cache.cc
+++ b/sql/sql_cache.cc
@@ -2476,7 +2476,9 @@ TABLE_COUNTER_TYPE Query_cache::is_cacheable(THD *thd, uint32 query_len,
(tables_used->db_length == 5 &&
#ifdef FN_NO_CASE_SENCE
// TODO: latin1 charset should be replaced with system charset
- my_strncasecmp(my_charset_latin1,tables_used->db,"mysql",5) == 0
+ my_strncasecmp(&my_charset_latin1,
+ tables_used->db,
+ "mysql",5) == 0
#else
tables_used->db[0]=='m' &&
tables_used->db[1]=='y' &&
diff --git a/sql/sql_class.cc b/sql/sql_class.cc
index 0b6da3d9bcd..b3b69c0a3a6 100644
--- a/sql/sql_class.cc
+++ b/sql/sql_class.cc
@@ -469,11 +469,13 @@ int THD::send_explain_fields(select_result *result)
void THD::close_active_vio()
{
safe_mutex_assert_owner(&LOCK_delete);
+#ifndef EMBEDDED_LIBRARY
if (active_vio)
{
vio_close(active_vio);
active_vio = 0;
}
+#endif
}
#endif
@@ -527,7 +529,7 @@ bool select_send::send_data(List<Item> &items)
List_iterator_fast<Item> li(items);
Protocol *protocol= thd->protocol;
char buff[MAX_FIELD_WIDTH];
- String buffer(buff, sizeof(buff), my_charset_bin);
+ String buffer(buff, sizeof(buff), &my_charset_bin);
DBUG_ENTER("send_data");
protocol->prepare_for_resend();
@@ -650,7 +652,7 @@ bool select_export::send_data(List<Item> &items)
DBUG_ENTER("send_data");
char buff[MAX_FIELD_WIDTH],null_buff[2],space[MAX_FIELD_WIDTH];
bool space_inited=0;
- String tmp(buff,sizeof(buff),my_charset_bin),*res;
+ String tmp(buff,sizeof(buff),&my_charset_bin),*res;
tmp.length(0);
if (unit->offset_limit_cnt)
@@ -858,7 +860,7 @@ bool select_dump::send_data(List<Item> &items)
{
List_iterator_fast<Item> li(items);
char buff[MAX_FIELD_WIDTH];
- String tmp(buff,sizeof(buff),my_charset_bin),*res;
+ String tmp(buff,sizeof(buff),&my_charset_bin),*res;
tmp.length(0);
Item *item;
DBUG_ENTER("send_data");
diff --git a/sql/sql_help.cc b/sql/sql_help.cc
index 2bac815d12a..e4c44428242 100644
--- a/sql/sql_help.cc
+++ b/sql/sql_help.cc
@@ -22,7 +22,7 @@
** Get help on string
***************************************************************************/
-#define help_charset my_charset_latin1
+#define help_charset &my_charset_latin1
MI_INFO *open_help_file(THD *thd, const char *name)
{
diff --git a/sql/sql_parse.cc b/sql/sql_parse.cc
index ac79f4ebcf6..9f77ae5f1f5 100644
--- a/sql/sql_parse.cc
+++ b/sql/sql_parse.cc
@@ -2734,7 +2734,7 @@ mysql_execute_command(THD *thd)
if (user->password.str &&
(strcmp(thd->user,user->user.str) ||
user->host.str &&
- my_strcasecmp(my_charset_latin1,
+ my_strcasecmp(&my_charset_latin1,
user->host.str, thd->host_or_ip)))
{
if (check_access(thd, UPDATE_ACL, "mysql",0,1))
@@ -3415,7 +3415,7 @@ bool add_field_to_list(THD *thd, char *field_name, enum_field_types type,
/* Convert long CHAR() and VARCHAR columns to TEXT or BLOB */
new_field->sql_type= FIELD_TYPE_BLOB;
sprintf(warn_buff, ER(ER_AUTO_CONVERT), field_name, "CHAR",
- (cs == my_charset_bin) ? "BLOB" : "TEXT");
+ (cs == &my_charset_bin) ? "BLOB" : "TEXT");
push_warning(thd, MYSQL_ERROR::WARN_LEVEL_WARN, ER_AUTO_CONVERT,
warn_buff);
/* fall through */
diff --git a/sql/sql_select.cc b/sql/sql_select.cc
index 4de4b2299f2..5696f59a3df 100644
--- a/sql/sql_select.cc
+++ b/sql/sql_select.cc
@@ -732,7 +732,9 @@ JOIN::exec()
result->send_fields(fields_list,1);
if (!having || having->val_int())
{
- if (do_send_rows && result->send_data(fields_list))
+ if (do_send_rows && (procedure ? (procedure->send_row(fields_list) ||
+ procedure->end_of_records())
+ : result->send_data(fields_list)))
error= 1;
else
{
@@ -3817,7 +3819,7 @@ Field *create_tmp_field(THD *thd, TABLE *table,Item *item, Item::Type type,
case Item_sum::AVG_FUNC: /* Place for sum & count */
if (group)
return new Field_string(sizeof(double)+sizeof(longlong),
- maybe_null, item->name,table,my_charset_bin);
+ maybe_null, item->name,table,&my_charset_bin);
else
return new Field_double(item_sum->max_length,maybe_null,
item->name, table, item_sum->decimals);
@@ -3825,7 +3827,7 @@ Field *create_tmp_field(THD *thd, TABLE *table,Item *item, Item::Type type,
case Item_sum::STD_FUNC:
if (group)
return new Field_string(sizeof(double)*2+sizeof(longlong),
- maybe_null, item->name,table,my_charset_bin);
+ maybe_null, item->name,table,&my_charset_bin);
else
return new Field_double(item_sum->max_length, maybe_null,
item->name,table,item_sum->decimals);
@@ -4358,7 +4360,7 @@ create_tmp_table(THD *thd,TMP_TABLE_PARAM *param,List<Item> &fields,
(uchar*) 0,
(uint) 0,
Field::NONE,
- NullS, table, my_charset_bin);
+ NullS, table, &my_charset_bin);
key_part_info->key_type=FIELDFLAG_BINARY;
key_part_info->type= HA_KEYTYPE_BINARY;
key_part_info++;
diff --git a/sql/sql_sort.h b/sql/sql_sort.h
index 62c5f1cb164..14463a67a28 100644
--- a/sql/sql_sort.h
+++ b/sql/sql_sort.h
@@ -38,9 +38,7 @@ typedef struct st_sort_param {
SORT_FIELD *end;
uchar *unique_buff;
bool not_killable;
-#ifdef USE_STRCOLL
char* tmp_buffer;
-#endif
} SORTPARAM;
diff --git a/sql/sql_string.cc b/sql/sql_string.cc
index 654076c3f41..8c12261f949 100644
--- a/sql/sql_string.cc
+++ b/sql/sql_string.cc
@@ -124,14 +124,14 @@ bool String::set(double num,uint decimals, CHARSET_INFO *cs)
if (decimals >= NOT_FIXED_DEC)
{
sprintf(buff,"%.14g",num); // Enough for a DATETIME
- return copy(buff, (uint32) strlen(buff), my_charset_latin1, cs);
+ return copy(buff, (uint32) strlen(buff), &my_charset_latin1, cs);
}
#ifdef HAVE_FCONVERT
int decpt,sign;
char *pos,*to;
VOID(fconvert(num,(int) decimals,&decpt,&sign,buff+1));
- if (!my_isdigit(my_charset_latin1, buff[1]))
+ if (!my_isdigit(&my_charset_latin1, buff[1]))
{ // Nan or Inf
pos=buff+1;
if (sign)
@@ -139,7 +139,7 @@ bool String::set(double num,uint decimals, CHARSET_INFO *cs)
buff[0]='-';
pos=buff;
}
- return copy(pos,(uint32) strlen(pos), my_charset_latin1, cs);
+ return copy(pos,(uint32) strlen(pos), &my_charset_latin1, cs);
}
if (alloc((uint32) ((uint32) decpt+3+decimals)))
return TRUE;
@@ -189,7 +189,7 @@ end:
#else
sprintf(buff,"%.*f",(int) decimals,num);
#endif
- return copy(buff,(uint32) strlen(buff), my_charset_latin1, cs);
+ return copy(buff,(uint32) strlen(buff), &my_charset_latin1, cs);
#endif
}
@@ -267,7 +267,7 @@ bool String::set_latin1(const char *str, uint32 arg_length)
set(str, arg_length, str_charset);
return 0;
}
- return copy(str, arg_length, my_charset_latin1, str_charset);
+ return copy(str, arg_length, &my_charset_latin1, str_charset);
}
@@ -322,7 +322,7 @@ bool String::append(const char *s,uint32 arg_length)
if (realloc(str_length+ add_length))
return TRUE;
str_length+= copy_and_convert(Ptr+str_length, add_length, str_charset,
- s, arg_length, my_charset_latin1);
+ s, arg_length, &my_charset_latin1);
return FALSE;
}
if (realloc(str_length+arg_length))
@@ -577,7 +577,6 @@ int sortcmp(const String *x,const String *y)
const char *t= y->ptr();
uint32 x_len=x->length(),y_len=y->length(),len=min(x_len,y_len);
-#ifdef USE_STRCOLL
if (use_strnxfrm(x->str_charset))
{
#ifndef CMP_ENDSPACE
@@ -591,7 +590,6 @@ int sortcmp(const String *x,const String *y)
}
else
{
-#endif /* USE_STRCOLL */
x_len-=len; // For easy end space test
y_len-=len;
if (x->str_charset->sort_order)
@@ -634,9 +632,7 @@ int sortcmp(const String *x,const String *y)
#else
return (int) (x_len-y_len);
#endif /* CMP_ENDSPACE */
-#ifdef USE_STRCOLL
}
-#endif
}
diff --git a/sql/sql_update.cc b/sql/sql_update.cc
index 3aae6f6f411..3d94c39ff7b 100644
--- a/sql/sql_update.cc
+++ b/sql/sql_update.cc
@@ -573,7 +573,7 @@ multi_update::initialize_tables(JOIN *join)
/* ok to be on stack as this is not referenced outside of this func */
Field_string offset(table->file->ref_length, 0, "offset",
- table, my_charset_bin);
+ table, &my_charset_bin);
if (temp_fields.push_front(new Item_field(((Field *) &offset))))
DBUG_RETURN(1);
diff --git a/sql/sql_yacc.yy b/sql/sql_yacc.yy
index d3092d8ca62..899061f2528 100644
--- a/sql/sql_yacc.yy
+++ b/sql/sql_yacc.yy
@@ -1119,12 +1119,12 @@ type:
| char opt_binary { Lex->length=(char*) "1";
$$=FIELD_TYPE_STRING; }
| BINARY '(' NUM ')' { Lex->length=$3.str;
- Lex->charset=my_charset_bin;
+ Lex->charset=&my_charset_bin;
$$=FIELD_TYPE_STRING; }
| varchar '(' NUM ')' opt_binary { Lex->length=$3.str;
$$=FIELD_TYPE_VAR_STRING; }
| VARBINARY '(' NUM ')' { Lex->length=$3.str;
- Lex->charset=my_charset_bin;
+ Lex->charset=&my_charset_bin;
$$=FIELD_TYPE_VAR_STRING; }
| YEAR_SYM opt_len field_options { $$=FIELD_TYPE_YEAR; }
| DATE_SYM { $$=FIELD_TYPE_DATE; }
@@ -1139,17 +1139,17 @@ type:
| TIMESTAMP '(' NUM ')' { Lex->length=$3.str;
$$=FIELD_TYPE_TIMESTAMP; }
| DATETIME { $$=FIELD_TYPE_DATETIME; }
- | TINYBLOB { Lex->charset=my_charset_bin;
+ | TINYBLOB { Lex->charset=&my_charset_bin;
$$=FIELD_TYPE_TINY_BLOB; }
- | BLOB_SYM opt_len { Lex->charset=my_charset_bin;
+ | BLOB_SYM opt_len { Lex->charset=&my_charset_bin;
$$=FIELD_TYPE_BLOB; }
- | GEOMETRY_SYM { Lex->charset=my_charset_bin;
+ | GEOMETRY_SYM { Lex->charset=&my_charset_bin;
$$=FIELD_TYPE_GEOMETRY; }
- | MEDIUMBLOB { Lex->charset=my_charset_bin;
+ | MEDIUMBLOB { Lex->charset=&my_charset_bin;
$$=FIELD_TYPE_MEDIUM_BLOB; }
- | LONGBLOB { Lex->charset=my_charset_bin;
+ | LONGBLOB { Lex->charset=&my_charset_bin;
$$=FIELD_TYPE_LONG_BLOB; }
- | LONG_SYM VARBINARY { Lex->charset=my_charset_bin;
+ | LONG_SYM VARBINARY { Lex->charset=&my_charset_bin;
$$=FIELD_TYPE_MEDIUM_BLOB; }
| LONG_SYM varchar opt_binary { $$=FIELD_TYPE_MEDIUM_BLOB; }
| TINYTEXT opt_binary { $$=FIELD_TYPE_TINY_BLOB; }
@@ -1297,9 +1297,9 @@ opt_default:
opt_binary:
/* empty */ { Lex->charset=NULL; }
- | ASCII_SYM { Lex->charset=my_charset_latin1; }
- | BYTE_SYM { Lex->charset=my_charset_bin; }
- | BINARY { Lex->charset=my_charset_bin; }
+ | ASCII_SYM { Lex->charset=&my_charset_latin1; }
+ | BYTE_SYM { Lex->charset=&my_charset_bin; }
+ | BINARY { Lex->charset=&my_charset_bin; }
| UNICODE_SYM
{
if (!(Lex->charset=get_charset_by_name("ucs2",MYF(0))))
@@ -1863,8 +1863,10 @@ optional_braces:
| '(' ')' {};
/* all possible expressions */
-expr: expr_expr { $$= $1; }
- | simple_expr { $$= $1; };
+expr:
+ expr_expr { $$= $1; }
+ | simple_expr { $$= $1; }
+ ;
comp_op: EQ { $$ = &comp_eq_creator; }
| GE { $$ = &comp_ge_creator; }
@@ -1880,7 +1882,7 @@ all_or_any: ALL { $$ = 1; }
/* expressions that begin with 'expr' */
expr_expr:
- expr IN_SYM '(' expr_list ')'
+ expr IN_SYM '(' expr_list ')'
{ $$= new Item_func_in($1,*$4); }
| expr NOT IN_SYM '(' expr_list ')'
{ $$= new Item_func_not(new Item_func_in($1,*$5)); }
@@ -2085,7 +2087,7 @@ simple_expr:
{ Select->add_ftfunc_to_list((Item_func_match *)
($$=new Item_func_match_bool(*$2,$5))); }
| ASCII_SYM '(' expr ')' { $$= new Item_func_ascii($3); }
- | BINARY expr %prec NEG { $$= new Item_func_set_collation($2,my_charset_bin); }
+ | BINARY expr %prec NEG { $$= new Item_func_set_collation($2,&my_charset_bin); }
| CAST_SYM '(' expr AS cast_type ')' { $$= create_func_cast($3, $5); }
| CASE_SYM opt_expr WHEN_SYM when_list opt_else END
{ $$= new Item_func_case(* $4, $2, $5 ); }
@@ -2094,6 +2096,8 @@ simple_expr:
{ $$= new Item_func_conv_charset($3,$5); }
| CONVERT_SYM '(' expr ',' expr ',' expr ')'
{ $$= new Item_func_conv_charset3($3,$7,$5); }
+ | DEFAULT '(' simple_ident ')'
+ { $$= new Item_default_value($3); }
| FUNC_ARG0 '(' ')'
{ $$= ((Item*(*)(void))($1.symbol->create_func))();}
| FUNC_ARG1 '(' expr ')'
@@ -3192,7 +3196,7 @@ values:
expr_or_default:
expr { $$= $1;}
- | DEFAULT {$$= new Item_default(); }
+ | DEFAULT {$$= new Item_default_value(); }
;
opt_insert_update:
@@ -3230,12 +3234,12 @@ update:
;
update_list:
- update_list ',' simple_ident equal expr
+ update_list ',' simple_ident equal expr_or_default
{
if (add_item_to_list(YYTHD, $3) || add_value_to_list(YYTHD, $5))
YYABORT;
}
- | simple_ident equal expr
+ | simple_ident equal expr_or_default
{
if (add_item_to_list(YYTHD, $1) || add_value_to_list(YYTHD, $3))
YYABORT;
diff --git a/sql/table.cc b/sql/table.cc
index 72f0143115f..57a0831bf2e 100644
--- a/sql/table.cc
+++ b/sql/table.cc
@@ -260,7 +260,7 @@ int openfrm(const char *name, const char *alias, uint db_stat, uint prgflag,
if (db_stat & HA_READ_ONLY)
outparam->record[1]=outparam->record[0]; /* purecov: inspected */
}
-
+
VOID(my_seek(file,pos,MY_SEEK_SET,MYF(0)));
if (my_read(file,(byte*) head,288,MYF(MY_NABP))) goto err_not_open;
if (crypted)
diff --git a/sql/table.h b/sql/table.h
index 6291b250787..ceffdcc9dc7 100644
--- a/sql/table.h
+++ b/sql/table.h
@@ -137,6 +137,7 @@ struct st_table {
uint derived_select_number;
THD *in_use; /* Which thread uses this */
struct st_table *next,*prev;
+ byte *default_values() { return record[2]; }
};
diff --git a/sql/time.cc b/sql/time.cc
index 76e67115a92..96f628dbb14 100644
--- a/sql/time.cc
+++ b/sql/time.cc
@@ -452,7 +452,7 @@ str_to_TIME(const char *str, uint length, TIME *l_time,bool fuzzy_date)
DBUG_PRINT("enter",("str: %.*s",length,str));
// Skip garbage
- for (; str != end && !my_isdigit(my_charset_latin1, *str) ; str++) ;
+ for (; str != end && !my_isdigit(&my_charset_latin1, *str) ; str++) ;
if (str == end)
DBUG_RETURN(TIMESTAMP_NONE);
/*
@@ -460,15 +460,15 @@ str_to_TIME(const char *str, uint length, TIME *l_time,bool fuzzy_date)
If length= 8 or >= 14 then year is of format YYYY.
(YYYY-MM-DD, YYYYMMDD, YYYYYMMDDHHMMSS)
*/
- for (pos=str; pos != end && my_isdigit(my_charset_latin1,*pos) ; pos++) ;
+ for (pos=str; pos != end && my_isdigit(&my_charset_latin1,*pos) ; pos++) ;
digits= (uint) (pos-str);
year_length= (digits == 4 || digits == 8 || digits >= 14) ? 4 : 2;
field_length=year_length-1;
not_zero_date= 0;
- for (i=0 ; i < 6 && str != end && my_isdigit(my_charset_latin1,*str) ; i++)
+ for (i=0 ; i < 6 && str != end && my_isdigit(&my_charset_latin1,*str) ; i++)
{
uint tmp_value=(uint) (uchar) (*str++ - '0');
- while (str != end && my_isdigit(my_charset_latin1,str[0]) &&
+ while (str != end && my_isdigit(&my_charset_latin1,str[0]) &&
field_length--)
{
tmp_value=tmp_value*10 + (uint) (uchar) (*str - '0');
@@ -481,11 +481,11 @@ str_to_TIME(const char *str, uint length, TIME *l_time,bool fuzzy_date)
else if ( i != 5 ) // Skip inter-field delimiters
{
while (str != end &&
- (my_ispunct(my_charset_latin1,*str) ||
- my_isspace(my_charset_latin1,*str)))
+ (my_ispunct(&my_charset_latin1,*str) ||
+ my_isspace(&my_charset_latin1,*str)))
{
// Only allow space between days and hours
- if (my_isspace(my_charset_latin1,*str) && i != 2)
+ if (my_isspace(&my_charset_latin1,*str) && i != 2)
DBUG_RETURN(TIMESTAMP_NONE);
str++;
}
@@ -494,12 +494,12 @@ str_to_TIME(const char *str, uint length, TIME *l_time,bool fuzzy_date)
}
/* Handle second fractions */
if (i == 6 && (uint) (end-str) >= 2 && *str == '.' &&
- my_isdigit(my_charset_latin1,str[1]))
+ my_isdigit(&my_charset_latin1,str[1]))
{
str++;
uint tmp_value=(uint) (uchar) (*str - '0');
field_length=3;
- while (str++ != end && my_isdigit(my_charset_latin1,str[0]) &&
+ while (str++ != end && my_isdigit(&my_charset_latin1,str[0]) &&
field_length--)
tmp_value=tmp_value*10 + (uint) (uchar) (*str - '0');
date[6]=tmp_value;
@@ -522,7 +522,7 @@ str_to_TIME(const char *str, uint length, TIME *l_time,bool fuzzy_date)
{
for (; str != end ; str++)
{
- if (!my_isspace(my_charset_latin1, *str))
+ if (!my_isspace(&my_charset_latin1, *str))
{
not_zero_date= 1; // Give warning
break;
@@ -537,7 +537,7 @@ str_to_TIME(const char *str, uint length, TIME *l_time,bool fuzzy_date)
{
for (; str != end ; str++)
{
- if (!my_isspace(my_charset_latin1,*str))
+ if (!my_isspace(&my_charset_latin1,*str))
{
current_thd->cuted_fields++;
break;
@@ -599,7 +599,7 @@ bool str_to_time(const char *str,uint length,TIME *l_time)
l_time->neg=0;
for (; str != end &&
- !my_isdigit(my_charset_latin1,*str) && *str != '-' ; str++)
+ !my_isdigit(&my_charset_latin1,*str) && *str != '-' ; str++)
length--;
if (str != end && *str == '-')
{
@@ -618,7 +618,7 @@ bool str_to_time(const char *str,uint length,TIME *l_time)
}
/* Not a timestamp. Try to get this as a DAYS_TO_SECOND string */
- for (value=0; str != end && my_isdigit(my_charset_latin1,*str) ; str++)
+ for (value=0; str != end && my_isdigit(&my_charset_latin1,*str) ; str++)
value=value*10L + (long) (*str - '0');
if (*str == ' ')
@@ -630,7 +630,7 @@ bool str_to_time(const char *str,uint length,TIME *l_time)
LINT_INIT(state);
found_days=found_hours=0;
if ((uint) (end-str) > 1 && (*str == ' ' &&
- my_isdigit(my_charset_latin1,str[1])))
+ my_isdigit(&my_charset_latin1,str[1])))
{ // days !
date[0]=value;
state=1; // Assume next is hours
@@ -638,7 +638,7 @@ bool str_to_time(const char *str,uint length,TIME *l_time)
str++; // Skip space;
}
else if ((end-str) > 1 && *str == ':' &&
- my_isdigit(my_charset_latin1,str[1]))
+ my_isdigit(&my_charset_latin1,str[1]))
{
date[0]=0; // Assume we found hours
date[1]=value;
@@ -660,11 +660,11 @@ bool str_to_time(const char *str,uint length,TIME *l_time)
/* Read hours, minutes and seconds */
for (;;)
{
- for (value=0; str != end && my_isdigit(my_charset_latin1,*str) ; str++)
+ for (value=0; str != end && my_isdigit(&my_charset_latin1,*str) ; str++)
value=value*10L + (long) (*str - '0');
date[state++]=value;
if (state == 4 || (end-str) < 2 || *str != ':' ||
- !my_isdigit(my_charset_latin1,str[1]))
+ !my_isdigit(&my_charset_latin1,str[1]))
break;
str++; // Skip ':'
}
@@ -684,12 +684,12 @@ bool str_to_time(const char *str,uint length,TIME *l_time)
fractional:
/* Get fractional second part */
- if ((end-str) >= 2 && *str == '.' && my_isdigit(my_charset_latin1,str[1]))
+ if ((end-str) >= 2 && *str == '.' && my_isdigit(&my_charset_latin1,str[1]))
{
uint field_length=3;
str++; value=(uint) (uchar) (*str - '0');
while (++str != end &&
- my_isdigit(my_charset_latin1,str[0]) &&
+ my_isdigit(&my_charset_latin1,str[0]) &&
field_length--)
value=value*10 + (uint) (uchar) (*str - '0');
date[4]=value;
@@ -715,7 +715,7 @@ bool str_to_time(const char *str,uint length,TIME *l_time)
{
do
{
- if (!my_isspace(my_charset_latin1,*str))
+ if (!my_isspace(&my_charset_latin1,*str))
{
current_thd->cuted_fields++;
break;
diff --git a/strings/Makefile.am b/strings/Makefile.am
index c78be3d9cb4..ee1ce59d0d1 100644
--- a/strings/Makefile.am
+++ b/strings/Makefile.am
@@ -22,19 +22,19 @@ pkglib_LIBRARIES = libmystrings.a
# Exact one of ASSEMBLER_X
if ASSEMBLER_x86
ASRCS = strings-x86.s longlong2str-x86.s
-CSRCS = bfill.c bmove.c bmove512.c bchange.c strxnmov.c int2str.c str2int.c r_strinstr.c atof.c bcmp.c strtol.c strtoul.c strtoll.c strtoull.c llstr.c strnlen.c ctype.c ctype-simple.c ctype-mb.c ctype-big5.c ctype-czech.c ctype-euc_kr.c ctype-gb2312.c ctype-gbk.c ctype-latin1_de.c ctype-sjis.c ctype-tis620.c ctype-ujis.c ctype-utf8.c ctype-win1250ch.c ctype-bin.c my_vsnprintf.c xml.c
+CSRCS = bfill.c bmove.c bmove512.c bchange.c strxnmov.c int2str.c str2int.c r_strinstr.c atof.c bcmp.c strtol.c strtoul.c strtoll.c strtoull.c llstr.c strnlen.c ctype.c ctype-simple.c ctype-mb.c ctype-big5.c ctype-czech.c ctype-euc_kr.c ctype-gb2312.c ctype-gbk.c ctype-latin1_de.c ctype-sjis.c ctype-tis620.c ctype-ujis.c ctype-utf8.c ctype-win1250ch.c ctype-bin.c ctype-latin1.c my_vsnprintf.c xml.c ctype-extra.c
else
if ASSEMBLER_sparc32
# These file MUST all be on the same line!! Otherwise automake
# generats a very broken makefile
ASRCS = bmove_upp-sparc.s strappend-sparc.s strend-sparc.s strinstr-sparc.s strmake-sparc.s strmov-sparc.s strnmov-sparc.s strstr-sparc.s
-CSRCS = strcont.c strfill.c strcend.c is_prefix.c longlong2str.c bfill.c bmove.c bmove512.c bchange.c strxnmov.c int2str.c str2int.c r_strinstr.c atof.c bcmp.c strtol.c strtoul.c strtoll.c strtoull.c llstr.c strnlen.c strxmov.c ctype.c ctype-simple.c ctype-mb.c ctype-big5.c ctype-czech.c ctype-euc_kr.c ctype-gb2312.c ctype-gbk.c ctype-latin1_de.c ctype-sjis.c ctype-tis620.c ctype-ujis.c ctype-utf8.c ctype-win1250ch.c ctype-bin.c my_vsnprintf.c xml.c
+CSRCS = strcont.c strfill.c strcend.c is_prefix.c longlong2str.c bfill.c bmove.c bmove512.c bchange.c strxnmov.c int2str.c str2int.c r_strinstr.c atof.c bcmp.c strtol.c strtoul.c strtoll.c strtoull.c llstr.c strnlen.c strxmov.c ctype.c ctype-simple.c ctype-mb.c ctype-big5.c ctype-czech.c ctype-euc_kr.c ctype-gb2312.c ctype-gbk.c ctype-latin1_de.c ctype-sjis.c ctype-tis620.c ctype-ujis.c ctype-utf8.c ctype-win1250ch.c ctype-bin.c ctype-latin1.c my_vsnprintf.c xml.c ctype-extra.c
else
#no assembler
ASRCS =
# These file MUST all be on the same line!! Otherwise automake
# generats a very broken makefile
-CSRCS = strxmov.c bmove_upp.c strappend.c strcont.c strend.c strfill.c strcend.c is_prefix.c strstr.c strinstr.c strmake.c strnmov.c strmov.c longlong2str.c bfill.c bmove.c bmove512.c bchange.c strxnmov.c int2str.c str2int.c r_strinstr.c atof.c bcmp.c strtol.c strtoul.c strtoll.c strtoull.c llstr.c strnlen.c ctype.c ctype-simple.c ctype-mb.c ctype-big5.c ctype-czech.c ctype-euc_kr.c ctype-gb2312.c ctype-gbk.c ctype-latin1_de.c ctype-sjis.c ctype-tis620.c ctype-ujis.c ctype-utf8.c ctype-win1250ch.c ctype-bin.c my_vsnprintf.c xml.c
+CSRCS = strxmov.c bmove_upp.c strappend.c strcont.c strend.c strfill.c strcend.c is_prefix.c strstr.c strinstr.c strmake.c strnmov.c strmov.c longlong2str.c bfill.c bmove.c bmove512.c bchange.c strxnmov.c int2str.c str2int.c r_strinstr.c atof.c bcmp.c strtol.c strtoul.c strtoll.c strtoull.c llstr.c strnlen.c ctype.c ctype-simple.c ctype-mb.c ctype-big5.c ctype-czech.c ctype-euc_kr.c ctype-gb2312.c ctype-gbk.c ctype-latin1_de.c ctype-sjis.c ctype-tis620.c ctype-ujis.c ctype-utf8.c ctype-win1250ch.c ctype-bin.c ctype-latin1.c my_vsnprintf.c xml.c ctype-extra.c
endif
endif
@@ -56,7 +56,7 @@ EXTRA_DIST = ctype-big5.c ctype-czech.c ctype-euc_kr.c ctype-win1250ch.c \
t_ctype.h
libmystrings_a_LIBADD=
-conf_to_src_SOURCES = conf_to_src.c
+conf_to_src_SOURCES = conf_to_src.c xml.c ctype.c
conf_to_src_LDADD=
#force static linking of conf_to_src - essential when linking against
#custom installation of libc
diff --git a/strings/conf_to_src.c b/strings/conf_to_src.c
index 2f88c9ad22e..69dccbca0a7 100644
--- a/strings/conf_to_src.c
+++ b/strings/conf_to_src.c
@@ -14,129 +14,293 @@
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
-/* can't use -lmysys because this prog is used to create -lstrings */
-
#include <ctype.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
+#include <fcntl.h>
-#define CHARSETS_SUBDIR "sql/share/charsets"
-#define CTYPE_TABLE_SIZE 257
-#define TO_LOWER_TABLE_SIZE 256
-#define TO_UPPER_TABLE_SIZE 256
-#define SORT_ORDER_TABLE_SIZE 256
-#define ROW_LEN 16
+#include <my_global.h>
+#include <m_ctype.h>
+#include <my_xml.h>
-void print_arrays_for(char *set);
-char *prog;
-char buf[1024], *p, *endptr;
+#define ROW_LEN 16
+#define ROW16_LEN 8
+#define MAX_BUF 16*1024
-int
-main(int argc, char **argv)
+static CHARSET_INFO all_charsets[256];
+
+
+void
+print_array(FILE *f, const char *set, const char *name, uchar *a, int n)
{
- prog = *argv;
+ int i;
- if (argc < 2) {
- fprintf(stderr, "usage: %s source-dir [charset [, charset]]\n", prog);
- exit(EXIT_FAILURE);
+ fprintf(f,"uchar %s_%s[] = {\n", name, set);
+
+ for (i=0 ;i<n ; i++)
+ {
+ fprintf(f,"0x%02X",a[i]);
+ fprintf(f, (i+1<n) ? "," :"" );
+ fprintf(f, ((i+1) % ROW_LEN == n % ROW_LEN) ? "\n" : "" );
}
+ fprintf(f,"};\n\n");
+}
- --argc; ++argv; /* skip program name */
- if (chdir(*argv) != 0) {
- fprintf(stderr, "%s: can't cd to %s\n", prog, *argv);
- exit(EXIT_FAILURE);
- }
- --argc; ++argv;
+void
+print_array16(FILE *f, const char *set, const char *name, uint16 *a, int n)
+{
+ int i;
- if (chdir(CHARSETS_SUBDIR) != 0) {
- fprintf(stderr, "%s: can't cd to %s\n", prog, CHARSETS_SUBDIR);
- exit(EXIT_FAILURE);
+ fprintf(f,"uchar %s_%s[] = {\n", name, set);
+
+ for (i=0 ;i<n ; i++)
+ {
+ fprintf(f,"0x%04X",a[i]);
+ fprintf(f, (i+1<n) ? "," :"" );
+ fprintf(f, ((i+1) % ROW16_LEN == n % ROW16_LEN) ? "\n" : "" );
}
+ fprintf(f,"};\n\n");
+}
- while (argc--)
- print_arrays_for(*argv++);
- exit(EXIT_SUCCESS);
+static int get_charset_number(const char *charset_name)
+{
+ CHARSET_INFO *cs;
+ for (cs= all_charsets; cs < all_charsets+255; ++cs)
+ {
+ if ( cs->name && !strcmp(cs->name, charset_name))
+ return cs->number;
+ }
+ return 0;
}
-void
-print_array(FILE *f, const char *set, const char *name, int n)
+char *mdup(const char *src, uint len)
{
- int i;
- char val[100];
+ char *dst=(char*)malloc(len);
+ memcpy(dst,src,len);
+ return dst;
+}
- printf("uchar %s_%s[] = {\n", name, set);
+static void simple_cs_copy_data(CHARSET_INFO *to, CHARSET_INFO *from)
+{
+ to->number= from->number ? from->number : to->number;
+ to->state|= from->state;
+
+ if (from->csname)
+ to->csname= strdup(from->csname);
+
+ if (from->name)
+ to->name= strdup(from->name);
+
+ if (from->ctype)
+ to->ctype= (uchar*) mdup((char*) from->ctype, MY_CS_CTYPE_TABLE_SIZE);
+ if (from->to_lower)
+ to->to_lower= (uchar*) mdup((char*) from->to_lower, MY_CS_TO_LOWER_TABLE_SIZE);
+ if (from->to_upper)
+ to->to_upper= (uchar*) mdup((char*) from->to_upper, MY_CS_TO_UPPER_TABLE_SIZE);
+ if (from->sort_order)
+ {
+ to->sort_order= (uchar*) mdup((char*) from->sort_order, MY_CS_SORT_ORDER_TABLE_SIZE);
+ /*
+ set_max_sort_char(to);
+ */
+ }
+ if (from->tab_to_uni)
+ {
+ uint sz= MY_CS_TO_UNI_TABLE_SIZE*sizeof(uint16);
+ to->tab_to_uni= (uint16*) mdup((char*)from->tab_to_uni, sz);
+ /*
+ create_fromuni(to);
+ */
+ }
+}
+
+static my_bool simple_cs_is_full(CHARSET_INFO *cs)
+{
+ return ((cs->csname && cs->tab_to_uni && cs->ctype && cs->to_upper &&
+ cs->to_lower) &&
+ (cs->number && cs->name && cs->sort_order));
+}
- p = buf;
- *buf = '\0';
- for (i = 0; i < n; ++i)
+static int add_collation(CHARSET_INFO *cs)
+{
+ if (cs->name && (cs->number || (cs->number=get_charset_number(cs->name))))
{
- /* get a word from f */
- endptr = p;
- for (;;)
+ if (!(all_charsets[cs->number].state & MY_CS_COMPILED))
{
- while (isspace((* (unsigned char*) endptr)))
- ++endptr;
- if (*endptr && *endptr != '#') /* not comment */
- break;
- if ((fgets(buf, sizeof(buf), f)) == NULL)
- return; /* XXX: break silently */
- endptr = buf;
+ simple_cs_copy_data(&all_charsets[cs->number],cs);
+
}
+
+ cs->number= 0;
+ cs->name= NULL;
+ cs->state= 0;
+ cs->sort_order= NULL;
+ cs->state= 0;
+ }
+ return MY_XML_OK;
+}
- p = val;
- while (!isspace((* (unsigned char*) endptr)))
- *p++ = *endptr++;
- *p = '\0';
- p = endptr;
-
- /* write the value out */
-
- if (i == 0 || i % ROW_LEN == n % ROW_LEN)
- printf(" ");
-
- printf("%3d", (unsigned char) strtol(val, (char **) NULL, 16));
-
- if (i < n - 1)
- printf(",");
- if ((i+1) % ROW_LEN == n % ROW_LEN)
- printf("\n");
+static int my_read_charset_file(const char *filename)
+{
+ char buf[MAX_BUF];
+ int fd;
+ uint len;
+
+ if ((fd=open(filename,O_RDONLY)) < 0)
+ {
+ fprintf(stderr,"Can't open '%s'\n",filename);
+ return 1;
}
-
- printf("};\n\n");
+
+ len=read(fd,buf,MAX_BUF);
+ close(fd);
+
+ if (my_parse_charset_xml(buf,len,add_collation))
+ {
+#if 0
+ printf("ERROR at line %d pos %d '%s'\n",
+ my_xml_error_lineno(&p)+1,
+ my_xml_error_pos(&p),
+ my_xml_error_string(&p));
+#endif
+ }
+
+ return FALSE;
}
-void
-print_arrays_for(char *set)
+void dispcset(FILE *f,CHARSET_INFO *cs)
{
- FILE *f;
+ fprintf(f,"{\n");
+ fprintf(f," %d,\n",cs->number);
+ fprintf(f," MY_CS_COMPILED,\n");
+
+ if (cs->name)
+ {
+ fprintf(f," \"%s\",\n",cs->name);
+ fprintf(f," \"%s\",\n",cs->csname);
+ fprintf(f," \"\",\n");
+ fprintf(f," ctype_%s,\n",cs->name);
+ fprintf(f," to_lower_%s,\n",cs->name);
+ fprintf(f," to_upper_%s,\n",cs->name);
+ fprintf(f," sort_order_%s,\n",cs->name);
+ fprintf(f," to_uni_%s,\n",cs->name);
+ fprintf(f," from_uni_%s,\n",cs->name);
+ }
+ else
+ {
+ fprintf(f," NULL,\n");
+ fprintf(f," NULL,\n");
+ fprintf(f," NULL,\n");
+ fprintf(f," NULL,\n");
+ fprintf(f," NULL,\n");
+ fprintf(f," NULL,\n");
+ fprintf(f," NULL,\n");
+ fprintf(f," NULL,\n");
+ fprintf(f," NULL,\n");
+ }
+
+ fprintf(f," %d,\n",cs->strxfrm_multiply);
+ fprintf(f," my_strnncoll_simple,\n");
+ fprintf(f," my_strnxfrm_simple,\n");
+ fprintf(f," my_like_range_simple,\n");
+ fprintf(f," my_wild_cmp_8bit,\n");
+ fprintf(f," %d,\n",cs->mbmaxlen);
+ fprintf(f," NULL,\n");
+ fprintf(f," NULL,\n");
+ fprintf(f," NULL,\n");
+ fprintf(f," my_mb_wc_8bit,\n");
+ fprintf(f," my_wc_mb_8bit,\n");
+ fprintf(f," my_caseup_str_8bit,\n");
+ fprintf(f," my_casedn_str_8bit,\n");
+ fprintf(f," my_caseup_8bit,\n");
+ fprintf(f," my_casedn_8bit,\n");
+ fprintf(f," my_tosort_8bit,\n");
+ fprintf(f," my_strcasecmp_8bit,\n");
+ fprintf(f," my_strncasecmp_8bit,\n");
+ fprintf(f," my_hash_caseup_simple,\n");
+ fprintf(f," my_hash_sort_simple,\n");
+ fprintf(f," 0,\n");
+ fprintf(f," my_snprintf_8bit,\n");
+ fprintf(f," my_long10_to_str_8bit,\n");
+ fprintf(f," my_longlong10_to_str_8bit,\n");
+ fprintf(f," my_fill_8bit,\n");
+ fprintf(f," my_strntol_8bit,\n");
+ fprintf(f," my_strntoul_8bit,\n");
+ fprintf(f," my_strntoll_8bit,\n");
+ fprintf(f," my_strntoull_8bit,\n");
+ fprintf(f," my_strntod_8bit,\n");
+ fprintf(f," my_scan_8bit\n");
+ fprintf(f,"}\n");
+}
- sprintf(buf, "%s.conf", set);
- if ((f = fopen(buf, "r")) == NULL) {
- fprintf(stderr, "%s: can't read conf file for charset %s\n", prog, set);
+int
+main(int argc, char **argv __attribute__((unused)))
+{
+ CHARSET_INFO ncs;
+ CHARSET_INFO *cs;
+ char filename[256];
+ FILE *f= stdout;
+
+ if (argc < 2)
+ {
+ fprintf(stderr, "usage: %s source-dir\n", argv[0]);
exit(EXIT_FAILURE);
}
-
- printf("\
-/* The %s character set. Generated automatically by\n\
- * the %s program\n\
- */\n\n",
- set, prog);
-
- /* it would be nice if this used the code in mysys/charset.c, but... */
- print_array(f, set, "ctype", CTYPE_TABLE_SIZE);
- print_array(f, set, "to_lower", TO_LOWER_TABLE_SIZE);
- print_array(f, set, "to_upper", TO_UPPER_TABLE_SIZE);
- print_array(f, set, "sort_order", SORT_ORDER_TABLE_SIZE);
- printf("\n");
-
- fclose(f);
-
- return;
+
+ bzero((void*)&ncs,sizeof(ncs));
+ bzero((void*)&all_charsets,sizeof(all_charsets));
+
+ sprintf(filename,"%s/%s",argv[1],"Index.xml");
+ my_read_charset_file(filename);
+
+ for (cs=all_charsets; cs < all_charsets+256; cs++)
+ {
+ if (cs->number)
+ {
+ if ( (!simple_cs_is_full(cs)) && (cs->csname) )
+ {
+ sprintf(filename,"%s/%s.xml",argv[1],cs->csname);
+ my_read_charset_file(filename);
+ }
+ }
+ }
+
+ for (cs=all_charsets; cs < all_charsets+256; cs++)
+ {
+ if (simple_cs_is_full(cs))
+ {
+ fprintf(f,"#ifdef HAVE_CHARSET_%s\n",cs->csname);
+ print_array(f, cs->name, "ctype", cs->ctype, MY_CS_CTYPE_TABLE_SIZE);
+ print_array(f, cs->name, "to_lower", cs->to_lower, MY_CS_TO_LOWER_TABLE_SIZE);
+ print_array(f, cs->name, "to_upper", cs->to_upper, MY_CS_TO_UPPER_TABLE_SIZE);
+ print_array(f, cs->name, "sort_order", cs->sort_order, MY_CS_SORT_ORDER_TABLE_SIZE);
+ print_array16(f, cs->name, "to_uni", cs->tab_to_uni, MY_CS_TO_UNI_TABLE_SIZE);
+ fprintf(f,"#endif\n");
+ fprintf(f,"\n");
+ }
+ }
+
+ fprintf(f,"CHARSET_INFO compiled_charsets[] = {\n");
+ for (cs=all_charsets; cs < all_charsets+256; cs++)
+ {
+ if (simple_cs_is_full(cs))
+ {
+ fprintf(f,"#ifdef HAVE_CHARSET_%s\n",cs->csname);
+ dispcset(f,cs);
+ fprintf(f,",\n");
+ fprintf(f,"#endif\n");
+ }
+ }
+
+ dispcset(f,&ncs);
+ fprintf(f,"};\n");
+
+ return 0;
}
diff --git a/strings/ctype-big5.c b/strings/ctype-big5.c
index 37bf2aba509..e1cc0b6e8ab 100644
--- a/strings/ctype-big5.c
+++ b/strings/ctype-big5.c
@@ -6258,7 +6258,8 @@ CHARSET_INFO my_charset_big5 =
my_snprintf_8bit,
my_long10_to_str_8bit,
my_longlong10_to_str_8bit,
-
+ my_fill_8bit,
+
my_strntol_8bit,
my_strntoul_8bit,
my_strntoll_8bit,
diff --git a/strings/ctype-bin.c b/strings/ctype-bin.c
index 48d5536a2cb..5f9dc9929ab 100644
--- a/strings/ctype-bin.c
+++ b/strings/ctype-bin.c
@@ -269,7 +269,7 @@ static int my_strnxfrm_bin(CHARSET_INFO *cs __attribute__((unused)),
return len;
}
-static CHARSET_INFO my_charset_bin_st =
+CHARSET_INFO my_charset_bin =
{
63, /* number */
MY_CS_COMPILED|MY_CS_BINSORT|MY_CS_PRIMARY,/* state */
@@ -306,6 +306,7 @@ static CHARSET_INFO my_charset_bin_st =
my_snprintf_8bit, /* snprintf */
my_long10_to_str_8bit,
my_longlong10_to_str_8bit,
+ my_fill_8bit,
my_strntol_8bit,
my_strntoul_8bit,
my_strntoll_8bit,
@@ -313,6 +314,3 @@ static CHARSET_INFO my_charset_bin_st =
my_strntod_8bit,
my_scan_8bit
};
-
-
-CHARSET_INFO *my_charset_bin = &my_charset_bin_st;
diff --git a/strings/ctype-czech.c b/strings/ctype-czech.c
index 6397d3d902e..3e351732212 100644
--- a/strings/ctype-czech.c
+++ b/strings/ctype-czech.c
@@ -630,6 +630,7 @@ CHARSET_INFO my_charset_czech =
my_snprintf_8bit,
my_long10_to_str_8bit,
my_longlong10_to_str_8bit,
+ my_fill_8bit,
my_strntol_8bit,
my_strntoul_8bit,
my_strntoll_8bit,
diff --git a/strings/ctype-euc_kr.c b/strings/ctype-euc_kr.c
index d4eebdcb4a9..7a2fe48f4ab 100644
--- a/strings/ctype-euc_kr.c
+++ b/strings/ctype-euc_kr.c
@@ -8676,6 +8676,7 @@ CHARSET_INFO my_charset_euc_kr =
my_snprintf_8bit,
my_long10_to_str_8bit,
my_longlong10_to_str_8bit,
+ my_fill_8bit,
my_strntol_8bit,
my_strntoul_8bit,
my_strntoll_8bit,
diff --git a/strings/ctype-extra.c b/strings/ctype-extra.c
new file mode 100644
index 00000000000..b7a7bea7bb1
--- /dev/null
+++ b/strings/ctype-extra.c
@@ -0,0 +1,3941 @@
+/* Copyright (C) 2000 MySQL AB
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
+
+#include <my_global.h>
+#include <m_ctype.h>
+
+
+#ifndef HAVE_CHARSET_latin1
+#define HAVE_CHARSET_latin1
+#endif
+
+#if defined(HAVE_CHARSET_latin1)||defined(HAVE_CHARSET_latin1_de)||\
+defined(HAVE_CHARSET_danish)||defined(HAVE_CHARSET_german1)
+
+static uint16 tab_8859_1_uni[256]={
+ 0,0x0001,0x0002,0x0003,0x0004,0x0005,0x0006,0x0007,
+0x0008,0x0009,0x000A,0x000B,0x000C,0x000D,0x000E,0x000F,
+0x0010,0x0011,0x0012,0x0013,0x0014,0x0015,0x0016,0x0017,
+0x0018,0x0019,0x001A,0x001B,0x001C,0x001D,0x001E,0x001F,
+0x0020,0x0021,0x0022,0x0023,0x0024,0x0025,0x0026,0x0027,
+0x0028,0x0029,0x002A,0x002B,0x002C,0x002D,0x002E,0x002F,
+0x0030,0x0031,0x0032,0x0033,0x0034,0x0035,0x0036,0x0037,
+0x0038,0x0039,0x003A,0x003B,0x003C,0x003D,0x003E,0x003F,
+0x0040,0x0041,0x0042,0x0043,0x0044,0x0045,0x0046,0x0047,
+0x0048,0x0049,0x004A,0x004B,0x004C,0x004D,0x004E,0x004F,
+0x0050,0x0051,0x0052,0x0053,0x0054,0x0055,0x0056,0x0057,
+0x0058,0x0059,0x005A,0x005B,0x005C,0x005D,0x005E,0x005F,
+0x0060,0x0061,0x0062,0x0063,0x0064,0x0065,0x0066,0x0067,
+0x0068,0x0069,0x006A,0x006B,0x006C,0x006D,0x006E,0x006F,
+0x0070,0x0071,0x0072,0x0073,0x0074,0x0075,0x0076,0x0077,
+0x0078,0x0079,0x007A,0x007B,0x007C,0x007D,0x007E, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+0x00A0,0x00A1,0x00A2,0x00A3,0x00A4,0x00A5,0x00A6,0x00A7,
+0x00A8,0x00A9,0x00AA,0x00AB,0x00AC,0x00AD,0x00AE,0x00AF,
+0x00B0,0x00B1,0x00B2,0x00B3,0x00B4,0x00B5,0x00B6,0x00B7,
+0x00B8,0x00B9,0x00BA,0x00BB,0x00BC,0x00BD,0x00BE,0x00BF,
+0x00C0,0x00C1,0x00C2,0x00C3,0x00C4,0x00C5,0x00C6,0x00C7,
+0x00C8,0x00C9,0x00CA,0x00CB,0x00CC,0x00CD,0x00CE,0x00CF,
+0x00D0,0x00D1,0x00D2,0x00D3,0x00D4,0x00D5,0x00D6,0x00D7,
+0x00D8,0x00D9,0x00DA,0x00DB,0x00DC,0x00DD,0x00DE,0x00DF,
+0x00E0,0x00E1,0x00E2,0x00E3,0x00E4,0x00E5,0x00E6,0x00E7,
+0x00E8,0x00E9,0x00EA,0x00EB,0x00EC,0x00ED,0x00EE,0x00EF,
+0x00F0,0x00F1,0x00F2,0x00F3,0x00F4,0x00F5,0x00F6,0x00F7,
+0x00F8,0x00F9,0x00FA,0x00FB,0x00FC,0x00FD,0x00FE,0x00FF
+};
+
+static uchar tab_uni_8859_1_plane00[]={
+0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F,
+0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F,
+0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F,
+0x30,0x31,0x32,0x33,0x34,0x35,0x36,0x37,0x38,0x39,0x3A,0x3B,0x3C,0x3D,0x3E,0x3F,
+0x40,0x41,0x42,0x43,0x44,0x45,0x46,0x47,0x48,0x49,0x4A,0x4B,0x4C,0x4D,0x4E,0x4F,
+0x50,0x51,0x52,0x53,0x54,0x55,0x56,0x57,0x58,0x59,0x5A,0x5B,0x5C,0x5D,0x5E,0x5F,
+0x60,0x61,0x62,0x63,0x64,0x65,0x66,0x67,0x68,0x69,0x6A,0x6B,0x6C,0x6D,0x6E,0x6F,
+0x70,0x71,0x72,0x73,0x74,0x75,0x76,0x77,0x78,0x79,0x7A,0x7B,0x7C,0x7D,0x7E,0x00,
+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+0xA0,0xA1,0xA2,0xA3,0xA4,0xA5,0xA6,0xA7,0xA8,0xA9,0xAA,0xAB,0xAC,0xAD,0xAE,0xAF,
+0xB0,0xB1,0xB2,0xB3,0xB4,0xB5,0xB6,0xB7,0xB8,0xB9,0xBA,0xBB,0xBC,0xBD,0xBE,0xBF,
+0xC0,0xC1,0xC2,0xC3,0xC4,0xC5,0xC6,0xC7,0xC8,0xC9,0xCA,0xCB,0xCC,0xCD,0xCE,0xCF,
+0xD0,0xD1,0xD2,0xD3,0xD4,0xD5,0xD6,0xD7,0xD8,0xD9,0xDA,0xDB,0xDC,0xDD,0xDE,0xDF,
+0xE0,0xE1,0xE2,0xE3,0xE4,0xE5,0xE6,0xE7,0xE8,0xE9,0xEA,0xEB,0xEC,0xED,0xEE,0xEF,
+0xF0,0xF1,0xF2,0xF3,0xF4,0xF5,0xF6,0xF7,0xF8,0xF9,0xFA,0xFB,0xFC,0xFD,0xFE,0xFF};
+
+static MY_UNI_IDX idx_uni_8859_1[]={
+ {0x0000,0x00FF,tab_uni_8859_1_plane00},
+ {0,0,NULL}
+};
+#endif
+
+#if defined(HAVE_CHARSET_latin2)||defined(HAVE_CHARSET_croat)||\
+defined(HAVE_CHARSET_hungarian)
+
+static uint16 tab_8859_2_uni[256]={
+ 0,0x0001,0x0002,0x0003,0x0004,0x0005,0x0006,0x0007,
+0x0008,0x0009,0x000A,0x000B,0x000C,0x000D,0x000E,0x000F,
+0x0010,0x0011,0x0012,0x0013,0x0014,0x0015,0x0016,0x0017,
+0x0018,0x0019,0x001A,0x001B,0x001C,0x001D,0x001E,0x001F,
+0x0020,0x0021,0x0022,0x0023,0x0024,0x0025,0x0026,0x0027,
+0x0028,0x0029,0x002A,0x002B,0x002C,0x002D,0x002E,0x002F,
+0x0030,0x0031,0x0032,0x0033,0x0034,0x0035,0x0036,0x0037,
+0x0038,0x0039,0x003A,0x003B,0x003C,0x003D,0x003E,0x003F,
+0x0040,0x0041,0x0042,0x0043,0x0044,0x0045,0x0046,0x0047,
+0x0048,0x0049,0x004A,0x004B,0x004C,0x004D,0x004E,0x004F,
+0x0050,0x0051,0x0052,0x0053,0x0054,0x0055,0x0056,0x0057,
+0x0058,0x0059,0x005A,0x005B,0x005C,0x005D,0x005E,0x005F,
+0x0060,0x0061,0x0062,0x0063,0x0064,0x0065,0x0066,0x0067,
+0x0068,0x0069,0x006A,0x006B,0x006C,0x006D,0x006E,0x006F,
+0x0070,0x0071,0x0072,0x0073,0x0074,0x0075,0x0076,0x0077,
+0x0078,0x0079,0x007A,0x007B,0x007C,0x007D,0x007E, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+0x00A0,0x0104,0x02D8,0x0141,0x00A4,0x013D,0x015A,0x00A7,
+0x00A8,0x0160,0x015E,0x0164,0x0179,0x00AD,0x017D,0x017B,
+0x00B0,0x0105,0x02DB,0x0142,0x00B4,0x013E,0x015B,0x02C7,
+0x00B8,0x0161,0x015F,0x0165,0x017A,0x02DD,0x017E,0x017C,
+0x0154,0x00C1,0x00C2,0x0102,0x00C4,0x0139,0x0106,0x00C7,
+0x010C,0x00C9,0x0118,0x00CB,0x011A,0x00CD,0x00CE,0x010E,
+0x0110,0x0143,0x0147,0x00D3,0x00D4,0x0150,0x00D6,0x00D7,
+0x0158,0x016E,0x00DA,0x0170,0x00DC,0x00DD,0x0162,0x00DF,
+0x0155,0x00E1,0x00E2,0x0103,0x00E4,0x013A,0x0107,0x00E7,
+0x010D,0x00E9,0x0119,0x00EB,0x011B,0x00ED,0x00EE,0x010F,
+0x0111,0x0144,0x0148,0x00F3,0x00F4,0x0151,0x00F6,0x00F7,
+0x0159,0x016F,0x00FA,0x0171,0x00FC,0x00FD,0x0163,0x02D9
+};
+
+
+/* 0000-00FD , 254 chars */
+static uchar tab_uni_8859_2_plane00[]={
+0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F,
+0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F,
+0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F,
+0x30,0x31,0x32,0x33,0x34,0x35,0x36,0x37,0x38,0x39,0x3A,0x3B,0x3C,0x3D,0x3E,0x3F,
+0x40,0x41,0x42,0x43,0x44,0x45,0x46,0x47,0x48,0x49,0x4A,0x4B,0x4C,0x4D,0x4E,0x4F,
+0x50,0x51,0x52,0x53,0x54,0x55,0x56,0x57,0x58,0x59,0x5A,0x5B,0x5C,0x5D,0x5E,0x5F,
+0x60,0x61,0x62,0x63,0x64,0x65,0x66,0x67,0x68,0x69,0x6A,0x6B,0x6C,0x6D,0x6E,0x6F,
+0x70,0x71,0x72,0x73,0x74,0x75,0x76,0x77,0x78,0x79,0x7A,0x7B,0x7C,0x7D,0x7E,0x00,
+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+0xA0,0x00,0x00,0x00,0xA4,0x00,0x00,0xA7,0xA8,0x00,0x00,0x00,0x00,0xAD,0x00,0x00,
+0xB0,0x00,0x00,0x00,0xB4,0x00,0x00,0x00,0xB8,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+0x00,0xC1,0xC2,0x00,0xC4,0x00,0x00,0xC7,0x00,0xC9,0x00,0xCB,0x00,0xCD,0xCE,0x00,
+0x00,0x00,0x00,0xD3,0xD4,0x00,0xD6,0xD7,0x00,0x00,0xDA,0x00,0xDC,0xDD,0x00,0xDF,
+0x00,0xE1,0xE2,0x00,0xE4,0x00,0x00,0xE7,0x00,0xE9,0x00,0xEB,0x00,0xED,0xEE,0x00,
+0x00,0x00,0x00,0xF3,0xF4,0x00,0xF6,0xF7,0x00,0x00,0xFA,0x00,0xFC,0xFD};
+
+/* 0102-017E , 125 chars */
+static uchar tab_uni_8859_2_plane01[]={
+0xC3,0xE3,0xA1,0xB1,0xC6,0xE6,0x00,0x00,0x00,0x00,0xC8,0xE8,0xCF,0xEF,0xD0,0xF0,
+0x00,0x00,0x00,0x00,0x00,0x00,0xCA,0xEA,0xCC,0xEC,0x00,0x00,0x00,0x00,0x00,0x00,
+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xC5,0xE5,0x00,0x00,0xA5,0xB5,0x00,0x00,0xA3,
+0xB3,0xD1,0xF1,0x00,0x00,0xD2,0xF2,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xD5,0xF5,
+0x00,0x00,0xC0,0xE0,0x00,0x00,0xD8,0xF8,0xA6,0xB6,0x00,0x00,0xAA,0xBA,0xA9,0xB9,
+0xDE,0xFE,0xAB,0xBB,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xD9,0xF9,0xDB,0xFB,
+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xAC,0xBC,0xAF,0xBF,0xAE,0xBE};
+
+/* 02C7-02DD , 23 chars */
+static uchar tab_uni_8859_2_plane02[]={
+0xB7,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+0x00,0xA2,0xFF,0x00,0xB2,0x00,0xBD};
+
+static MY_UNI_IDX idx_uni_8859_2[]={
+ {0x0000,0x00FD,tab_uni_8859_2_plane00},
+ {0x0102,0x017E,tab_uni_8859_2_plane01},
+ {0x02C7,0x02DD,tab_uni_8859_2_plane02},
+ {0,0,NULL}
+};
+#endif
+
+#if defined(HAVE_CHARSET_cp1251) || defined(HAVE_CHARSET_win1251) || defined(HAVE_CHARSET_win1251ukr)
+static uint16 tab_cp1251_uni[256]={
+ 0,0x0001,0x0002,0x0003,0x0004,0x0005,0x0006,0x0007,
+0x0008,0x0009,0x000A,0x000B,0x000C,0x000D,0x000E,0x000F,
+0x0010,0x0011,0x0012,0x0013,0x0014,0x0015,0x0016,0x0017,
+0x0018,0x0019,0x001A,0x001B,0x001C,0x001D,0x001E,0x001F,
+0x0020,0x0021,0x0022,0x0023,0x0024,0x0025,0x0026,0x0027,
+0x0028,0x0029,0x002A,0x002B,0x002C,0x002D,0x002E,0x002F,
+0x0030,0x0031,0x0032,0x0033,0x0034,0x0035,0x0036,0x0037,
+0x0038,0x0039,0x003A,0x003B,0x003C,0x003D,0x003E,0x003F,
+0x0040,0x0041,0x0042,0x0043,0x0044,0x0045,0x0046,0x0047,
+0x0048,0x0049,0x004A,0x004B,0x004C,0x004D,0x004E,0x004F,
+0x0050,0x0051,0x0052,0x0053,0x0054,0x0055,0x0056,0x0057,
+0x0058,0x0059,0x005A,0x005B,0x005C,0x005D,0x005E,0x005F,
+0x0060,0x0061,0x0062,0x0063,0x0064,0x0065,0x0066,0x0067,
+0x0068,0x0069,0x006A,0x006B,0x006C,0x006D,0x006E,0x006F,
+0x0070,0x0071,0x0072,0x0073,0x0074,0x0075,0x0076,0x0077,
+0x0078,0x0079,0x007A,0x007B,0x007C,0x007D,0x007E,0x007F,
+0x0402,0x0403,0x201A,0x0453,0x201E,0x2026,0x2020,0x2021,
+ 0,0x2030,0x0409,0x2039,0x040A,0x040C,0x040B,0x040F,
+0x0452,0x2018,0x2019,0x201C,0x201D,0x2022,0x2013,0x2014,
+ 0,0x2122,0x0459,0x203A,0x045A,0x045C,0x045B,0x045F,
+0x00A0,0x040E,0x045E,0x0408,0x00A4,0x0490,0x00A6,0x00A7,
+0x0401,0x00A9,0x0404,0x00AB,0x00AC,0x00AD,0x00AE,0x0407,
+0x00B0,0x00B1,0x0406,0x0456,0x0491,0x00B5,0x00B6,0x00B7,
+0x0451,0x2116,0x0454,0x00BB,0x0458,0x0405,0x0455,0x0457,
+0x0410,0x0411,0x0412,0x0413,0x0414,0x0415,0x0416,0x0417,
+0x0418,0x0419,0x041A,0x041B,0x041C,0x041D,0x041E,0x041F,
+0x0420,0x0421,0x0422,0x0423,0x0424,0x0425,0x0426,0x0427,
+0x0428,0x0429,0x042A,0x042B,0x042C,0x042D,0x042E,0x042F,
+0x0430,0x0431,0x0432,0x0433,0x0434,0x0435,0x0436,0x0437,
+0x0438,0x0439,0x043A,0x043B,0x043C,0x043D,0x043E,0x043F,
+0x0440,0x0441,0x0442,0x0443,0x0444,0x0445,0x0446,0x0447,
+0x0448,0x0449,0x044A,0x044B,0x044C,0x044D,0x044E,0x044F
+};
+
+/* 0000-00BB , 188 chars */
+static uchar tab_uni_cp1251_plane00[]={
+0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F,
+0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F,
+0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F,
+0x30,0x31,0x32,0x33,0x34,0x35,0x36,0x37,0x38,0x39,0x3A,0x3B,0x3C,0x3D,0x3E,0x3F,
+0x40,0x41,0x42,0x43,0x44,0x45,0x46,0x47,0x48,0x49,0x4A,0x4B,0x4C,0x4D,0x4E,0x4F,
+0x50,0x51,0x52,0x53,0x54,0x55,0x56,0x57,0x58,0x59,0x5A,0x5B,0x5C,0x5D,0x5E,0x5F,
+0x60,0x61,0x62,0x63,0x64,0x65,0x66,0x67,0x68,0x69,0x6A,0x6B,0x6C,0x6D,0x6E,0x6F,
+0x70,0x71,0x72,0x73,0x74,0x75,0x76,0x77,0x78,0x79,0x7A,0x7B,0x7C,0x7D,0x7E,0x7F,
+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+0xA0,0x00,0x00,0x00,0xA4,0x00,0xA6,0xA7,0x00,0xA9,0x00,0xAB,0xAC,0xAD,0xAE,0x00,
+0xB0,0xB1,0x00,0x00,0x00,0xB5,0xB6,0xB7,0x00,0x00,0x00,0xBB};
+
+/* 0401-0491 , 145 chars */
+static uchar tab_uni_cp1251_plane04[]={
+0xA8,0x80,0x81,0xAA,0xBD,0xB2,0xAF,0xA3,0x8A,0x8C,0x8E,0x8D,0x00,0xA1,0x8F,0xC0,
+0xC1,0xC2,0xC3,0xC4,0xC5,0xC6,0xC7,0xC8,0xC9,0xCA,0xCB,0xCC,0xCD,0xCE,0xCF,0xD0,
+0xD1,0xD2,0xD3,0xD4,0xD5,0xD6,0xD7,0xD8,0xD9,0xDA,0xDB,0xDC,0xDD,0xDE,0xDF,0xE0,
+0xE1,0xE2,0xE3,0xE4,0xE5,0xE6,0xE7,0xE8,0xE9,0xEA,0xEB,0xEC,0xED,0xEE,0xEF,0xF0,
+0xF1,0xF2,0xF3,0xF4,0xF5,0xF6,0xF7,0xF8,0xF9,0xFA,0xFB,0xFC,0xFD,0xFE,0xFF,0x00,
+0xB8,0x90,0x83,0xBA,0xBE,0xB3,0xBF,0xBC,0x9A,0x9C,0x9E,0x9D,0x00,0xA2,0x9F,0x00,
+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xA5,
+0xB4};
+
+/* 2013-203A , 40 chars */
+static uchar tab_uni_cp1251_plane20[]={
+0x96,0x97,0x00,0x00,0x00,0x91,0x92,0x82,0x00,0x93,0x94,0x84,0x00,0x86,0x87,0x95,
+0x00,0x00,0x00,0x85,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x89,0x00,0x00,
+0x00,0x00,0x00,0x00,0x00,0x00,0x8B,0x9B};
+
+/* 2116-2122 , 13 chars */
+static uchar tab_uni_cp1251_plane21[]={
+0xB9,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x99};
+
+static MY_UNI_IDX idx_uni_cp1251[]={
+ {0x0000,0x00BB,tab_uni_cp1251_plane00},
+ {0x0401,0x0491,tab_uni_cp1251_plane04},
+ {0x2013,0x203A,tab_uni_cp1251_plane20},
+ {0x2116,0x2122,tab_uni_cp1251_plane21},
+ {0,0,NULL}
+};
+#endif
+
+
+
+#ifdef HAVE_CHARSET_armscii8
+static uchar ctype_armscii8[] = {
+ 0,
+ 32, 32, 32, 32, 32, 32, 32, 32, 32, 40, 40, 40, 40, 40, 32, 32,
+ 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,
+ 72, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
+ 132,132,132,132,132,132,132,132,132,132, 16, 16, 16, 16, 16, 16,
+ 16,129,129,129,129,129,129, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 16, 16, 16, 16, 16,
+ 16,130,130,130,130,130,130, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 16, 16, 16, 16, 32,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 72, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
+ 16, 16, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2,
+ 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2,
+ 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2,
+ 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2,
+ 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 16, 16
+};
+
+static uchar to_lower_armscii8[] = {
+ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
+ 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
+ 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47,
+ 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63,
+ 64, 97, 98, 99,100,101,102,103,104,105,106,107,108,109,110,111,
+ 112,113,114,115,116,117,118,119,120,121,122, 91, 92, 93, 94, 95,
+ 96, 97, 98, 99,100,101,102,103,104,105,106,107,108,109,110,111,
+ 112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,
+ 128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,
+ 144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,
+ 160,161,162,163,164,165,166,167,184,169,170,171,172,173,174,175,
+ 176,177,179,179,181,181,183,183,185,185,187,187,189,189,191,191,
+ 193,193,195,195,197,197,199,199,201,201,203,203,205,205,207,207,
+ 209,209,211,211,213,213,215,215,217,217,219,219,221,221,223,223,
+ 225,225,227,227,229,229,231,231,233,233,235,235,237,237,239,239,
+ 241,241,243,243,245,245,247,247,249,249,251,251,253,253,254,255
+};
+
+static uchar to_upper_armscii8[] = {
+ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
+ 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
+ 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47,
+ 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63,
+ 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79,
+ 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95,
+ 96, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79,
+ 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90,123,124,125,126,127,
+ 128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,
+ 144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,
+ 160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,
+ 176,177,178,178,180,180,182,182,184,184,186,186,188,188,190,190,
+ 192,192,194,194,196,196,198,198,200,200,202,202,204,204,206,206,
+ 208,208,210,210,212,212,214,214,216,216,218,218,220,220,222,222,
+ 224,224,226,226,228,228,230,230,232,232,234,234,236,236,238,238,
+ 240,240,242,242,244,244,246,246,248,248,250,250,252,252,254,255
+};
+
+static uchar sort_order_armscii8[] = {
+ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
+ 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
+ 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47,
+ 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63,
+ 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79,
+ 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95,
+ 96, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79,
+ 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90,123,124,125,126,127,
+ 128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,
+ 144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,
+ 160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,
+ 176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,
+ 192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,
+ 208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,223,
+ 224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,
+ 240,241,242,243,244,245,246,247,248,249,250,251,252,253,254,255
+};
+
+static uint16 tab_armscii_8_uni[256]={
+ 0,0x0001,0x0002,0x0003,0x0004,0x0005,0x0006,0x0007,
+0x0008,0x0009,0x000A,0x000B,0x000C,0x000D,0x000E,0x000F,
+0x0010,0x0011,0x0012,0x0013,0x0014,0x0015,0x0016,0x0017,
+0x0018,0x0019,0x001A,0x001B,0x001C,0x001D,0x001E,0x001F,
+0x0020,0x0021,0x0022,0x0023,0x0024,0x0025,0x0026,0x0027,
+0x0028,0x0029,0x002A,0x002B,0x002C,0x002D,0x002E,0x002F,
+0x0030,0x0031,0x0032,0x0033,0x0034,0x0035,0x0036,0x0037,
+0x0038,0x0039,0x003A,0x003B,0x003C,0x003D,0x003E,0x003F,
+0x0040,0x0041,0x0042,0x0043,0x0044,0x0045,0x0046,0x0047,
+0x0048,0x0049,0x004A,0x004B,0x004C,0x004D,0x004E,0x004F,
+0x0050,0x0051,0x0052,0x0053,0x0054,0x0055,0x0056,0x0057,
+0x0058,0x0059,0x005A,0x005B,0x005C,0x005D,0x005E,0x005F,
+0x0060,0x0061,0x0062,0x0063,0x0064,0x0065,0x0066,0x0067,
+0x0068,0x0069,0x006A,0x006B,0x006C,0x006D,0x006E,0x006F,
+0x0070,0x0071,0x0072,0x0073,0x0074,0x0075,0x0076,0x0077,
+0x0078,0x0079,0x007A,0x007B,0x007C,0x007D,0x007E,0x007F,
+0x0080,0x0081,0x0082,0x0083,0x0084,0x0085,0x0086,0x0087,
+0x0088,0x0089,0x008A,0x008B,0x008C,0x008D,0x008E,0x008F,
+0x0090,0x0091,0x0092,0x0093,0x0094,0x0095,0x0096,0x0097,
+0x0098,0x0099,0x009A,0x009B,0x009C,0x009D,0x009E,0x009F,
+0x00A0,0x2741,0x00A7,0x0589,0x0029,0x0028,0x00BB,0x00AB,
+0x2014,0x002E,0x055D,0x002C,0x002D,0x055F,0x2026,0x055C,
+0x055B,0x055E,0x0531,0x0561,0x0532,0x0562,0x0533,0x0563,
+0x0534,0x0564,0x0535,0x0565,0x0536,0x0566,0x0537,0x0567,
+0x0538,0x0568,0x0539,0x0569,0x053A,0x056A,0x053B,0x056B,
+0x053C,0x056C,0x053D,0x056D,0x053E,0x056E,0x053F,0x056F,
+0x0540,0x0570,0x0541,0x0571,0x0542,0x0572,0x0543,0x0573,
+0x0544,0x0574,0x0545,0x0575,0x0546,0x0576,0x0547,0x0577,
+0x0548,0x0578,0x0549,0x0579,0x054A,0x057A,0x054B,0x057B,
+0x054C,0x057C,0x054D,0x057D,0x054E,0x057E,0x054F,0x057F,
+0x0550,0x0580,0x0551,0x0581,0x0552,0x0582,0x0553,0x0583,
+0x0554,0x0584,0x0555,0x0585,0x0556,0x0586,0x2019,0x0027
+};
+
+
+/* 0000-00BB , 188 chars */
+static uchar tab_uni_armscii_8_plane00[]={
+0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F,
+0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F,
+0x20,0x21,0x22,0x23,0x24,0x25,0x26,0xFF,0xA5,0xA4,0x2A,0x2B,0xAB,0xAC,0xA9,0x2F,
+0x30,0x31,0x32,0x33,0x34,0x35,0x36,0x37,0x38,0x39,0x3A,0x3B,0x3C,0x3D,0x3E,0x3F,
+0x40,0x41,0x42,0x43,0x44,0x45,0x46,0x47,0x48,0x49,0x4A,0x4B,0x4C,0x4D,0x4E,0x4F,
+0x50,0x51,0x52,0x53,0x54,0x55,0x56,0x57,0x58,0x59,0x5A,0x5B,0x5C,0x5D,0x5E,0x5F,
+0x60,0x61,0x62,0x63,0x64,0x65,0x66,0x67,0x68,0x69,0x6A,0x6B,0x6C,0x6D,0x6E,0x6F,
+0x70,0x71,0x72,0x73,0x74,0x75,0x76,0x77,0x78,0x79,0x7A,0x7B,0x7C,0x7D,0x7E,0x7F,
+0x80,0x81,0x82,0x83,0x84,0x85,0x86,0x87,0x88,0x89,0x8A,0x8B,0x8C,0x8D,0x8E,0x8F,
+0x90,0x91,0x92,0x93,0x94,0x95,0x96,0x97,0x98,0x99,0x9A,0x9B,0x9C,0x9D,0x9E,0x9F,
+0xA0,0x00,0x00,0x00,0x00,0x00,0x00,0xA2,0x00,0x00,0x00,0xA7,0x00,0x00,0x00,0x00,
+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xA6};
+
+/* 0531-0589 , 89 chars */
+static uchar tab_uni_armscii_8_plane05[]={
+0xB2,0xB4,0xB6,0xB8,0xBA,0xBC,0xBE,0xC0,0xC2,0xC4,0xC6,0xC8,0xCA,0xCC,0xCE,0xD0,
+0xD2,0xD4,0xD6,0xD8,0xDA,0xDC,0xDE,0xE0,0xE2,0xE4,0xE6,0xE8,0xEA,0xEC,0xEE,0xF0,
+0xF2,0xF4,0xF6,0xF8,0xFA,0xFC,0x00,0x00,0x00,0x00,0xB0,0xAF,0xAA,0xB1,0xAD,0x00,
+0xB3,0xB5,0xB7,0xB9,0xBB,0xBD,0xBF,0xC1,0xC3,0xC5,0xC7,0xC9,0xCB,0xCD,0xCF,0xD1,
+0xD3,0xD5,0xD7,0xD9,0xDB,0xDD,0xDF,0xE1,0xE3,0xE5,0xE7,0xE9,0xEB,0xED,0xEF,0xF1,
+0xF3,0xF5,0xF7,0xF9,0xFB,0xFD,0x00,0x00,0xA3};
+
+/* 2014-2026 , 19 chars */
+static uchar tab_uni_armscii_8_plane20[]={
+0xA8,0x00,0x00,0x00,0x00,0xFE,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+0x00,0x00,0xAE};
+
+/* 2741-2741 , 1 chars */
+static uchar tab_uni_armscii_8_plane27[]={
+0xA1};
+
+
+static MY_UNI_IDX idx_uni_armscii_8[]={
+ {0x0000,0x00BB,tab_uni_armscii_8_plane00},
+ {0x0531,0x0589,tab_uni_armscii_8_plane05},
+ {0x2014,0x2026,tab_uni_armscii_8_plane20},
+ {0x2741,0x2741,tab_uni_armscii_8_plane27},
+ {0,0,NULL}
+};
+
+#endif
+
+
+#ifdef HAVE_CHARSET_cp1251
+
+/* The cp1251 character set. Generated automatically by
+ * the ./conf_to_src program
+ */
+
+static uchar ctype_cp1251[] = {
+ 0,
+ 32, 32, 32, 32, 32, 32, 32, 32, 32, 40, 40, 40, 40, 40, 32, 32,
+ 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,
+ 72, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
+ 132,132,132,132,132,132,132,132,132,132, 16, 16, 16, 16, 16, 16,
+ 16,129,129,129,129,129,129, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 16, 16, 16, 16, 16,
+ 16,130,130,130,130,130,130, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 16, 16, 16, 16, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2
+};
+
+static uchar to_lower_cp1251[] = {
+ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
+ 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
+ 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47,
+ 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63,
+ 64, 97, 98, 99,100,101,102,103,104,105,106,107,108,109,110,111,
+ 112,113,114,115,116,117,118,119,120,121,122, 91, 92, 93, 94, 95,
+ 96, 97, 98, 99,100,101,102,103,104,105,106,107,108,109,110,111,
+ 112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,
+ 128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,
+ 144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,
+ 160,161,162,163,164,165,166,167,184,169,170,171,172,173,174,175,
+ 176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,
+ 224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,
+ 240,241,242,243,244,245,246,247,248,249,250,251,252,253,254,255,
+ 224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,
+ 240,241,242,243,244,245,246,247,248,249,250,251,252,253,254,255
+};
+
+static uchar to_upper_cp1251[] = {
+ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
+ 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
+ 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47,
+ 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63,
+ 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79,
+ 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95,
+ 96, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79,
+ 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90,123,124,125,126,127,
+ 128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,
+ 144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,
+ 160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,
+ 176,177,178,179,180,181,182,183,168,185,186,187,188,189,190,191,
+ 192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,
+ 208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,223,
+ 192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,
+ 208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,223
+};
+
+static uchar sort_order_cp1251[] = {
+ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
+ 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
+ 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47,
+ 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63,
+ 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79,
+ 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90,124,125,126,127,128,
+ 129, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79,
+ 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90,130,131,132,133,255,
+ 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,
+ 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,
+ 255,255,255,255,255,255,255,255, 97,255,255,255,255,255,255,255,
+ 255,255,255,255,255,255,255,255, 97,255,255,255,255,255,255,255,
+ 91, 92, 93, 94, 95, 96, 98, 99,100,101,102,103,104,105,106,107,
+ 108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,
+ 91, 92, 93, 94, 95, 96, 98, 99,100,101,102,103,104,105,106,107,
+ 108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123
+};
+
+#endif
+
+
+#ifdef HAVE_CHARSET_cp1257
+
+/* The cp1257 character set. Generated automatically by
+ * the ./conf_to_src program
+ */
+
+static uchar ctype_cp1257[] = {
+ 0,
+ 32, 32, 32, 32, 32, 32, 32, 32, 32, 40, 40, 40, 40, 40, 32, 32,
+ 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,
+ 72, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
+ 132,132,132,132,132,132,132,132,132,132, 16, 16, 16, 16, 16, 16,
+ 16,129,129,129,129,129,129, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 16, 16, 16, 16, 16,
+ 16,130,130,130,130,130,130, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 16, 16, 16, 16, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 1, 1, 0, 0, 0, 0, 1, 0, 1, 0, 0, 1, 0, 0, 0, 0,
+ 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0,
+ 2, 2, 0, 0, 0, 0, 2, 0, 2, 0, 0, 2, 0, 0, 0, 0,
+ 2, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 2, 0, 0, 2, 0
+};
+
+static uchar to_lower_cp1257[] = {
+ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
+ 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
+ 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47,
+ 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63,
+ 64, 97, 98, 99,100,101,102,103,104,105,106,107,108,109,110,111,
+ 112,113,114,115,116,117,118,119,120,121,122, 91, 92, 93, 94, 95,
+ 96, 97, 98, 99,100,101,102,103,104,105,106,107,108,109,110,111,
+ 112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,
+ 128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,
+ 144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,
+ 160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,
+ 176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,
+ 224,225,194,195,196,197,230,199,232,201,202,235,204,205,206,207,
+ 240,209,210,211,212,213,214,215,248,217,218,251,220,221,254,223,
+ 224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,
+ 240,241,242,243,244,245,246,247,248,249,250,251,252,253,254,255
+};
+
+static uchar to_upper_cp1257[] = {
+ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
+ 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
+ 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47,
+ 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63,
+ 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79,
+ 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95,
+ 96, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79,
+ 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90,123,124,125,126,127,
+ 128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,
+ 144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,
+ 160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,
+ 176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,
+ 192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,
+ 208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,223,
+ 192,193,226,227,228,229,198,231,200,233,234,203,236,237,238,239,
+ 208,241,242,243,244,245,246,247,216,249,250,219,252,253,222,255
+};
+
+static uchar sort_order_cp1257[] = {
+ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
+ 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
+ 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47,
+ 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63,
+ 64, 65, 67, 68, 70, 71, 74, 75, 76, 77, 80, 81, 82, 83, 84, 85,
+ 86, 87, 88, 89, 91, 92, 95, 96, 97, 78,255, 98, 99,100,101,102,
+ 103, 65, 67, 68, 70, 71, 74, 75, 76, 77, 80, 81, 82, 83, 84, 85,
+ 86, 87, 88, 89, 91, 92, 95, 96, 97, 78,255,104,105,106,107,255,
+ 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,
+ 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,
+ 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,
+ 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,
+ 66, 79,255,255,255,255, 72,255, 69,255,255, 73,255,255,255,255,
+ 90,255,255,255,255,255,255,255, 94,255,255, 93,255,255,255,255,
+ 255, 79,255,255,255,255, 72,255, 69,255,255, 73,255,255,255,255,
+ 90,255,255,255,255,255,255,255, 94,255,255, 93,255,255,255,255
+};
+
+static uint16 tab_cp1257_uni[256]={
+ 0,0x0001,0x0002,0x0003,0x0004,0x0005,0x0006,0x0007,
+0x0008,0x0009,0x000A,0x000B,0x000C,0x000D,0x000E,0x000F,
+0x0010,0x0011,0x0012,0x0013,0x0014,0x0015,0x0016,0x0017,
+0x0018,0x0019,0x001A,0x001B,0x001C,0x001D,0x001E,0x001F,
+0x0020,0x0021,0x0022,0x0023,0x0024,0x0025,0x0026,0x0027,
+0x0028,0x0029,0x002A,0x002B,0x002C,0x002D,0x002E,0x002F,
+0x0030,0x0031,0x0032,0x0033,0x0034,0x0035,0x0036,0x0037,
+0x0038,0x0039,0x003A,0x003B,0x003C,0x003D,0x003E,0x003F,
+0x0040,0x0041,0x0042,0x0043,0x0044,0x0045,0x0046,0x0047,
+0x0048,0x0049,0x004A,0x004B,0x004C,0x004D,0x004E,0x004F,
+0x0050,0x0051,0x0052,0x0053,0x0054,0x0055,0x0056,0x0057,
+0x0058,0x0059,0x005A,0x005B,0x005C,0x005D,0x005E,0x005F,
+0x0060,0x0061,0x0062,0x0063,0x0064,0x0065,0x0066,0x0067,
+0x0068,0x0069,0x006A,0x006B,0x006C,0x006D,0x006E,0x006F,
+0x0070,0x0071,0x0072,0x0073,0x0074,0x0075,0x0076,0x0077,
+0x0078,0x0079,0x007A,0x007B,0x007C,0x007D,0x007E,0x007F,
+0x20AC, 0,0x201A, 0,0x201E,0x2026,0x2020,0x2021,
+ 0,0x2030, 0,0x2039, 0,0x00A8,0x02C7,0x00B8,
+ 0,0x2018,0x2019,0x201C,0x201D,0x2022,0x2013,0x2014,
+ 0,0x2122, 0,0x203A, 0,0x00AF,0x02DB, 0,
+0x00A0, 0,0x00A2,0x00A3,0x00A4, 0,0x00A6,0x00A7,
+0x00D8,0x00A9,0x0156,0x00AB,0x00AC,0x00AD,0x00AE,0x00C6,
+0x00B0,0x00B1,0x00B2,0x00B3,0x00B4,0x00B5,0x00B6,0x00B7,
+0x00F8,0x00B9,0x0157,0x00BB,0x00BC,0x00BD,0x00BE,0x00E6,
+0x0104,0x012E,0x0100,0x0106,0x00C4,0x00C5,0x0118,0x0112,
+0x010C,0x00C9,0x0179,0x0116,0x0122,0x0136,0x012A,0x013B,
+0x0160,0x0143,0x0145,0x00D3,0x014C,0x00D5,0x00D6,0x00D7,
+0x0172,0x0141,0x015A,0x016A,0x00DC,0x017B,0x017D,0x00DF,
+0x0105,0x012F,0x0101,0x0107,0x00E4,0x00E5,0x0119,0x0113,
+0x010D,0x00E9,0x017A,0x0117,0x0123,0x0137,0x012B,0x013C,
+0x0161,0x0144,0x0146,0x00F3,0x014D,0x00F5,0x00F6,0x00F7,
+0x0173,0x0142,0x015B,0x016B,0x00FC,0x017C,0x017E,0x02D9
+};
+
+
+/* 0000-00FC , 253 chars */
+static uchar tab_uni_cp1257_plane00[]={
+0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F,
+0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F,
+0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F,
+0x30,0x31,0x32,0x33,0x34,0x35,0x36,0x37,0x38,0x39,0x3A,0x3B,0x3C,0x3D,0x3E,0x3F,
+0x40,0x41,0x42,0x43,0x44,0x45,0x46,0x47,0x48,0x49,0x4A,0x4B,0x4C,0x4D,0x4E,0x4F,
+0x50,0x51,0x52,0x53,0x54,0x55,0x56,0x57,0x58,0x59,0x5A,0x5B,0x5C,0x5D,0x5E,0x5F,
+0x60,0x61,0x62,0x63,0x64,0x65,0x66,0x67,0x68,0x69,0x6A,0x6B,0x6C,0x6D,0x6E,0x6F,
+0x70,0x71,0x72,0x73,0x74,0x75,0x76,0x77,0x78,0x79,0x7A,0x7B,0x7C,0x7D,0x7E,0x7F,
+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+0xA0,0x00,0xA2,0xA3,0xA4,0x00,0xA6,0xA7,0x8D,0xA9,0x00,0xAB,0xAC,0xAD,0xAE,0x9D,
+0xB0,0xB1,0xB2,0xB3,0xB4,0xB5,0xB6,0xB7,0x8F,0xB9,0x00,0xBB,0xBC,0xBD,0xBE,0x00,
+0x00,0x00,0x00,0x00,0xC4,0xC5,0xAF,0x00,0x00,0xC9,0x00,0x00,0x00,0x00,0x00,0x00,
+0x00,0x00,0x00,0xD3,0x00,0xD5,0xD6,0xD7,0xA8,0x00,0x00,0x00,0xDC,0x00,0x00,0xDF,
+0x00,0x00,0x00,0x00,0xE4,0xE5,0xBF,0x00,0x00,0xE9,0x00,0x00,0x00,0x00,0x00,0x00,
+0x00,0x00,0x00,0xF3,0x00,0xF5,0xF6,0xF7,0xB8,0x00,0x00,0x00,0xFC};
+
+/* 0100-017E , 127 chars */
+static uchar tab_uni_cp1257_plane01[]={
+0xC2,0xE2,0x00,0x00,0xC0,0xE0,0xC3,0xE3,0x00,0x00,0x00,0x00,0xC8,0xE8,0x00,0x00,
+0x00,0x00,0xC7,0xE7,0x00,0x00,0xCB,0xEB,0xC6,0xE6,0x00,0x00,0x00,0x00,0x00,0x00,
+0x00,0x00,0xCC,0xEC,0x00,0x00,0x00,0x00,0x00,0x00,0xCE,0xEE,0x00,0x00,0xC1,0xE1,
+0x00,0x00,0x00,0x00,0x00,0x00,0xCD,0xED,0x00,0x00,0x00,0xCF,0xEF,0x00,0x00,0x00,
+0x00,0xD9,0xF9,0xD1,0xF1,0xD2,0xF2,0x00,0x00,0x00,0x00,0x00,0xD4,0xF4,0x00,0x00,
+0x00,0x00,0x00,0x00,0x00,0x00,0xAA,0xBA,0x00,0x00,0xDA,0xFA,0x00,0x00,0x00,0x00,
+0xD0,0xF0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xDB,0xFB,0x00,0x00,0x00,0x00,
+0x00,0x00,0xD8,0xF8,0x00,0x00,0x00,0x00,0x00,0xCA,0xEA,0xDD,0xFD,0xDE,0xFE};
+
+/* 2013-20AC , 154 chars */
+static uchar tab_uni_cp1257_plane20[]={
+0x96,0x97,0x00,0x00,0x00,0x91,0x92,0x82,0x00,0x93,0x94,0x84,0x00,0x86,0x87,0x95,
+0x00,0x00,0x00,0x85,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x89,0x00,0x00,
+0x00,0x00,0x00,0x00,0x00,0x00,0x8B,0x9B,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80};
+
+/* 02C7-02DB , 21 chars */
+static uchar tab_uni_cp1257_plane02[]={
+0x8E,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+0x00,0x00,0xFF,0x00,0x9E};
+
+/* 2122-2122 , 1 chars */
+static uchar tab_uni_cp1257_plane21[]={
+0x99};
+
+static MY_UNI_IDX idx_uni_cp1257[]={
+ {0x0000,0x00FC,tab_uni_cp1257_plane00},
+ {0x0100,0x017E,tab_uni_cp1257_plane01},
+ {0x2013,0x20AC,tab_uni_cp1257_plane20},
+ {0x02C7,0x02DB,tab_uni_cp1257_plane02},
+ {0x2122,0x2122,tab_uni_cp1257_plane21},
+ {0,0,NULL}
+};
+
+#endif
+
+
+#ifdef HAVE_CHARSET_croat
+
+/* The croat character set. Generated by
+ * the ./conf_to_src program
+ */
+
+static uchar ctype_croat[] = {
+ 0,
+ 32, 32, 32, 32, 32, 32, 32, 32, 32, 40, 40, 40, 40, 40, 32, 32,
+ 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,
+ 72, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
+ 132,132,132,132,132,132,132,132,132,132, 16, 16, 16, 16, 16, 16,
+ 16,129,129,129,129,129,129, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 16, 16, 16, 16, 16,
+ 16,130,130,130,130,130,130, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 16, 16, 16, 16, 32,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 2, 0, 0,
+ 72, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
+ 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 16, 1, 1, 1, 1, 1, 1, 1, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 16, 2, 2, 2, 2, 2, 2, 2, 2
+};
+
+static uchar to_lower_croat[] = {
+ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
+ 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
+ 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47,
+ 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63,
+ 64, 97, 98, 99,100,101,102,103,104,105,106,107,108,109,110,111,
+ 112,113,114,115,116,117,118,119,120,121,122, 91, 92, 93, 94, 95,
+ 96, 97, 98, 99,100,101,102,103,104,105,106,107,108,109,110,111,
+ 112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,
+ 128,129,130,131,132,133,134,135,136,137,154,139,140,141,158,143,
+ 144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,
+ 160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,
+ 176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,
+ 224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,
+ 240,241,242,243,244,245,246,215,248,249,250,251,252,253,254,223,
+ 224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,
+ 240,241,242,243,244,245,246,247,248,249,250,251,252,253,254,255
+};
+
+static uchar to_upper_croat[] = {
+ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
+ 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
+ 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47,
+ 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63,
+ 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79,
+ 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95,
+ 96, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79,
+ 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90,123,124,125,126,127,
+ 128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,
+ 144,145,146,147,148,149,150,151,152,153,138,155,156,157,142,159,
+ 160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,
+ 176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,
+ 192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,
+ 208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,223,
+ 192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,
+ 208,209,210,211,212,213,214,247,216,217,218,219,220,221,222,255
+};
+
+static uchar sort_order_croat[] = {
+ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
+ 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
+ 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47,
+ 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63,
+ 64, 65, 66, 67, 70, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82,
+ 83, 84, 85, 86, 88, 89, 90, 91, 92, 93, 94, 91, 92, 93, 94, 95,
+ 96, 65, 66, 67, 70, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82,
+ 83, 84, 85, 86, 88, 89, 90, 91, 92, 93, 94,123,124,125,126,127,
+ 128,129,130,131,132,133,134,135,136,137, 87,139,140,141, 95,143,
+ 144,145,146,147,148,149,150,151,152,153, 87,155,156,157, 95,159,
+ 160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,
+ 176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,
+ 65, 65, 65, 65, 92, 91, 69, 67, 68, 69, 69, 69, 73, 73, 73, 73,
+ 71, 78, 79, 79, 79, 79, 93,215,216, 85, 85, 85, 89, 89,222,223,
+ 65, 65, 65, 65, 92, 91, 69, 67, 68, 69, 69, 69, 73, 73, 73, 73,
+ 71, 78, 79, 79, 79, 79, 93,247,216, 85, 85, 85, 89, 89,222,255
+};
+#endif
+
+
+#ifdef HAVE_CHARSET_danish
+
+/* The danish character set. Generated automatically by
+ * the ./conf_to_src program
+ */
+
+static uchar ctype_danish[] = {
+ 0,
+ 32, 32, 32, 32, 32, 32, 32, 32, 32, 40, 40, 40, 40, 40, 32, 32,
+ 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,
+ 72, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
+ 132,132,132,132,132,132,132,132,132,132, 16, 16, 16, 16, 16, 16,
+ 16,129,129,129,129,129,129, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 16, 16, 16, 16, 16,
+ 16,130,130,130,130,130,130, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 16, 16, 16, 16, 32,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 72, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
+ 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 16, 1, 1, 1, 1, 1, 1, 1, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 16, 2, 2, 2, 2, 2, 2, 2, 2
+};
+
+static uchar to_lower_danish[] = {
+ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
+ 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
+ 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47,
+ 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63,
+ 64, 97, 98, 99,100,101,102,103,104,105,106,107,108,109,110,111,
+ 112,113,114,115,116,117,118,119,120,121,122, 91, 92, 93, 94, 95,
+ 96, 97, 98, 99,100,101,102,103,104,105,106,107,108,109,110,111,
+ 112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,
+ 128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,
+ 144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,
+ 160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,
+ 176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,
+ 224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,
+ 240,241,242,243,244,245,246,215,248,249,250,251,252,253,254,223,
+ 224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,
+ 240,241,242,243,244,245,246,247,248,249,250,251,252,253,254,255
+};
+
+static uchar to_upper_danish[] = {
+ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
+ 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
+ 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47,
+ 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63,
+ 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79,
+ 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95,
+ 96, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79,
+ 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90,123,124,125,126,127,
+ 128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,
+ 144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,
+ 160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,
+ 176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,
+ 192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,
+ 208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,223,
+ 192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,
+ 208,209,210,211,212,213,214,247,216,217,218,219,220,221,222,255
+};
+
+static uchar sort_order_danish[] = {
+ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
+ 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
+ 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47,
+ 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63,
+ 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79,
+ 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95,
+ 96, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79,
+ 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90,123,124,125,126,127,
+ 128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,
+ 144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,
+ 160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,
+ 176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,
+ 65, 65, 65, 65, 91, 93, 91, 67, 69, 69, 69, 69, 73, 73, 73, 73,
+ 68, 78, 79, 79, 79, 79, 92,215, 92, 85, 85, 85, 89, 89,222,223,
+ 65, 65, 65, 65, 91, 93, 91, 67, 69, 69, 69, 69, 73, 73, 73, 73,
+ 68, 78, 79, 79, 79, 79, 92,247, 92, 85, 85, 85, 89, 89,222,255
+};
+#endif
+
+
+
+#ifdef HAVE_CHARSET_dec8
+
+/* The dec8 character set. Generated automatically by
+ * the ./conf_to_src program
+ */
+
+static uchar ctype_dec8[] = {
+ 0,
+ 32, 32, 32, 32, 32, 32, 32, 32, 32, 40, 40, 40, 40, 40, 32, 32,
+ 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,
+ 72, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
+ 132,132,132,132,132,132,132,132,132,132, 16, 16, 16, 16, 16, 16,
+ 16,129,129,129,129,129,129, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 16, 16, 16, 16, 16,
+ 16,130,130,130,130,130,130, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 16, 16, 16, 16, 32,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 72, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
+ 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 16, 1, 1, 1, 1, 1, 1, 1, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 16, 2, 2, 2, 2, 2, 2, 2, 2
+};
+
+static uchar to_lower_dec8[] = {
+ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
+ 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
+ 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47,
+ 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63,
+ 64, 97, 98, 99,100,101,102,103,104,105,106,107,108,109,110,111,
+ 112,113,114,115,116,117,118,119,120,121,122, 91, 92, 93, 94, 95,
+ 96, 97, 98, 99,100,101,102,103,104,105,106,107,108,109,110,111,
+ 112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,
+ 128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,
+ 144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,
+ 160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,
+ 176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,
+ 224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,
+ 240,241,242,243,244,245,246,215,248,249,250,251,252,253,254,223,
+ 224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,
+ 240,241,242,243,244,245,246,247,248,249,250,251,252,253,254,255
+};
+
+static uchar to_upper_dec8[] = {
+ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
+ 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
+ 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47,
+ 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63,
+ 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79,
+ 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95,
+ 96, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79,
+ 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90,123,124,125,126,127,
+ 128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,
+ 144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,
+ 160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,
+ 176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,
+ 192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,
+ 208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,223,
+ 192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,
+ 208,209,210,211,212,213,214,247,216,217,218,219,220,221,222,255
+};
+
+static uchar sort_order_dec8[] = {
+ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
+ 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
+ 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47,
+ 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63,
+ 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79,
+ 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95,
+ 96, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79,
+ 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90,123,124,125,126,127,
+ 128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,
+ 144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,
+ 160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,
+ 176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,
+ 65, 65, 65, 65, 92, 91, 92, 67, 69, 69, 69, 69, 73, 73, 73, 73,
+ 68, 78, 79, 79, 79, 79, 93,215,216, 85, 85, 85, 89, 89,222,223,
+ 65, 65, 65, 65, 92, 91, 92, 67, 69, 69, 69, 69, 73, 73, 73, 73,
+ 68, 78, 79, 79, 79, 79, 93,247,216, 85, 85, 85, 89, 89,222,255
+};
+#endif
+
+
+#ifdef HAVE_CHARSET_dos
+
+/* The dos character set. Generated automatically by
+ * the ./conf_to_src program
+ */
+
+static uchar ctype_dos[] = {
+ 0,
+ 32, 48, 48, 48, 48, 48, 48, 32, 32, 40, 40, 40, 40, 40, 48, 48,
+ 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 32, 48, 48, 48, 48, 48,
+ 72, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
+ 132,132,132,132,132,132,132,132,132,132, 16, 16, 16, 16, 16, 16,
+ 16,129,129,129,129,129,129, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 16, 16, 16, 16, 16,
+ 16,130,130,130,130,130,130, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 16, 16, 16, 16, 48,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 1,
+ 1, 2, 1, 2, 2, 2, 2, 2, 2, 1, 1, 16, 16, 16, 16, 16,
+ 2, 2, 2, 2, 2, 1, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
+ 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
+ 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
+ 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
+ 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
+ 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 32
+};
+
+static uchar to_lower_dos[] = {
+ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
+ 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
+ 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47,
+ 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63,
+ 64, 97, 98, 99,100,101,102,103,104,105,106,107,108,109,110,111,
+ 112,113,114,115,116,117,118,119,120,121,122, 91, 92, 93, 94, 95,
+ 96, 97, 98, 99,100,101,102,103,104,105,106,107,108,109,110,111,
+ 112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,
+ 135,129,130,131,132,133,134,135,136,137,138,139,140,141,132,134,
+ 130,145,145,147,148,149,150,151,152,148,129,155,156,157,158,159,
+ 160,161,162,163,164,164,166,167,168,169,170,171,172,173,174,175,
+ 176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,
+ 192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,
+ 208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,223,
+ 224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,
+ 240,241,242,243,244,245,246,247,248,249,250,251,252,253,254,255
+};
+
+static uchar to_upper_dos[] = {
+ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
+ 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
+ 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47,
+ 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63,
+ 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79,
+ 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95,
+ 96, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79,
+ 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90,123,124,125,126,127,
+ 128,154,144, 65,142, 65,143,128, 69, 69, 69, 73, 73, 73,142,143,
+ 144,146,146, 79,153, 79, 85, 85, 89,153,154,155,156,157,158,159,
+ 65, 73, 79, 85,165,165,166,167,168,169,170,171,172,173,174,175,
+ 176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,
+ 192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,
+ 208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,223,
+ 224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,
+ 240,241,242,243,244,245,246,247,248,249,250,251,252,253,254,255
+};
+
+static uchar sort_order_dos[] = {
+ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
+ 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
+ 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47,
+ 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63,
+ 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79,
+ 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95,
+ 96, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79,
+ 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90,123,124,125,126,127,
+ 67, 89, 69, 65, 92, 65, 91, 67, 69, 69, 69, 73, 73, 73, 92, 91,
+ 69, 92, 92, 79, 93, 79, 85, 85, 89, 93, 89, 36, 36, 36, 36, 36,
+ 65, 73, 79, 85, 78, 78,166,167, 63,169,170,171,172, 33, 34, 34,
+ 176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,
+ 192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,
+ 208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,223,
+ 224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,
+ 240,241,242,243,244,245,246,247,248,249,250,251,252,253,254,255
+};
+#endif
+
+#ifdef HAVE_CHARSET_estonia
+
+/* The estonia character set. Generated automatically by
+ * the ./conf_to_src program
+ */
+
+static uchar ctype_estonia[] = {
+ 0,
+ 32, 32, 32, 32, 32, 32, 32, 32, 32, 40, 40, 40, 40, 40, 32, 32,
+ 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,
+ 72, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
+ 132,132,132,132,132,132,132,132,132,132, 16, 16, 16, 16, 16, 16,
+ 16,129,129,129,129,129,129, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 16, 16, 16, 16, 16,
+ 16,130,130,130,130,130,130, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 16, 16, 16, 16, 32,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 72, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
+ 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 16, 1, 1, 1, 1, 1, 1, 1, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 16, 2, 2, 2, 2, 2, 2, 2, 2
+};
+
+static uchar to_lower_estonia[] = {
+ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
+ 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
+ 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47,
+ 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63,
+ 64, 97, 98, 99,100,101,102,103,104,105,106,107,108,109,110,111,
+ 112,113,114,115,116,117,118,119,120,121,122, 91, 92, 93, 94, 95,
+ 96, 97, 98, 99,100,101,102,103,104,105,106,107,108,109,110,111,
+ 112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,
+ 128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,
+ 144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,
+ 160,161,162,163,164,165,166,167,184,169,186,171,172,173,174,191,
+ 176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,
+ 224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,
+ 240,241,242,243,244,245,246,215,248,249,250,251,252,253,254,223,
+ 224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,
+ 240,241,242,243,244,245,246,247,248,249,250,251,252,253,254,255
+};
+
+static uchar to_upper_estonia[] = {
+ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
+ 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
+ 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47,
+ 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63,
+ 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79,
+ 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95,
+ 96, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79,
+ 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90,123,124,125,126,127,
+ 128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,
+ 144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,
+ 160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,
+ 176,177,178,179,180,181,182,183,168,185,170,187,188,189,190,175,
+ 192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,
+ 208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,223,
+ 192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,
+ 208,209,210,211,212,213,214,247,216,217,218,219,220,221,222,255
+};
+
+static uchar sort_order_estonia[] = {
+ 0, 2, 3, 4, 5, 6, 7, 8, 9, 46, 47, 48, 49, 50, 10, 11,
+ 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27,
+ 44, 51, 52, 53, 54, 55, 56, 39, 57, 58, 59, 93, 60, 40, 61, 62,
+ 118,122,124,126,128,129,130,131,132,133, 63, 64, 94, 95, 96, 65,
+ 66,134,144,146,152,154,164,166,170,172,178,180,184,190,192,198,
+ 206,208,210,214,229,232,238,240,250,252,221, 67, 68, 69, 70, 71,
+ 72,135,145,147,153,155,165,167,171,173,179,181,185,191,193,199,
+ 207,209,211,215,230,233,239,241,251,253,222, 73, 74, 75, 76, 28,
+ 1, 29, 87, 30, 90,116,113,114, 31,117, 32, 91, 33, 78, 82, 81,
+ 34, 85, 86, 88, 89,115, 42, 43, 35,231, 36, 92, 37, 79, 84, 38,
+ 45,254,102,103,104,255, 77,105,204,106,212, 98,107, 41,108,142,
+ 109, 97,125,127, 80,110,111,112,205,123,213, 99,119,120,121,143,
+ 140,176,136,148,244,138,162,160,150,156,223,158,168,182,174,186,
+ 219,194,196,200,202,242,246,100,236,188,216,234,248,225,227,218,
+ 141,177,137,149,245,139,163,161,151,157,224,159,169,183,175,187,
+ 220,195,197,201,203,243,247,101,237,189,217,235,249,226,228, 83
+};
+#endif
+
+#ifdef HAVE_CHARSET_german1
+
+/* The german1 character set. Generated automatically by
+ * the ./conf_to_src program
+ */
+
+static uchar ctype_german1[] = {
+ 0,
+ 32, 32, 32, 32, 32, 32, 32, 32, 32, 40, 40, 40, 40, 40, 32, 32,
+ 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,
+ 72, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
+ 132,132,132,132,132,132,132,132,132,132, 16, 16, 16, 16, 16, 16,
+ 16,129,129,129,129,129,129, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 16, 16, 16, 16, 16,
+ 16,130,130,130,130,130,130, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 16, 16, 16, 16, 32,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 72, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
+ 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 16, 1, 1, 1, 1, 1, 1, 1, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 16, 2, 2, 2, 2, 2, 2, 2, 2
+};
+
+static uchar to_lower_german1[] = {
+ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
+ 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
+ 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47,
+ 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63,
+ 64, 97, 98, 99,100,101,102,103,104,105,106,107,108,109,110,111,
+ 112,113,114,115,116,117,118,119,120,121,122, 91, 92, 93, 94, 95,
+ 96, 97, 98, 99,100,101,102,103,104,105,106,107,108,109,110,111,
+ 112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,
+ 128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,
+ 144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,
+ 160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,
+ 176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,
+ 224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,
+ 240,241,242,243,244,245,246,215,248,249,250,251,252,253,254,223,
+ 224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,
+ 240,241,242,243,244,245,246,247,248,249,250,251,252,253,254,255
+};
+
+static uchar to_upper_german1[] = {
+ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
+ 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
+ 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47,
+ 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63,
+ 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79,
+ 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95,
+ 96, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79,
+ 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90,123,124,125,126,127,
+ 128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,
+ 144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,
+ 160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,
+ 176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,
+ 192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,
+ 208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,223,
+ 192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,
+ 208,209,210,211,212,213,214,247,216,217,218,219,220,221,222,255
+};
+
+static uchar sort_order_german1[] = {
+ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
+ 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
+ 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47,
+ 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63,
+ 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79,
+ 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95,
+ 96, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79,
+ 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90,123,124,125,126,127,
+ 128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,
+ 144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,
+ 160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,
+ 176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,
+ 65, 65, 65, 65, 65, 65, 65, 67, 69, 69, 69, 69, 73, 73, 73, 73,
+ 208, 78, 79, 79, 79, 79, 79,215, 79, 85, 85, 85, 85, 89,222, 83,
+ 65, 65, 65, 65, 65, 65, 65, 67, 69, 69, 69, 69, 73, 73, 73, 73,
+ 208, 78, 79, 79, 79, 79, 79,247, 79, 85, 85, 85, 85, 89,222,255
+};
+#endif
+
+#ifdef HAVE_CHARSET_greek
+
+/* The greek character set. Generated automatically by
+ * the ./conf_to_src program
+ */
+
+static uchar ctype_greek[] = {
+ 0,
+ 32, 32, 32, 32, 32, 32, 32, 32, 32, 40, 40, 40, 40, 40, 32, 32,
+ 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,
+ 72, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
+ 132,132,132,132,132,132,132,132,132,132, 16, 16, 16, 16, 16, 16,
+ 16,129,129,129,129,129,129, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 16, 16, 16, 16, 16,
+ 16,130,130,130,130,130,130, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 16, 16, 16, 16, 32,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 72, 16, 16, 16, 0, 0, 16, 16, 16, 16, 0, 16, 16, 16, 0, 16,
+ 16, 16, 16, 16, 16, 16, 1, 16, 1, 1, 1, 16, 1, 16, 1, 1,
+ 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 0
+};
+
+static uchar to_lower_greek[] = {
+ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
+ 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
+ 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47,
+ 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63,
+ 64, 97, 98, 99,100,101,102,103,104,105,106,107,108,109,110,111,
+ 112,113,114,115,116,117,118,119,120,121,122, 91, 92, 93, 94, 95,
+ 96, 97, 98, 99,100,101,102,103,104,105,106,107,108,109,110,111,
+ 112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,
+ 128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,
+ 144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,
+ 160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,
+ 176,177,178,179,180,181,220,183,221,222,223,187,252,189,253,254,
+ 192,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,
+ 240,241,210,243,244,245,246,247,248,249,250,251,220,221,222,223,
+ 224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,
+ 240,241,242,243,244,245,246,247,248,249,250,251,252,253,254,255
+};
+
+static uchar to_upper_greek[] = {
+ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
+ 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
+ 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47,
+ 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63,
+ 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79,
+ 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95,
+ 96, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79,
+ 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90,123,124,125,126,127,
+ 128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,
+ 144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,
+ 160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,
+ 176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,
+ 218,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,
+ 208,209,210,211,212,213,214,215,216,217,218,219,193,197,199,201,
+ 219,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,
+ 208,209,211,211,212,213,214,215,216,217,218,219,207,213,217,255
+};
+
+static uchar sort_order_greek[] = {
+ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
+ 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
+ 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47,
+ 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63,
+ 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79,
+ 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95,
+ 96, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79,
+ 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90,123,124,125,126,127,
+ 128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,
+ 144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,
+ 160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,
+ 176,177,178,179,180,181,193,183,197,199,201,187,207,189,213,217,
+ 201,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,
+ 208,209,210,211,212,213,214,215,216,217,201,213,193,197,199,201,
+ 213,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,
+ 208,209,211,211,212,213,214,215,216,217,201,213,207,213,217,255
+};
+#endif
+
+#ifdef HAVE_CHARSET_hebrew
+
+/* The hebrew character set. Generated automatically by
+ * the ./conf_to_src program
+ */
+
+static uchar ctype_hebrew[] = {
+ 0,
+ 32, 32, 32, 32, 32, 32, 32, 32, 32, 40, 40, 40, 40, 40, 32, 32,
+ 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,
+ 72, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
+ 132,132,132,132,132,132,132,132,132,132, 16, 16, 16, 16, 16, 16,
+ 16,129,129,129,129,129,129, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 16, 16, 16, 16, 16,
+ 16,130,130,130,130,130,130, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 16, 16, 16, 16, 32,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 72, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
+ 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 0, 0, 0, 0, 0
+};
+
+static uchar to_lower_hebrew[] = {
+ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
+ 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
+ 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47,
+ 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63,
+ 64, 97, 98, 99,100,101,102,103,104,105,106,107,108,109,110,111,
+ 112,113,114,115,116,117,118,119,120,121,122, 91, 92, 93, 94, 95,
+ 96, 97, 98, 99,100,101,102,103,104,105,106,107,108,109,110,111,
+ 112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,
+ 128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,
+ 144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,
+ 160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,
+ 176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,
+ 192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,
+ 208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,223,
+ 224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,
+ 240,241,242,243,244,245,246,247,248,249,250,251,252,253,254,255
+};
+
+static uchar to_upper_hebrew[] = {
+ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
+ 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
+ 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47,
+ 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63,
+ 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79,
+ 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95,
+ 96, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79,
+ 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90,123,124,125,126,127,
+ 128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,
+ 144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,
+ 160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,
+ 176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,
+ 192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,
+ 208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,223,
+ 224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,
+ 240,241,242,243,244,245,246,247,248,249,250,251,252,253,254,255
+};
+
+static uchar sort_order_hebrew[] = {
+ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
+ 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
+ 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47,
+ 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63,
+ 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79,
+ 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95,
+ 96, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79,
+ 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90,123,124,125,126,127,
+ 128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,
+ 144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,
+ 160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,
+ 176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,
+ 192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,
+ 208,209,210,211,212,213,214,247,216,217,218,219,220,221,222,255,
+ 224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,
+ 240,241,242,243,244,245,246,247,248,249,250,251,252,253,254,255
+};
+#endif
+
+#ifdef HAVE_CHARSET_hp8
+
+/* The hp8 character set. Generated automatically by
+ * the ./conf_to_src program
+ */
+
+static uchar ctype_hp8[] = {
+ 0,
+ 32, 32, 32, 32, 32, 32, 32, 32, 32, 40, 40, 40, 40, 40, 32, 32,
+ 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,
+ 72, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
+ 132,132,132,132,132,132,132,132,132,132, 16, 16, 16, 16, 16, 16,
+ 16,129,129,129,129,129,129, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 16, 16, 16, 16, 16,
+ 16,130,130,130,130,130,130, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 16, 16, 16, 16, 32,
+ 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,
+ 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,
+ 32, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
+ 16, 32, 32, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
+ 16, 16, 16, 16, 16, 2, 16, 16, 16, 16, 16, 16, 2, 16, 2, 2,
+ 1, 16, 16, 1, 2, 16, 16, 2, 1, 16, 1, 1, 1, 16, 16, 16,
+ 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
+ 16, 16, 32, 32, 32, 32, 16, 16, 16, 16, 16, 16, 16, 16, 16, 32
+};
+
+static uchar to_lower_hp8[] = {
+ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
+ 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
+ 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47,
+ 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63,
+ 64, 97, 98, 99,100,101,102,103,104,105,106,107,108,109,110,111,
+ 112,113,114,115,116,117,118,119,120,121,122, 91, 92, 93, 94, 95,
+ 96, 97, 98, 99,100,101,102,103,104,105,106,107,108,109,110,111,
+ 112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,
+ 128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,
+ 144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,
+ 160,200,192,201,193,205,209,221,168,169,170,171,172,203,195,175,
+ 176,178,178,179,181,181,183,183,184,185,186,187,188,189,190,191,
+ 192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,
+ 212,209,214,215,212,213,214,215,204,217,206,207,197,221,222,194,
+ 196,226,226,228,228,213,217,198,202,234,234,236,236,199,239,239,
+ 241,241,242,243,244,245,246,247,248,249,250,251,252,253,254,255
+};
+
+static uchar to_upper_hp8[] = {
+ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
+ 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
+ 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47,
+ 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63,
+ 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79,
+ 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95,
+ 96, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79,
+ 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90,123,124,125,126,127,
+ 128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,
+ 144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,
+ 160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,
+ 176,177,177,179,180,180,182,182,184,185,186,187,188,189,190,191,
+ 162,164,223,174,224,220,231,237,161,163,232,173,216,165,218,219,
+ 208,166,210,211,208,229,210,211,216,230,218,219,220,167,222,223,
+ 224,225,225,227,227,229,230,231,232,233,233,235,235,237,238,238,
+ 240,240,242,243,244,245,246,247,248,249,250,251,252,253,254,255
+};
+
+static uchar sort_order_hp8[] = {
+ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
+ 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
+ 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47,
+ 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63,
+ 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79,
+ 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 92, 93, 91, 94, 95,
+ 96, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79,
+ 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90,123,124,125,126,127,
+ 128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,
+ 144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,
+ 160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,
+ 176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,
+ 192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,
+ 208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,223,
+ 224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,
+ 240,241,242,243,244,245,246,247,248,249,250,251,252,253,254,255
+};
+#endif
+
+#ifdef HAVE_CHARSET_hungarian
+
+/* The hungarian character set. Generated automatically by
+ * the ./conf_to_src program
+ */
+
+static uchar ctype_hungarian[] = {
+ 0,
+ 32, 32, 32, 32, 32, 32, 32, 32, 32, 40, 40, 40, 40, 40, 32, 32,
+ 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,
+ 72, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
+ 132,132,132,132,132,132,132,132,132,132, 16, 16, 16, 16, 16, 16,
+ 16,129,129,129,129,129,129, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 16, 16, 16, 16, 16,
+ 16,130,130,130,130,130,130, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 16, 16, 16, 16, 32,
+ 32, 32, 32, 32, 32, 32, 32, 32, 40, 40, 40, 40, 40, 32, 32, 32,
+ 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 72,
+ 1, 16, 1, 16, 1, 1, 16, 0, 0, 1, 1, 1, 1, 16, 1, 1,
+ 16, 2, 16, 2, 16, 2, 2, 16, 16, 2, 2, 2, 2, 16, 2, 2,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 16, 1, 1, 1, 1, 1, 1, 16, 1, 1, 1, 1, 1, 1, 1, 16,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 16, 2, 2, 2, 2, 2, 2, 2, 16
+};
+
+static uchar to_lower_hungarian[] = {
+ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
+ 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
+ 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47,
+ 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63,
+ 64, 97, 98, 99,100,101,102,103,104,105,106,107,108,109,110,111,
+ 112,113,114,115,116,117,118,119,120,121,122, 91, 92, 93, 94, 95,
+ 96, 97, 98, 99,100,101,102,103,104,105,106,107,108,109,110,111,
+ 112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,
+ 128,129,130,131,132,133,134,135,136,137,139,139,161,161,142,160,
+ 130,145,146,147,148,162,150,163,150,148,129,155,156,157,158,159,
+ 160,161,162,163,181,182,166,147,168,185,186,187,188,173,190,191,
+ 176,177,178,179,180,225,182,183,184,185,186,187,188,189,190,191,
+ 224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,
+ 208,241,242,243,244,245,246,215,248,249,250,251,252,253,254,223,
+ 162,225,226,227,228,229,230,231,232,233,234,150,236,237,238,239,
+ 240,241,242,243,244,245,246,247,248,249,250,251,252,253,254,255
+};
+
+static uchar to_upper_hungarian[] = {
+ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
+ 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
+ 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47,
+ 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63,
+ 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79,
+ 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95,
+ 96, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79,
+ 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90,123,124,125,126,127,
+ 128,154,144,131,132,133,134,135,136,137,138,138,140,141,142,143,
+ 144,145,146,167,153,149,152,151,152,153,154,155,156,157,158,159,
+ 143,141,149,151,164,165,166,167,168,169,170,171,172,173,174,175,
+ 176,160,178,162,180,181,165,183,184,169,170,171,172,189,174,175,
+ 192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,
+ 208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,223,
+ 224,193,194,195,196,197,198,199,200,201,202,235,204,205,206,207,
+ 240,209,210,211,212,213,214,247,216,217,218,219,220,221,222,255
+};
+
+static uchar sort_order_hungarian[] = {
+ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
+ 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
+ 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47,
+ 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63,
+ 64, 65, 71, 72, 76, 78, 83, 84, 85, 86, 90, 91, 92, 96, 97,100,
+ 105,106,107,110,114,117,122,123,124,125,127,131,132,133,134,135,
+ 136, 65, 71, 72, 76, 78, 83, 84, 85, 86, 90, 91, 92, 96, 97,100,
+ 105,106,107,110,114,117,122,123,124,125,127,137,138,139,140, 0,
+ 1,120, 78, 4, 5, 6, 7, 8, 9, 10,103,103, 86, 86, 15, 65,
+ 78, 18, 19,103,103,100,120,117,120,103,120, 28, 29, 30, 31,255,
+ 65, 86,100,117, 94,111,255,103,255,112,113,115,128,255,129,130,
+ 255, 66,255, 93,255, 65,111,255,255,112,113,115,128,255,129,130,
+ 108, 65, 68, 69, 70, 95, 73, 75, 74, 78, 81, 82, 80, 86, 87, 77,
+ 255, 98, 99,100,102,103,103,255,109,119,117,120,120,126,116,255,
+ 100, 65, 68, 69, 70, 95, 73, 75, 74, 78, 81,120, 80, 86, 88, 77,
+ 255, 98, 99,100,102,103,103,255,109,119,117,120,120,126,116,255
+};
+#endif
+
+#ifdef HAVE_CHARSET_koi8_ru
+
+/* The koi8_ru character set. Generated automatically by
+ * the ./conf_to_src program
+ */
+
+static uchar ctype_koi8_ru[] = {
+ 0,
+ 32, 32, 32, 32, 32, 32, 32, 32, 32, 40, 40, 40, 40, 40, 32, 32,
+ 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,
+ 72, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
+ 132,132,132,132,132,132,132,132,132,132, 16, 16, 16, 16, 16, 16,
+ 16,129,129,129,129,129,129, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 16, 16, 16, 16, 16,
+ 16,130,130,130,130,130,130, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 16, 16, 16, 16, 32,
+ 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
+ 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
+ 16, 16, 16, 2, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
+ 16, 16, 16, 1, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1
+};
+
+static uchar to_lower_koi8_ru[] = {
+ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
+ 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
+ 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47,
+ 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63,
+ 64, 97, 98, 99,100,101,102,103,104,105,106,107,108,109,110,111,
+ 112,113,114,115,116,117,118,119,120,121,122, 91, 92, 93, 94, 95,
+ 96, 97, 98, 99,100,101,102,103,104,105,106,107,108,109,110,111,
+ 112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,
+ 128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,
+ 144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,
+ 160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,
+ 176,177,178,163,180,181,182,183,184,185,186,187,188,189,190,191,
+ 192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,
+ 208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,223,
+ 192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,
+ 208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,223
+};
+
+static uchar to_upper_koi8_ru[] = {
+ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
+ 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
+ 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47,
+ 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63,
+ 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79,
+ 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95,
+ 96, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79,
+ 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90,123,124,125,126,127,
+ 128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,
+ 144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,
+ 160,161,162,179,164,165,166,167,168,169,170,171,172,173,174,175,
+ 176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,
+ 224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,
+ 240,241,242,243,244,245,246,247,248,249,250,251,252,253,254,255,
+ 224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,
+ 240,241,242,243,244,245,246,247,248,249,250,251,252,253,254,255
+};
+
+static uchar sort_order_koi8_ru[] = {
+ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
+ 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
+ 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47,
+ 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63,
+ 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79,
+ 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95,
+ 96, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79,
+ 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90,123,124,125,126,127,
+ 128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,
+ 144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,
+ 160,161,162,229,163,164,165,166,167,168,169,170,171,172,173,174,
+ 175,176,177,229,178,179,180,181,182,183,184,185,186,187,188,189,
+ 254,223,224,246,227,228,244,226,245,232,233,234,235,236,237,238,
+ 239,255,240,241,242,243,230,225,252,251,231,248,253,249,247,250,
+ 254,223,224,246,227,228,244,226,245,232,233,234,235,236,237,238,
+ 239,255,240,241,242,243,230,225,252,251,231,248,253,249,247,250
+};
+
+static uint16 tab_koi8_r_uni[256]={
+ 0,0x0001,0x0002,0x0003,0x0004,0x0005,0x0006,0x0007,
+0x0008,0x0009,0x000A,0x000B,0x000C,0x000D,0x000E,0x000F,
+0x0010,0x0011,0x0012,0x0013,0x0014,0x0015,0x0016,0x0017,
+0x0018,0x0019,0x001A,0x001B,0x001C,0x001D,0x001E,0x001F,
+0x0020,0x0021,0x0022,0x0023,0x0024,0x0025,0x0026,0x0027,
+0x0028,0x0029,0x002A,0x002B,0x002C,0x002D,0x002E,0x002F,
+0x0030,0x0031,0x0032,0x0033,0x0034,0x0035,0x0036,0x0037,
+0x0038,0x0039,0x003A,0x003B,0x003C,0x003D,0x003E,0x003F,
+0x0040,0x0041,0x0042,0x0043,0x0044,0x0045,0x0046,0x0047,
+0x0048,0x0049,0x004A,0x004B,0x004C,0x004D,0x004E,0x004F,
+0x0050,0x0051,0x0052,0x0053,0x0054,0x0055,0x0056,0x0057,
+0x0058,0x0059,0x005A,0x005B,0x005C,0x005D,0x005E,0x005F,
+0x0060,0x0061,0x0062,0x0063,0x0064,0x0065,0x0066,0x0067,
+0x0068,0x0069,0x006A,0x006B,0x006C,0x006D,0x006E,0x006F,
+0x0070,0x0071,0x0072,0x0073,0x0074,0x0075,0x0076,0x0077,
+0x0078,0x0079,0x007A,0x007B,0x007C,0x007D,0x007E,0x007F,
+0x2500,0x2502,0x250C,0x2510,0x2514,0x2518,0x251C,0x2524,
+0x252C,0x2534,0x253C,0x2580,0x2584,0x2588,0x258C,0x2590,
+0x2591,0x2592,0x2593,0x2320,0x25A0,0x2219,0x221A,0x2248,
+0x2264,0x2265,0x00A0,0x2321,0x00B0,0x00B2,0x00B7,0x00F7,
+0x2550,0x2551,0x2552,0x0451,0x2553,0x2554,0x2555,0x2556,
+0x2557,0x2558,0x2559,0x255A,0x255B,0x255C,0x255D,0x255E,
+0x255F,0x2560,0x2561,0x0401,0x2562,0x2563,0x2564,0x2565,
+0x2566,0x2567,0x2568,0x2569,0x256A,0x256B,0x256C,0x00A9,
+0x044E,0x0430,0x0431,0x0446,0x0434,0x0435,0x0444,0x0433,
+0x0445,0x0438,0x0439,0x043A,0x043B,0x043C,0x043D,0x043E,
+0x043F,0x044F,0x0440,0x0441,0x0442,0x0443,0x0436,0x0432,
+0x044C,0x044B,0x0437,0x0448,0x044D,0x0449,0x0447,0x044A,
+0x042E,0x0410,0x0411,0x0426,0x0414,0x0415,0x0424,0x0413,
+0x0425,0x0418,0x0419,0x041A,0x041B,0x041C,0x041D,0x041E,
+0x041F,0x042F,0x0420,0x0421,0x0422,0x0423,0x0416,0x0412,
+0x042C,0x042B,0x0417,0x0428,0x042D,0x0429,0x0427,0x042A
+};
+
+
+/* 0000-00F7 , 248 chars */
+static uchar tab_uni_koi8_r_plane00[]={
+0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F,
+0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F,
+0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F,
+0x30,0x31,0x32,0x33,0x34,0x35,0x36,0x37,0x38,0x39,0x3A,0x3B,0x3C,0x3D,0x3E,0x3F,
+0x40,0x41,0x42,0x43,0x44,0x45,0x46,0x47,0x48,0x49,0x4A,0x4B,0x4C,0x4D,0x4E,0x4F,
+0x50,0x51,0x52,0x53,0x54,0x55,0x56,0x57,0x58,0x59,0x5A,0x5B,0x5C,0x5D,0x5E,0x5F,
+0x60,0x61,0x62,0x63,0x64,0x65,0x66,0x67,0x68,0x69,0x6A,0x6B,0x6C,0x6D,0x6E,0x6F,
+0x70,0x71,0x72,0x73,0x74,0x75,0x76,0x77,0x78,0x79,0x7A,0x7B,0x7C,0x7D,0x7E,0x7F,
+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+0x9A,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xBF,0x00,0x00,0x00,0x00,0x00,0x00,
+0x9C,0x00,0x9D,0x00,0x00,0x00,0x00,0x9E,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x9F};
+
+/* 0401-0451 , 81 chars */
+static uchar tab_uni_koi8_r_plane04[]={
+0xB3,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xE1,
+0xE2,0xF7,0xE7,0xE4,0xE5,0xF6,0xFA,0xE9,0xEA,0xEB,0xEC,0xED,0xEE,0xEF,0xF0,0xF2,
+0xF3,0xF4,0xF5,0xE6,0xE8,0xE3,0xFE,0xFB,0xFD,0xFF,0xF9,0xF8,0xFC,0xE0,0xF1,0xC1,
+0xC2,0xD7,0xC7,0xC4,0xC5,0xD6,0xDA,0xC9,0xCA,0xCB,0xCC,0xCD,0xCE,0xCF,0xD0,0xD2,
+0xD3,0xD4,0xD5,0xC6,0xC8,0xC3,0xDE,0xDB,0xDD,0xDF,0xD9,0xD8,0xDC,0xC0,0xD1,0x00,
+0xA3};
+
+/* 2500-25A0 , 161 chars */
+static uchar tab_uni_koi8_r_plane25[]={
+0x80,0x00,0x81,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x82,0x00,0x00,0x00,
+0x83,0x00,0x00,0x00,0x84,0x00,0x00,0x00,0x85,0x00,0x00,0x00,0x86,0x00,0x00,0x00,
+0x00,0x00,0x00,0x00,0x87,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x88,0x00,0x00,0x00,
+0x00,0x00,0x00,0x00,0x89,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x8A,0x00,0x00,0x00,
+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+0xA0,0xA1,0xA2,0xA4,0xA5,0xA6,0xA7,0xA8,0xA9,0xAA,0xAB,0xAC,0xAD,0xAE,0xAF,0xB0,
+0xB1,0xB2,0xB4,0xB5,0xB6,0xB7,0xB8,0xB9,0xBA,0xBB,0xBC,0xBD,0xBE,0x00,0x00,0x00,
+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+0x8B,0x00,0x00,0x00,0x8C,0x00,0x00,0x00,0x8D,0x00,0x00,0x00,0x8E,0x00,0x00,0x00,
+0x8F,0x90,0x91,0x92,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+0x94};
+
+/* 2219-2265 , 77 chars */
+static uchar tab_uni_koi8_r_plane22[]={
+0x95,0x96,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x97,
+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x98,0x99};
+
+/* 2320-2321 , 2 chars */
+static uchar tab_uni_koi8_r_plane23[]={
+0x93,0x9B};
+
+
+static MY_UNI_IDX idx_uni_koi8_r[]={
+ {0x0000,0x00F7,tab_uni_koi8_r_plane00},
+ {0x0401,0x0451,tab_uni_koi8_r_plane04},
+ {0x2500,0x25A0,tab_uni_koi8_r_plane25},
+ {0x2219,0x2265,tab_uni_koi8_r_plane22},
+ {0x2320,0x2321,tab_uni_koi8_r_plane23},
+ {0,0,NULL}
+};
+
+#endif
+
+#ifdef HAVE_CHARSET_koi8_ukr
+
+/* The koi8_ukr character set. Generated automatically by
+ * the ./conf_to_src program
+ */
+
+static uchar ctype_koi8_ukr[] = {
+ 0,
+ 32, 32, 32, 32, 32, 32, 32, 32, 32, 40, 40, 40, 40, 40, 32, 32,
+ 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,
+ 72, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
+ 132,132,132,132,132,132,132,132,132,132, 16, 16, 16, 16, 16, 16,
+ 16,129,129,129,129,129,129, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 16, 16, 16, 16, 16,
+ 16,130,130,130,130,130,130, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 16, 16, 16, 16, 32,
+ 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
+ 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
+ 16, 16, 16, 2, 2, 16, 2, 2, 16, 16, 16, 16, 16, 2, 16, 16,
+ 16, 16, 16, 1, 1, 16, 1, 1, 16, 16, 16, 16, 16, 1, 16, 16,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1
+};
+
+static uchar to_lower_koi8_ukr[] = {
+ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
+ 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
+ 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47,
+ 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63,
+ 64, 97, 98, 99,100,101,102,103,104,105,106,107,108,109,110,111,
+ 112,113,114,115,116,117,118,119,120,121,122, 91, 92, 93, 94, 95,
+ 32, 97, 98, 99,100,101,102,103,104,105,106,107,108,109,110,111,
+ 112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,
+ 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,
+ 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,
+ 32, 32, 32,163,164, 32,166,167, 32, 32, 32, 32, 32,173, 32, 32,
+ 32, 32, 32,163,164, 32,166,167, 32, 32, 32, 32, 32,173, 32, 32,
+ 192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,
+ 208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,223,
+ 192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,
+ 208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,223
+};
+
+static uchar to_upper_koi8_ukr[] = {
+ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
+ 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
+ 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47,
+ 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63,
+ 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79,
+ 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95,
+ 32, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79,
+ 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90,123,124,125,126,127,
+ 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,
+ 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,
+ 32, 32, 32,179,180, 32,182,183, 32, 32, 32, 32, 32,189, 32, 32,
+ 32, 32, 32,179,180, 32,182,183, 32, 32, 32, 32, 32,189, 32, 32,
+ 224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,
+ 240,241,242,243,244,245,246,247,248,249,250,251,252,253,254,255,
+ 224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,
+ 240,241,242,243,244,245,246,247,248,249,250,251,252,253,254,255
+};
+
+static uchar sort_order_koi8_ukr[] = {
+ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
+ 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
+ 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47,
+ 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63,
+ 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79,
+ 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95,
+ 32, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79,
+ 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90,123,124,125,126,127,
+ 165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,
+ 181,182,183,184,185,186,187,188,189,190,191,192,193,194,195,196,
+ 197,198,199,136,135,200,140,141,201,202,203,204,205,132,206,207,
+ 208,209,210,136,135,211,140,141,212,213,214,215,216,132,217,218,
+ 163,128,129,155,133,134,153,131,154,139,142,143,144,145,146,147,
+ 148,164,149,150,151,152,137,130,161,160,138,157,162,158,156,159,
+ 163,128,129,155,133,134,153,131,154,139,142,143,144,145,146,147,
+ 148,164,149,150,151,152,137,130,161,160,138,157,162,158,156,159
+};
+
+static uint16 tab_koi8_u_uni[256]={
+ 0,0x0001,0x0002,0x0003,0x0004,0x0005,0x0006,0x0007,
+0x0008,0x0009,0x000A,0x000B,0x000C,0x000D,0x000E,0x000F,
+0x0010,0x0011,0x0012,0x0013,0x0014,0x0015,0x0016,0x0017,
+0x0018,0x0019,0x001A,0x001B,0x001C,0x001D,0x001E,0x001F,
+0x0020,0x0021,0x0022,0x0023,0x0024,0x0025,0x0026,0x0027,
+0x0028,0x0029,0x002A,0x002B,0x002C,0x002D,0x002E,0x002F,
+0x0030,0x0031,0x0032,0x0033,0x0034,0x0035,0x0036,0x0037,
+0x0038,0x0039,0x003A,0x003B,0x003C,0x003D,0x003E,0x003F,
+0x0040,0x0041,0x0042,0x0043,0x0044,0x0045,0x0046,0x0047,
+0x0048,0x0049,0x004A,0x004B,0x004C,0x004D,0x004E,0x004F,
+0x0050,0x0051,0x0052,0x0053,0x0054,0x0055,0x0056,0x0057,
+0x0058,0x0059,0x005A,0x005B,0x005C,0x005D,0x005E,0x005F,
+0x0060,0x0061,0x0062,0x0063,0x0064,0x0065,0x0066,0x0067,
+0x0068,0x0069,0x006A,0x006B,0x006C,0x006D,0x006E,0x006F,
+0x0070,0x0071,0x0072,0x0073,0x0074,0x0075,0x0076,0x0077,
+0x0078,0x0079,0x007A,0x007B,0x007C,0x007D,0x007E, 0,
+0x2500,0x2502,0x250C,0x2510,0x2514,0x2518,0x251C,0x2524,
+0x252C,0x2534,0x253C,0x2580,0x2584,0x2588,0x258C,0x2590,
+0x2591,0x2592,0x2593,0x2320,0x25A0,0x2022,0x221A,0x2248,
+0x2264,0x2265,0x00A0,0x2321,0x00B0,0x00B2,0x00B7,0x00F7,
+0x2550,0x2551,0x2552,0x0451,0x0454,0x2554,0x0456,0x0457,
+0x2557,0x2558,0x2559,0x255A,0x255B,0x0491,0x255D,0x255E,
+0x255F,0x2560,0x2561,0x0401,0x0404,0x2563,0x0406,0x0407,
+0x2566,0x2567,0x2568,0x2569,0x256A,0x0490,0x256C,0x00A9,
+0x044E,0x0430,0x0431,0x0446,0x0434,0x0435,0x0444,0x0433,
+0x0445,0x0438,0x0439,0x043A,0x043B,0x043C,0x043D,0x043E,
+0x043F,0x044F,0x0440,0x0441,0x0442,0x0443,0x0436,0x0432,
+0x044C,0x044B,0x0437,0x0448,0x044D,0x0449,0x0447,0x044A,
+0x042E,0x0410,0x0411,0x0426,0x0414,0x0415,0x0424,0x0413,
+0x0425,0x0418,0x0419,0x041A,0x041B,0x041C,0x041D,0x041E,
+0x041F,0x042F,0x0420,0x0421,0x0422,0x0423,0x0416,0x0412,
+0x042C,0x042B,0x0417,0x0428,0x042D,0x0429,0x0427,0x042A
+};
+
+
+/* 0000-00F7 , 248 chars */
+static uchar tab_uni_koi8_u_plane00[]={
+0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F,
+0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F,
+0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F,
+0x30,0x31,0x32,0x33,0x34,0x35,0x36,0x37,0x38,0x39,0x3A,0x3B,0x3C,0x3D,0x3E,0x3F,
+0x40,0x41,0x42,0x43,0x44,0x45,0x46,0x47,0x48,0x49,0x4A,0x4B,0x4C,0x4D,0x4E,0x4F,
+0x50,0x51,0x52,0x53,0x54,0x55,0x56,0x57,0x58,0x59,0x5A,0x5B,0x5C,0x5D,0x5E,0x5F,
+0x60,0x61,0x62,0x63,0x64,0x65,0x66,0x67,0x68,0x69,0x6A,0x6B,0x6C,0x6D,0x6E,0x6F,
+0x70,0x71,0x72,0x73,0x74,0x75,0x76,0x77,0x78,0x79,0x7A,0x7B,0x7C,0x7D,0x7E,0x00,
+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+0x9A,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xBF,0x00,0x00,0x00,0x00,0x00,0x00,
+0x9C,0x00,0x9D,0x00,0x00,0x00,0x00,0x9E,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x9F};
+
+/* 0401-0491 , 145 chars */
+static uchar tab_uni_koi8_u_plane04[]={
+0xB3,0x00,0x00,0xB4,0x00,0xB6,0xB7,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xE1,
+0xE2,0xF7,0xE7,0xE4,0xE5,0xF6,0xFA,0xE9,0xEA,0xEB,0xEC,0xED,0xEE,0xEF,0xF0,0xF2,
+0xF3,0xF4,0xF5,0xE6,0xE8,0xE3,0xFE,0xFB,0xFD,0xFF,0xF9,0xF8,0xFC,0xE0,0xF1,0xC1,
+0xC2,0xD7,0xC7,0xC4,0xC5,0xD6,0xDA,0xC9,0xCA,0xCB,0xCC,0xCD,0xCE,0xCF,0xD0,0xD2,
+0xD3,0xD4,0xD5,0xC6,0xC8,0xC3,0xDE,0xDB,0xDD,0xDF,0xD9,0xD8,0xDC,0xC0,0xD1,0x00,
+0xA3,0x00,0x00,0xA4,0x00,0xA6,0xA7,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xBD,
+0xAD};
+
+/* 2500-25A0 , 161 chars */
+static uchar tab_uni_koi8_u_plane25[]={
+0x80,0x00,0x81,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x82,0x00,0x00,0x00,
+0x83,0x00,0x00,0x00,0x84,0x00,0x00,0x00,0x85,0x00,0x00,0x00,0x86,0x00,0x00,0x00,
+0x00,0x00,0x00,0x00,0x87,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x88,0x00,0x00,0x00,
+0x00,0x00,0x00,0x00,0x89,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x8A,0x00,0x00,0x00,
+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+0xA0,0xA1,0xA2,0x00,0xA5,0x00,0x00,0xA8,0xA9,0xAA,0xAB,0xAC,0x00,0xAE,0xAF,0xB0,
+0xB1,0xB2,0x00,0xB5,0x00,0x00,0xB8,0xB9,0xBA,0xBB,0xBC,0x00,0xBE,0x00,0x00,0x00,
+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+0x8B,0x00,0x00,0x00,0x8C,0x00,0x00,0x00,0x8D,0x00,0x00,0x00,0x8E,0x00,0x00,0x00,
+0x8F,0x90,0x91,0x92,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+0x94};
+
+/* 221A-2265 , 76 chars */
+static uchar tab_uni_koi8_u_plane22[]={
+0x96,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x97,0x00,
+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x98,0x99};
+
+/* 2320-2321 , 2 chars */
+static uchar tab_uni_koi8_u_plane23[]={
+0x93,0x9B};
+
+/* 2022-2022 , 1 chars */
+static uchar tab_uni_koi8_u_plane20[]={
+0x95};
+
+
+static MY_UNI_IDX idx_uni_koi8_u[]={
+ {0x0000,0x00F7,tab_uni_koi8_u_plane00},
+ {0x0401,0x0491,tab_uni_koi8_u_plane04},
+ {0x2500,0x25A0,tab_uni_koi8_u_plane25},
+ {0x221A,0x2265,tab_uni_koi8_u_plane22},
+ {0x2320,0x2321,tab_uni_koi8_u_plane23},
+ {0x2022,0x2022,tab_uni_koi8_u_plane20},
+ {0,0,NULL}
+};
+
+#endif
+
+#ifdef HAVE_CHARSET_latin1
+
+/* The latin1 character set. Generated automatically by
+ * the ./conf_to_src program
+ */
+
+static uchar ctype_latin1[] = {
+ 0,
+ 32, 32, 32, 32, 32, 32, 32, 32, 32, 40, 40, 40, 40, 40, 32, 32,
+ 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,
+ 72, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
+ 132,132,132,132,132,132,132,132,132,132, 16, 16, 16, 16, 16, 16,
+ 16,129,129,129,129,129,129, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 16, 16, 16, 16, 16,
+ 16,130,130,130,130,130,130, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 16, 16, 16, 16, 32,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 72, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
+ 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 16, 1, 1, 1, 1, 1, 1, 1, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 16, 2, 2, 2, 2, 2, 2, 2, 2
+};
+
+static uchar to_lower_latin1[] = {
+ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
+ 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
+ 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47,
+ 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63,
+ 64, 97, 98, 99,100,101,102,103,104,105,106,107,108,109,110,111,
+ 112,113,114,115,116,117,118,119,120,121,122, 91, 92, 93, 94, 95,
+ 96, 97, 98, 99,100,101,102,103,104,105,106,107,108,109,110,111,
+ 112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,
+ 128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,
+ 144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,
+ 160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,
+ 176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,
+ 224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,
+ 240,241,242,243,244,245,246,215,248,249,250,251,252,253,254,223,
+ 224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,
+ 240,241,242,243,244,245,246,247,248,249,250,251,252,253,254,255
+};
+
+static uchar to_upper_latin1[] = {
+ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
+ 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
+ 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47,
+ 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63,
+ 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79,
+ 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95,
+ 96, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79,
+ 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90,123,124,125,126,127,
+ 128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,
+ 144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,
+ 160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,
+ 176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,
+ 192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,
+ 208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,223,
+ 192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,
+ 208,209,210,211,212,213,214,247,216,217,218,219,220,221,222,255
+};
+
+static uchar sort_order_latin1[] = {
+ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
+ 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
+ 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47,
+ 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63,
+ 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79,
+ 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95,
+ 96, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79,
+ 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90,123,124,125,126,127,
+ 128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,
+ 144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,
+ 160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,
+ 176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,
+ 65, 65, 65, 65, 92, 91, 92, 67, 69, 69, 69, 69, 73, 73, 73, 73,
+ 68, 78, 79, 79, 79, 79, 93,215,216, 85, 85, 85, 89, 89,222,223,
+ 65, 65, 65, 65, 92, 91, 92, 67, 69, 69, 69, 69, 73, 73, 73, 73,
+ 68, 78, 79, 79, 79, 79, 93,247,216, 85, 85, 85, 89, 89,222,255
+};
+#endif
+
+#ifdef HAVE_CHARSET_latin2
+
+/* The latin2 character set. Generated automatically by
+ * the ./conf_to_src program
+ */
+
+static uchar ctype_latin2[] = {
+ 0,
+ 32, 32, 32, 32, 32, 32, 32, 32, 32, 40, 40, 40, 40, 40, 32, 32,
+ 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,
+ 72, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
+ 132,132,132,132,132,132,132,132,132,132, 16, 16, 16, 16, 16, 16,
+ 16,129,129,129,129,129,129, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 16, 16, 16, 16, 16,
+ 16,130,130,130,130,130,130, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 16, 16, 16, 16, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 72, 1, 16, 1, 16, 1, 1, 16, 16, 1, 1, 1, 1, 16, 1, 1,
+ 16, 2, 16, 2, 16, 2, 2, 16, 16, 2, 2, 2, 2, 16, 2, 2,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 16, 1, 1, 1, 1, 1, 1, 16, 1, 1, 1, 1, 1, 1, 1, 16,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 16, 2, 2, 2, 2, 2, 2, 2, 16
+};
+
+static uchar to_lower_latin2[] = {
+ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
+ 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
+ 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47,
+ 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63,
+ 64, 97, 98, 99,100,101,102,103,104,105,106,107,108,109,110,111,
+ 112,113,114,115,116,117,118,119,120,121,122, 91, 92, 93, 94, 95,
+ 96, 97, 98, 99,100,101,102,103,104,105,106,107,108,109,110,111,
+ 112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,
+ 128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,
+ 144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,
+ 160,177,162,179,164,181,182,167,168,185,186,187,188,173,190,191,
+ 176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,
+ 224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,
+ 208,241,242,243,244,245,246,215,248,249,250,251,252,253,254,223,
+ 224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,
+ 240,241,242,243,244,245,246,247,248,249,250,251,252,253,254,255
+};
+
+static uchar to_upper_latin2[] = {
+ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
+ 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
+ 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47,
+ 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63,
+ 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79,
+ 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95,
+ 96, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79,
+ 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90,123,124,125,126,127,
+ 128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,
+ 144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,
+ 160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,
+ 176,161,178,163,180,165,166,183,184,169,170,171,172,189,174,175,
+ 192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,
+ 208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,223,
+ 192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,
+ 240,209,210,211,212,213,214,247,216,217,218,219,220,221,222,255
+};
+
+static uchar sort_order_latin2[] = {
+ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
+ 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
+ 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47,
+ 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63,
+ 64, 65, 68, 69, 72, 73, 75, 76, 77, 78, 79, 80, 81, 83, 84, 86,
+ 88, 89, 90, 91, 94, 95, 96, 97, 98, 99,100,104,105,106,107,108,
+ 109, 65, 68, 69, 72, 73, 75, 76, 77, 78, 79, 80, 81, 83, 84, 86,
+ 88, 89, 90, 91, 94, 95, 96, 97, 98, 99,100,110,111,112,113,255,
+ 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,
+ 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,
+ 255, 66,255, 82,255, 81, 92,255,255, 93, 91, 94,101,255,103,102,
+ 255, 66,255, 82,255, 81, 92,255,255, 93, 91, 94,101,255,103,102,
+ 90, 67, 67, 67, 67, 81, 70, 69, 71, 73, 74, 73, 73, 78, 78, 72,
+ 255, 85, 84, 87, 86, 86, 86,255, 90, 95, 95, 95, 95, 99, 94,255,
+ 90, 67, 67, 67, 67, 81, 70, 69, 71, 73, 74, 73, 73, 78, 78, 72,
+ 255, 85, 84, 87, 86, 86, 86,255, 90, 95, 95, 95, 95, 99, 94,255
+};
+#endif
+
+#ifdef HAVE_CHARSET_latin5
+
+/* The latin5 character set. Generated automatically by
+ * the ./conf_to_src program
+ */
+
+static uchar ctype_latin5[] = {
+ 0,
+ 32, 32, 32, 32, 32, 32, 32, 32, 32, 40, 40, 40, 40, 40, 32, 32,
+ 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,
+ 72, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
+ 132,132,132,132,132,132,132,132,132,132, 16, 16, 16, 16, 16, 16,
+ 16,129,129,129,129,129,129, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 16, 16, 16, 16, 16,
+ 16,130,130,130,130,130,130, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 16, 16, 16, 16, 32,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 72, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
+ 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 16, 1, 1, 1, 1, 1, 1, 1, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 16, 2, 2, 2, 2, 2, 2, 2, 2
+};
+
+static uchar to_lower_latin5[] = {
+ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
+ 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
+ 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47,
+ 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63,
+ 64, 97, 98, 99,100,101,102,103,104,253,106,107,108,109,110,111,
+ 112,113,114,115,116,117,118,119,120,121,122, 91, 92, 93, 94, 95,
+ 96, 97, 98, 99,100,101,102,103,104,105,106,107,108,109,110,111,
+ 112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,
+ 128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,
+ 144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,
+ 160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,
+ 176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,
+ 224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,
+ 240,241,242,243,244,245,246,215,248,249,250,251,252,105,254,223,
+ 224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,
+ 240,241,242,243,244,245,246,247,248,249,250,251,252,253,254,255
+};
+
+static uchar to_upper_latin5[] = {
+ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
+ 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
+ 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47,
+ 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63,
+ 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79,
+ 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95,
+ 96, 65, 66, 67, 68, 69, 70, 71, 72,221, 74, 75, 76, 77, 78, 79,
+ 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90,123,124,125,126,127,
+ 128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,
+ 144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,
+ 160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,
+ 176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,
+ 192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,
+ 208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,223,
+ 192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,
+ 208,209,210,211,212,213,214,247,216,217,218,219,220, 73,222,255
+};
+
+static uchar sort_order_latin5[] = {
+ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
+ 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
+ 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47,
+ 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63,
+ 64, 65, 66, 67, 69, 70, 71, 72, 74, 75, 77, 78, 79, 80, 81, 82,
+ 84, 85, 86, 87, 89, 90, 92, 93, 94, 95, 96, 97, 98, 99,100,101,
+ 102, 65, 66, 67, 69, 70, 71, 72, 74, 76, 77, 78, 79, 80, 81, 82,
+ 84, 85, 86, 87, 89, 90, 92, 93, 94, 95, 96,135,136,137,138,139,
+ 140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,
+ 156,157,158,159,160,161,162,163,164,165,166,167,168,169,170,171,
+ 172,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,
+ 188,189,190,191,192,193,194,195,196,197,198,199,200,201,202,203,
+ 204,205,206,207,208,209,210, 68,211,212,213,214,215,216,217,218,
+ 73,219,220,221,222,223, 83,224,225,226,227,228, 91, 76, 88,229,
+ 204,205,206,207,208,209,210, 68,211,212,213,214,215,216,217,218,
+ 73,219,220,221,222,223, 83,250,225,226,227,228, 91, 75, 88,255
+};
+
+static uint16 tab_8859_9_uni[256]={
+ 0,0x0001,0x0002,0x0003,0x0004,0x0005,0x0006,0x0007,
+0x0008,0x0009,0x000A,0x000B,0x000C,0x000D,0x000E,0x000F,
+0x0010,0x0011,0x0012,0x0013,0x0014,0x0015,0x0016,0x0017,
+0x0018,0x0019,0x001A,0x001B,0x001C,0x001D,0x001E,0x001F,
+0x0020,0x0021,0x0022,0x0023,0x0024,0x0025,0x0026,0x0027,
+0x0028,0x0029,0x002A,0x002B,0x002C,0x002D,0x002E,0x002F,
+0x0030,0x0031,0x0032,0x0033,0x0034,0x0035,0x0036,0x0037,
+0x0038,0x0039,0x003A,0x003B,0x003C,0x003D,0x003E,0x003F,
+0x0040,0x0041,0x0042,0x0043,0x0044,0x0045,0x0046,0x0047,
+0x0048,0x0049,0x004A,0x004B,0x004C,0x004D,0x004E,0x004F,
+0x0050,0x0051,0x0052,0x0053,0x0054,0x0055,0x0056,0x0057,
+0x0058,0x0059,0x005A,0x005B,0x005C,0x005D,0x005E,0x005F,
+0x0060,0x0061,0x0062,0x0063,0x0064,0x0065,0x0066,0x0067,
+0x0068,0x0069,0x006A,0x006B,0x006C,0x006D,0x006E,0x006F,
+0x0070,0x0071,0x0072,0x0073,0x0074,0x0075,0x0076,0x0077,
+0x0078,0x0079,0x007A,0x007B,0x007C,0x007D,0x007E, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+0x00A0,0x00A1,0x00A2,0x00A3,0x00A4,0x00A5,0x00A6,0x00A7,
+0x00A8,0x00A9,0x00AA,0x00AB,0x00AC,0x00AD,0x00AE,0x00AF,
+0x00B0,0x00B1,0x00B2,0x00B3,0x00B4,0x00B5,0x00B6,0x00B7,
+0x00B8,0x00B9,0x00BA,0x00BB,0x00BC,0x00BD,0x00BE,0x00BF,
+0x00C0,0x00C1,0x00C2,0x00C3,0x00C4,0x00C5,0x00C6,0x00C7,
+0x00C8,0x00C9,0x00CA,0x00CB,0x00CC,0x00CD,0x00CE,0x00CF,
+0x011E,0x00D1,0x00D2,0x00D3,0x00D4,0x00D5,0x00D6,0x00D7,
+0x00D8,0x00D9,0x00DA,0x00DB,0x00DC,0x0130,0x015E,0x00DF,
+0x00E0,0x00E1,0x00E2,0x00E3,0x00E4,0x00E5,0x00E6,0x00E7,
+0x00E8,0x00E9,0x00EA,0x00EB,0x00EC,0x00ED,0x00EE,0x00EF,
+0x011F,0x00F1,0x00F2,0x00F3,0x00F4,0x00F5,0x00F6,0x00F7,
+0x00F8,0x00F9,0x00FA,0x00FB,0x00FC,0x0131,0x015F,0x00FF
+};
+
+
+/* 0000-00FF , 256 chars */
+static uchar tab_uni_8859_9_plane00[]={
+0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F,
+0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F,
+0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F,
+0x30,0x31,0x32,0x33,0x34,0x35,0x36,0x37,0x38,0x39,0x3A,0x3B,0x3C,0x3D,0x3E,0x3F,
+0x40,0x41,0x42,0x43,0x44,0x45,0x46,0x47,0x48,0x49,0x4A,0x4B,0x4C,0x4D,0x4E,0x4F,
+0x50,0x51,0x52,0x53,0x54,0x55,0x56,0x57,0x58,0x59,0x5A,0x5B,0x5C,0x5D,0x5E,0x5F,
+0x60,0x61,0x62,0x63,0x64,0x65,0x66,0x67,0x68,0x69,0x6A,0x6B,0x6C,0x6D,0x6E,0x6F,
+0x70,0x71,0x72,0x73,0x74,0x75,0x76,0x77,0x78,0x79,0x7A,0x7B,0x7C,0x7D,0x7E,0x00,
+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+0xA0,0xA1,0xA2,0xA3,0xA4,0xA5,0xA6,0xA7,0xA8,0xA9,0xAA,0xAB,0xAC,0xAD,0xAE,0xAF,
+0xB0,0xB1,0xB2,0xB3,0xB4,0xB5,0xB6,0xB7,0xB8,0xB9,0xBA,0xBB,0xBC,0xBD,0xBE,0xBF,
+0xC0,0xC1,0xC2,0xC3,0xC4,0xC5,0xC6,0xC7,0xC8,0xC9,0xCA,0xCB,0xCC,0xCD,0xCE,0xCF,
+0x00,0xD1,0xD2,0xD3,0xD4,0xD5,0xD6,0xD7,0xD8,0xD9,0xDA,0xDB,0xDC,0x00,0x00,0xDF,
+0xE0,0xE1,0xE2,0xE3,0xE4,0xE5,0xE6,0xE7,0xE8,0xE9,0xEA,0xEB,0xEC,0xED,0xEE,0xEF,
+0x00,0xF1,0xF2,0xF3,0xF4,0xF5,0xF6,0xF7,0xF8,0xF9,0xFA,0xFB,0xFC,0x00,0x00,0xFF};
+
+/* 011E-015F , 66 chars */
+static uchar tab_uni_8859_9_plane01[]={
+0xD0,0xF0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+0x00,0x00,0xDD,0xFD,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+0xDE,0xFE};
+
+
+static MY_UNI_IDX idx_uni_8859_9[]={
+ {0x0000,0x00FF,tab_uni_8859_9_plane00},
+ {0x011E,0x015F,tab_uni_8859_9_plane01},
+ {0,0,NULL}
+};
+
+#endif
+
+#ifdef HAVE_CHARSET_swe7
+
+/* The swe7 character set. Generated automatically by
+ * the ./conf_to_src program
+ */
+
+static uchar ctype_swe7[] = {
+ 0,
+ 32, 32, 32, 32, 32, 32, 32, 32, 32, 40, 40, 40, 40, 40, 32, 32,
+ 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,
+ 72, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
+ 132,132,132,132,132,132,132,132,132,132, 16, 16, 16, 16, 16, 16,
+ 1,129,129,129,129,129,129, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 16,
+ 1,130,130,130,130,130,130, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 32,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
+};
+
+static uchar to_lower_swe7[] = {
+ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
+ 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
+ 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47,
+ 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63,
+ 96, 97, 98, 99,100,101,102,103,104,105,106,107,108,109,110,111,
+ 112,113,114,115,116,117,118,119,120,121,122,123,124,125,126, 95,
+ 96, 97, 98, 99,100,101,102,103,104,105,106,107,108,109,110,111,
+ 112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,
+ 128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,
+ 144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,
+ 160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,
+ 176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,
+ 192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,
+ 208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,223,
+ 224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,
+ 240,241,242,243,244,245,246,247,248,249,250,251,252,253,254,255
+};
+
+static uchar to_upper_swe7[] = {
+ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
+ 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
+ 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47,
+ 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63,
+ 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79,
+ 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95,
+ 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79,
+ 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94,127,
+ 128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,
+ 144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,
+ 160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,
+ 176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,
+ 192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,
+ 208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,223,
+ 224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,
+ 240,241,242,243,244,245,246,247,248,249,250,251,252,253,254,255
+};
+
+static uchar sort_order_swe7[] = {
+ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
+ 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
+ 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47,
+ 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63,
+ 69, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79,
+ 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 92, 93, 91, 89, 95,
+ 69, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79,
+ 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 92, 93, 91, 89,127,
+ 128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,
+ 144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,
+ 160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,
+ 176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,
+ 192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,
+ 208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,223,
+ 224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,
+ 240,241,242,243,244,245,246,247,248,249,250,251,252,253,254,255
+};
+#endif
+
+#ifdef HAVE_CHARSET_usa7
+
+/* The usa7 character set. Generated automatically by
+ * the ./conf_to_src program
+ */
+
+static uchar ctype_usa7[] = {
+ 0,
+ 32, 32, 32, 32, 32, 32, 32, 32, 32, 40, 40, 40, 40, 40, 32, 32,
+ 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,
+ 72, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
+ 132,132,132,132,132,132,132,132,132,132, 16, 16, 16, 16, 16, 16,
+ 16,129,129,129,129,129,129, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 16, 16, 16, 16, 16,
+ 16,130,130,130,130,130,130, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 16, 16, 16, 16, 32,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
+};
+
+static uchar to_lower_usa7[] = {
+ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
+ 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
+ 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47,
+ 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63,
+ 64, 97, 98, 99,100,101,102,103,104,105,106,107,108,109,110,111,
+ 112,113,114,115,116,117,118,119,120,121,122, 91, 92, 93, 94, 95,
+ 96, 97, 98, 99,100,101,102,103,104,105,106,107,108,109,110,111,
+ 112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,
+ 128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,
+ 144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,
+ 160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,
+ 176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,
+ 192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,
+ 208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,223,
+ 224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,
+ 240,241,242,243,244,245,246,247,248,249,250,251,252,253,254,255
+};
+
+static uchar to_upper_usa7[] = {
+ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
+ 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
+ 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47,
+ 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63,
+ 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79,
+ 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95,
+ 96, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79,
+ 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90,123,124,125,126,127,
+ 128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,
+ 144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,
+ 160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,
+ 176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,
+ 192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,
+ 208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,223,
+ 224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,
+ 240,241,242,243,244,245,246,247,248,249,250,251,252,253,254,255
+};
+
+static uchar sort_order_usa7[] = {
+ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
+ 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
+ 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47,
+ 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63,
+ 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79,
+ 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 92, 93, 91, 94, 95,
+ 69, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79,
+ 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90,123,124,125, 89,127,
+ 128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,
+ 144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,
+ 160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,
+ 176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,
+ 192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,
+ 208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,223,
+ 224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,
+ 240,241,242,243,244,245,246,247,248,249,250,251,252,253,254,255
+};
+
+static uint16 tab_us_ascii_uni[256]={
+ 0,0x0001,0x0002,0x0003,0x0004,0x0005,0x0006,0x0007,
+0x0008,0x0009,0x000A,0x000B,0x000C,0x000D,0x000E,0x000F,
+0x0010,0x0011,0x0012,0x0013,0x0014,0x0015,0x0016,0x0017,
+0x0018,0x0019,0x001A,0x001B,0x001C,0x001D,0x001E,0x001F,
+0x0020,0x0021,0x0022,0x0023,0x0024,0x0025,0x0026,0x0027,
+0x0028,0x0029,0x002A,0x002B,0x002C,0x002D,0x002E,0x002F,
+0x0030,0x0031,0x0032,0x0033,0x0034,0x0035,0x0036,0x0037,
+0x0038,0x0039,0x003A,0x003B,0x003C,0x003D,0x003E,0x003F,
+0x0040,0x0041,0x0042,0x0043,0x0044,0x0045,0x0046,0x0047,
+0x0048,0x0049,0x004A,0x004B,0x004C,0x004D,0x004E,0x004F,
+0x0050,0x0051,0x0052,0x0053,0x0054,0x0055,0x0056,0x0057,
+0x0058,0x0059,0x005A,0x005B,0x005C,0x005D,0x005E,0x005F,
+0x0060,0x0061,0x0062,0x0063,0x0064,0x0065,0x0066,0x0067,
+0x0068,0x0069,0x006A,0x006B,0x006C,0x006D,0x006E,0x006F,
+0x0070,0x0071,0x0072,0x0073,0x0074,0x0075,0x0076,0x0077,
+0x0078,0x0079,0x007A,0x007B,0x007C,0x007D,0x007E, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0
+};
+
+
+/* 0000-007E , 127 chars */
+static uchar tab_uni_us_ascii_plane00[]={
+0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F,
+0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F,
+0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F,
+0x30,0x31,0x32,0x33,0x34,0x35,0x36,0x37,0x38,0x39,0x3A,0x3B,0x3C,0x3D,0x3E,0x3F,
+0x40,0x41,0x42,0x43,0x44,0x45,0x46,0x47,0x48,0x49,0x4A,0x4B,0x4C,0x4D,0x4E,0x4F,
+0x50,0x51,0x52,0x53,0x54,0x55,0x56,0x57,0x58,0x59,0x5A,0x5B,0x5C,0x5D,0x5E,0x5F,
+0x60,0x61,0x62,0x63,0x64,0x65,0x66,0x67,0x68,0x69,0x6A,0x6B,0x6C,0x6D,0x6E,0x6F,
+0x70,0x71,0x72,0x73,0x74,0x75,0x76,0x77,0x78,0x79,0x7A,0x7B,0x7C,0x7D,0x7E};
+
+
+static MY_UNI_IDX idx_uni_us_ascii[]={
+ {0x0000,0x007E,tab_uni_us_ascii_plane00},
+ {0,0,NULL}
+};
+
+#endif
+
+#ifdef HAVE_CHARSET_win1250
+
+/* The win1250 character set. Generated automatically by
+ * the ./conf_to_src program
+ */
+
+static uchar ctype_win1250[] = {
+ 0,
+ 32, 32, 32, 32, 32, 32, 32, 32, 32, 40, 40, 40, 40, 40, 32, 32,
+ 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,
+ 72, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
+ 132,132,132,132,132,132,132,132,132,132, 16, 16, 16, 16, 16, 16,
+ 16,129,129,129,129,129,129, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 16, 16, 16, 16, 16,
+ 16,130,130,130,130,130,130, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 16, 16, 16, 16, 32,
+ 32, 32, 16, 32, 16, 16, 16, 16, 32, 16, 1, 16, 1, 1, 1, 1,
+ 32, 16, 16, 16, 16, 16, 16, 16, 32, 16, 2, 16, 2, 2, 2, 2,
+ 72, 16, 16, 1, 16, 1, 16, 1, 16, 16, 1, 16, 16, 16, 16, 1,
+ 16, 16, 16, 2, 16, 16, 16, 16, 16, 2, 2, 16, 1, 16, 2, 2,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 16, 1, 1, 1, 1, 1, 1, 1, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 16, 2, 2, 2, 2, 2, 2, 2, 16
+};
+
+static uchar to_lower_win1250[] = {
+ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
+ 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
+ 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47,
+ 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63,
+ 64, 97, 98, 99,100,101,102,103,104,105,106,107,108,109,110,111,
+ 112,113,114,115,116,117,118,119,120,121,122, 91, 92, 93, 94, 95,
+ 96, 97, 98, 99,100,101,102,103,104,105,106,107,108,109,110,111,
+ 112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,
+ 128,129,130,131,132,133,134,135,136,137,154,139,156,157,158,159,
+ 144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,
+ 160,161,162,179,164,185,166,223,168,169,186,171,172,173,174,191,
+ 176,177,178,179,180,181,182,183,184,185,186,187,190,189,190,191,
+ 224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,
+ 240,241,242,243,244,245,246,215,248,249,250,251,252,253,254,223,
+ 224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,
+ 240,241,242,243,244,245,246,247,248,249,250,251,252,253,254,255
+};
+
+static uchar to_upper_win1250[] = {
+ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
+ 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
+ 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47,
+ 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63,
+ 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79,
+ 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95,
+ 96, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79,
+ 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90,123,124,125,126,127,
+ 128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,
+ 144,145,146,147,148,149,150,151,152,153,138,155,140,141,142,143,
+ 160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,
+ 176,177,178,163,180,181,182,183,184,165,170,187,188,189,188,175,
+ 192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,
+ 208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,167,
+ 192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,
+ 208,209,210,211,212,213,214,247,216,217,218,219,220,221,222,255
+};
+
+static uchar sort_order_win1250[] = {
+ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
+ 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
+ 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47,
+ 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63,
+ 64, 65, 66, 67, 70, 73, 74, 75, 76, 77, 78, 79, 80, 82, 83, 85,
+ 86, 87, 88, 89, 91, 92, 93, 94, 95, 96, 97, 99,100,101,102,103,
+ 104, 65, 66, 67, 70, 73, 74, 75, 76, 77, 78, 79, 80, 82, 83, 85,
+ 86, 87, 88, 89, 91, 92, 93, 94, 95, 96, 97,123,124,125,126,127,
+ 128,129,130,131,132,133,134,135,136,137, 90,139, 90, 91, 98, 98,
+ 144,145,146,147,148,149,150,151,152,153, 90,155, 90, 91, 98, 98,
+ 32,161,162, 80,164, 65,166, 89,168,169, 89,171,172,173,174, 98,
+ 176,177,178, 80,180,181,182,183,184, 65, 89,187, 80,189, 80, 98,
+ 88, 65, 65, 65, 65, 80, 69, 67, 68, 73, 73, 73, 73, 77, 77, 70,
+ 71, 83, 83, 85, 85, 85, 85,215, 88, 92, 92, 92, 92, 96, 91, 89,
+ 88, 65, 65, 65, 65, 80, 69, 67, 68, 73, 73, 73, 73, 77, 77, 70,
+ 71, 83, 83, 85, 85, 85, 85,247, 88, 92, 92, 92, 92, 96, 91,255
+};
+#endif
+
+#if defined(HAVE_CHARSET_win1250)
+
+static uint16 tab_cp1250_uni[256]={
+ 0,0x0001,0x0002,0x0003,0x0004,0x0005,0x0006,0x0007,
+0x0008,0x0009,0x000A,0x000B,0x000C,0x000D,0x000E,0x000F,
+0x0010,0x0011,0x0012,0x0013,0x0014,0x0015,0x0016,0x0017,
+0x0018,0x0019,0x001A,0x001B,0x001C,0x001D,0x001E,0x001F,
+0x0020,0x0021,0x0022,0x0023,0x0024,0x0025,0x0026,0x0027,
+0x0028,0x0029,0x002A,0x002B,0x002C,0x002D,0x002E,0x002F,
+0x0030,0x0031,0x0032,0x0033,0x0034,0x0035,0x0036,0x0037,
+0x0038,0x0039,0x003A,0x003B,0x003C,0x003D,0x003E,0x003F,
+0x0040,0x0041,0x0042,0x0043,0x0044,0x0045,0x0046,0x0047,
+0x0048,0x0049,0x004A,0x004B,0x004C,0x004D,0x004E,0x004F,
+0x0050,0x0051,0x0052,0x0053,0x0054,0x0055,0x0056,0x0057,
+0x0058,0x0059,0x005A,0x005B,0x005C,0x005D,0x005E,0x005F,
+0x0060,0x0061,0x0062,0x0063,0x0064,0x0065,0x0066,0x0067,
+0x0068,0x0069,0x006A,0x006B,0x006C,0x006D,0x006E,0x006F,
+0x0070,0x0071,0x0072,0x0073,0x0074,0x0075,0x0076,0x0077,
+0x0078,0x0079,0x007A,0x007B,0x007C,0x007D,0x007E,0x007F,
+0x20AC, 0,0x201A, 0,0x201E,0x2026,0x2020,0x2021,
+ 0,0x2030,0x0160,0x2039,0x015A,0x0164,0x017D,0x0179,
+ 0,0x2018,0x2019,0x201C,0x201D,0x2022,0x2013,0x2014,
+ 0,0x2122,0x0161,0x203A,0x015B,0x0165,0x017E,0x017A,
+0x00A0,0x02C7,0x02D8,0x0141,0x00A4,0x0104,0x00A6,0x00A7,
+0x00A8,0x00A9,0x015E,0x00AB,0x00AC,0x00AD,0x00AE,0x017B,
+0x00B0,0x00B1,0x02DB,0x0142,0x00B4,0x00B5,0x00B6,0x00B7,
+0x00B8,0x0105,0x015F,0x00BB,0x013D,0x02DD,0x013E,0x017C,
+0x0154,0x00C1,0x00C2,0x0102,0x00C4,0x0139,0x0106,0x00C7,
+0x010C,0x00C9,0x0118,0x00CB,0x011A,0x00CD,0x00CE,0x010E,
+0x0110,0x0143,0x0147,0x00D3,0x00D4,0x0150,0x00D6,0x00D7,
+0x0158,0x016E,0x00DA,0x0170,0x00DC,0x00DD,0x0162,0x00DF,
+0x0155,0x00E1,0x00E2,0x0103,0x00E4,0x013A,0x0107,0x00E7,
+0x010D,0x00E9,0x0119,0x00EB,0x011B,0x00ED,0x00EE,0x010F,
+0x0111,0x0144,0x0148,0x00F3,0x00F4,0x0151,0x00F6,0x00F7,
+0x0159,0x016F,0x00FA,0x0171,0x00FC,0x00FD,0x0163,0x02D9
+};
+
+
+/* 0000-00FD , 254 chars */
+static uchar tab_uni_cp1250_plane00[]={
+0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F,
+0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F,
+0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F,
+0x30,0x31,0x32,0x33,0x34,0x35,0x36,0x37,0x38,0x39,0x3A,0x3B,0x3C,0x3D,0x3E,0x3F,
+0x40,0x41,0x42,0x43,0x44,0x45,0x46,0x47,0x48,0x49,0x4A,0x4B,0x4C,0x4D,0x4E,0x4F,
+0x50,0x51,0x52,0x53,0x54,0x55,0x56,0x57,0x58,0x59,0x5A,0x5B,0x5C,0x5D,0x5E,0x5F,
+0x60,0x61,0x62,0x63,0x64,0x65,0x66,0x67,0x68,0x69,0x6A,0x6B,0x6C,0x6D,0x6E,0x6F,
+0x70,0x71,0x72,0x73,0x74,0x75,0x76,0x77,0x78,0x79,0x7A,0x7B,0x7C,0x7D,0x7E,0x7F,
+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+0xA0,0x00,0x00,0x00,0xA4,0x00,0xA6,0xA7,0xA8,0xA9,0x00,0xAB,0xAC,0xAD,0xAE,0x00,
+0xB0,0xB1,0x00,0x00,0xB4,0xB5,0xB6,0xB7,0xB8,0x00,0x00,0xBB,0x00,0x00,0x00,0x00,
+0x00,0xC1,0xC2,0x00,0xC4,0x00,0x00,0xC7,0x00,0xC9,0x00,0xCB,0x00,0xCD,0xCE,0x00,
+0x00,0x00,0x00,0xD3,0xD4,0x00,0xD6,0xD7,0x00,0x00,0xDA,0x00,0xDC,0xDD,0x00,0xDF,
+0x00,0xE1,0xE2,0x00,0xE4,0x00,0x00,0xE7,0x00,0xE9,0x00,0xEB,0x00,0xED,0xEE,0x00,
+0x00,0x00,0x00,0xF3,0xF4,0x00,0xF6,0xF7,0x00,0x00,0xFA,0x00,0xFC,0xFD};
+
+/* 0102-017E , 125 chars */
+static uchar tab_uni_cp1250_plane01[]={
+0xC3,0xE3,0xA5,0xB9,0xC6,0xE6,0x00,0x00,0x00,0x00,0xC8,0xE8,0xCF,0xEF,0xD0,0xF0,
+0x00,0x00,0x00,0x00,0x00,0x00,0xCA,0xEA,0xCC,0xEC,0x00,0x00,0x00,0x00,0x00,0x00,
+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xC5,0xE5,0x00,0x00,0xBC,0xBE,0x00,0x00,0xA3,
+0xB3,0xD1,0xF1,0x00,0x00,0xD2,0xF2,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xD5,0xF5,
+0x00,0x00,0xC0,0xE0,0x00,0x00,0xD8,0xF8,0x8C,0x9C,0x00,0x00,0xAA,0xBA,0x8A,0x9A,
+0xDE,0xFE,0x8D,0x9D,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xD9,0xF9,0xDB,0xFB,
+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x8F,0x9F,0xAF,0xBF,0x8E,0x9E};
+
+/* 2013-20AC , 154 chars */
+static uchar tab_uni_cp1250_plane20[]={
+0x96,0x97,0x00,0x00,0x00,0x91,0x92,0x82,0x00,0x93,0x94,0x84,0x00,0x86,0x87,0x95,
+0x00,0x00,0x00,0x85,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x89,0x00,0x00,
+0x00,0x00,0x00,0x00,0x00,0x00,0x8B,0x9B,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80};
+
+/* 02C7-02DD , 23 chars */
+static uchar tab_uni_cp1250_plane02[]={
+0xA1,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+0x00,0xA2,0xFF,0x00,0xB2,0x00,0xBD};
+
+/* 2122-2122 , 1 chars */
+static uchar tab_uni_cp1250_plane21[]={
+0x99};
+
+
+static MY_UNI_IDX idx_uni_cp1250[]={
+ {0x0000,0x00FD,tab_uni_cp1250_plane00},
+ {0x0102,0x017E,tab_uni_cp1250_plane01},
+ {0x2013,0x20AC,tab_uni_cp1250_plane20},
+ {0x02C7,0x02DD,tab_uni_cp1250_plane02},
+ {0x2122,0x2122,tab_uni_cp1250_plane21},
+ {0,0,NULL}
+};
+
+#endif
+
+#ifdef HAVE_CHARSET_win1251
+
+/* The win1251 character set. Generated automatically by
+ * the ./conf_to_src program
+ */
+
+static uchar ctype_win1251[] = {
+ 0,
+ 32, 32, 32, 32, 32, 32, 32, 32, 32, 40, 40, 40, 40, 40, 32, 32,
+ 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,
+ 72, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
+ 132,132,132,132,132,132,132,132,132,132, 16, 16, 16, 16, 16, 16,
+ 16,129,129,129,129,129,129, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 16, 16, 16, 16, 16,
+ 16,130,130,130,130,130,130, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 16, 16, 16, 16, 32,
+ 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
+ 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
+ 16, 16, 16, 16, 16, 16, 16, 16, 1, 16, 16, 16, 16, 16, 16, 16,
+ 16, 16, 16, 16, 16, 16, 16, 16, 2, 16, 16, 16, 16, 16, 16, 16,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2
+};
+
+static uchar to_lower_win1251[] = {
+ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
+ 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
+ 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47,
+ 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63,
+ 64, 97, 98, 99,100,101,102,103,104,105,106,107,108,109,110,111,
+ 112,113,114,115,116,117,118,119,120,121,122, 91, 92, 93, 94, 95,
+ 96, 97, 98, 99,100,101,102,103,104,105,106,107,108,109,110,111,
+ 112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,
+ 128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,
+ 144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,
+ 160,161,162,163,164,165,166,167,184,169,170,171,172,173,174,175,
+ 176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,
+ 224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,
+ 240,241,242,243,244,245,245,247,248,249,250,251,252,253,254,255,
+ 224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,
+ 240,241,242,243,244,245,246,247,248,249,250,251,252,253,254,255
+};
+
+static uchar to_upper_win1251[] = {
+ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
+ 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
+ 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47,
+ 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63,
+ 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79,
+ 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95,
+ 96, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79,
+ 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90,123,124,125,126,127,
+ 128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,
+ 144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,
+ 160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,
+ 176,177,178,179,180,181,182,183,168,185,186,187,188,189,190,191,
+ 192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,
+ 208,209,210,211,212,213,213,215,216,217,218,219,220,221,222,223,
+ 192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,
+ 208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,223
+};
+
+static uchar sort_order_win1251[] = {
+ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
+ 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
+ 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47,
+ 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63,
+ 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79,
+ 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95,
+ 96, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79,
+ 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90,123,124,125,126,127,
+ 128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,
+ 144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,
+ 160,161,162,163,164,165,166,167,198,169,170,171,172,173,174,175,
+ 176,177,178,179,180,181,182,183,198,185,186,187,188,189,190,191,
+ 192,193,194,195,196,197,199,200,201,202,203,204,205,206,207,208,
+ 209,210,211,212,213,214,215,216,217,218,219,220,221,222,223,224,
+ 192,193,194,195,196,197,199,200,201,202,203,204,205,206,207,208,
+ 209,210,211,212,213,214,215,216,217,218,219,220,221,222,223,224
+};
+#endif
+
+#ifdef HAVE_CHARSET_win1251ukr
+
+/* The win1251ukr character set. Generated automatically by
+ * the ./conf_to_src program
+ */
+
+static uchar ctype_win1251ukr[] = {
+ 0,
+ 32, 32, 32, 32, 32, 32, 32, 32, 32, 40, 40, 40, 40, 40, 32, 32,
+ 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,
+ 72, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
+ 132,132,132,132,132,132,132,132,132,132, 16, 16, 16, 16, 16, 16,
+ 16,129,129,129,129,129,129, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 16, 16, 16, 16, 16,
+ 16,130,130,130,130,130,130, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 16, 16, 16, 16, 32,
+ 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
+ 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
+ 16, 16, 16, 16, 16, 16, 16, 16, 1, 16, 1, 16, 16, 16, 16, 1,
+ 16, 16, 1, 2, 16, 16, 16, 16, 2, 16, 2, 16, 16, 16, 16, 2,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2
+};
+
+static uchar to_lower_win1251ukr[] = {
+ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
+ 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
+ 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47,
+ 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63,
+ 64, 97, 98, 99,100,101,102,103,104,105,106,107,108,109,110,111,
+ 112,113,114,115,116,117,118,119,120,121,122, 91, 92, 93, 94, 95,
+ 32, 97, 98, 99,100,101,102,103,104,105,106,107,108,109,110,111,
+ 112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,
+ 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,
+ 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,
+ 32, 32, 32, 32, 32,165, 32, 32,168, 32,170, 32, 32, 32, 32,175,
+ 32, 32,178,178,165, 32, 32, 32,168, 32,170, 32, 32, 32, 32,175,
+ 192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,
+ 208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,223,
+ 192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,
+ 208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,223
+};
+
+static uchar to_upper_win1251ukr[] = {
+ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
+ 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
+ 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47,
+ 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63,
+ 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79,
+ 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95,
+ 32, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79,
+ 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90,123,124,125,126,127,
+ 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,
+ 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,
+ 32, 32, 32, 32, 32,180, 32, 32,184, 32,186, 32, 32, 32, 32,191,
+ 32, 32,179,179,180, 32, 32, 32,184, 32,186, 32, 32, 32, 32,191,
+ 224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,
+ 240,241,242,243,244,245,246,247,248,249,250,251,252,253,254,255,
+ 224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,
+ 240,241,242,243,244,245,246,247,248,249,250,251,252,253,254,255
+};
+
+static uchar sort_order_win1251ukr[] = {
+ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
+ 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
+ 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47,
+ 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63,
+ 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79,
+ 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95,
+ 32, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79,
+ 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90,123,124,125,126,127,
+ 165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,
+ 181,182,183,184,185,186,187,188,189,190,191,192,193,194,195,196,
+ 197,198,199,200,201,132,202,203,136,204,135,205,206,207,208,141,
+ 209,210,140,140,132,211,212,213,136,214,135,215,216,217,218,141,
+ 128,129,130,131,133,134,137,138,139,142,143,144,145,146,147,148,
+ 149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,
+ 128,129,130,131,133,134,137,138,139,142,143,144,145,146,147,148,
+ 149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164
+};
+#endif
+
+
+
+CHARSET_INFO compiled_charsets[] = {
+
+#ifdef HAVE_CHARSET_latin1
+ {
+ 8, /* number */
+ MY_CS_COMPILED|MY_CS_PRIMARY, /* state */
+ "latin1", /* cs name */
+ "latin1", /* name */
+ "", /* comment */
+ ctype_latin1,
+ to_lower_latin1,
+ to_upper_latin1,
+ sort_order_latin1,
+ tab_8859_1_uni, /* tab_to_uni */
+ idx_uni_8859_1, /* tab_from_uni */
+ 0, /* strxfrm_multiply */
+ my_strnncoll_simple,/* strnncoll */
+ my_strnxfrm_simple, /* strnxfrm */
+ my_like_range_simple,/* like_range */
+ my_wildcmp_8bit, /* wildcmp */
+ 1, /* mbmaxlen */
+ NULL, /* ismbchar */
+ NULL, /* ismbhead */
+ NULL, /* mbcharlen */
+ my_mb_wc_8bit, /* mb_wc */
+ my_wc_mb_8bit, /* wc_mb */
+ my_caseup_str_8bit,
+ my_casedn_str_8bit,
+ my_caseup_8bit,
+ my_casedn_8bit,
+ my_tosort_8bit,
+ my_strcasecmp_8bit,
+ my_strncasecmp_8bit,
+ my_hash_caseup_simple,
+ my_hash_sort_simple,
+ 0,
+ my_snprintf_8bit,
+ my_long10_to_str_8bit,
+ my_longlong10_to_str_8bit,
+ my_fill_8bit,
+ my_strntol_8bit,
+ my_strntoul_8bit,
+ my_strntoll_8bit,
+ my_strntoull_8bit,
+ my_strntod_8bit,
+ my_scan_8bit
+ },
+#endif
+
+
+#ifdef HAVE_CHARSET_cp1251
+ {
+ 14, /* number */
+ MY_CS_COMPILED, /* state */
+ "cp1251", /* cs name */
+ "cp1251", /* name */
+ "", /* comment */
+ ctype_cp1251,
+ to_lower_cp1251,
+ to_upper_cp1251,
+ sort_order_cp1251,
+ tab_cp1251_uni, /* tab_to_uni */
+ idx_uni_cp1251, /* tab_from_uni */
+ 0, /* strxfrm_multiply */
+ my_strnncoll_simple,/* strnncoll */
+ my_strnxfrm_simple, /* strnxfrm */
+ my_like_range_simple,/* like_range */
+ my_wildcmp_8bit, /* wildcmp */
+ 1, /* mbmaxlen */
+ NULL, /* ismbchar */
+ NULL, /* ismbhead */
+ NULL, /* mbcharlen */
+ my_mb_wc_8bit, /* mb_wc */
+ my_wc_mb_8bit, /* wc_mb */
+ my_caseup_str_8bit,
+ my_casedn_str_8bit,
+ my_caseup_8bit,
+ my_casedn_8bit,
+ my_tosort_8bit,
+ my_strcasecmp_8bit,
+ my_strncasecmp_8bit,
+ my_hash_caseup_simple,
+ my_hash_sort_simple,
+ 0,
+ my_snprintf_8bit,
+ my_long10_to_str_8bit,
+ my_longlong10_to_str_8bit,
+ my_fill_8bit,
+ my_strntol_8bit,
+ my_strntoul_8bit,
+ my_strntoll_8bit,
+ my_strntoull_8bit,
+ my_strntod_8bit,
+ my_scan_8bit
+ },
+#endif
+
+#ifdef HAVE_CHARSET_cp1257
+ {
+ 29, /* number */
+ MY_CS_COMPILED, /* state */
+ "cp1257", /* cs name */
+ "cp1257", /* name */
+ "", /* comment */
+ ctype_cp1257,
+ to_lower_cp1257,
+ to_upper_cp1257,
+ sort_order_cp1257,
+ tab_cp1257_uni, /* tab_to_uni */
+ idx_uni_cp1257, /* tab_from_uni */
+ 0, /* strxfrm_multiply */
+ my_strnncoll_simple,/* strnncoll */
+ my_strnxfrm_simple, /* strnxfrm */
+ my_like_range_simple,/* like_range */
+ my_wildcmp_8bit, /* wildcmp */
+ 1, /* mbmaxlen */
+ NULL, /* ismbchar */
+ NULL, /* ismbhead */
+ NULL, /* mbcharlen */
+ my_mb_wc_8bit, /* mb_wc */
+ my_wc_mb_8bit, /* wc_mb */
+ my_caseup_str_8bit,
+ my_casedn_str_8bit,
+ my_caseup_8bit,
+ my_casedn_8bit,
+ my_tosort_8bit,
+ my_strcasecmp_8bit,
+ my_strncasecmp_8bit,
+ my_hash_caseup_simple,
+ my_hash_sort_simple,
+ 0,
+ my_snprintf_8bit,
+ my_long10_to_str_8bit,
+ my_longlong10_to_str_8bit,
+ my_fill_8bit,
+ my_strntol_8bit,
+ my_strntoul_8bit,
+ my_strntoll_8bit,
+ my_strntoull_8bit,
+ my_strntod_8bit,
+ my_scan_8bit
+ },
+#endif
+
+#ifdef HAVE_CHARSET_croat
+ {
+ 27, /* number */
+ MY_CS_COMPILED, /* state */
+ "latin2", /* cs name */
+ "croat", /* name */
+ "", /* comment */
+ ctype_croat,
+ to_lower_croat,
+ to_upper_croat,
+ sort_order_croat,
+ tab_8859_2_uni, /* tab_to_uni */
+ idx_uni_8859_2, /* tab_from_uni */
+ 0, /* strxfrm_multiply */
+ my_strnncoll_simple,/* strnncoll */
+ my_strnxfrm_simple, /* strnxfrm */
+ my_like_range_simple,/* like_range */
+ my_wildcmp_8bit, /* wildcmp */
+ 1, /* mbmaxlen */
+ NULL, /* ismbchar */
+ NULL, /* ismbhead */
+ NULL, /* mbcharlen */
+ my_mb_wc_8bit, /* mb_wc */
+ my_wc_mb_8bit, /* wc_mb */
+ my_caseup_str_8bit,
+ my_casedn_str_8bit,
+ my_caseup_8bit,
+ my_casedn_8bit,
+ my_tosort_8bit,
+ my_strcasecmp_8bit,
+ my_strncasecmp_8bit,
+ my_hash_caseup_simple,
+ my_hash_sort_simple,
+ 0,
+ my_snprintf_8bit,
+ my_long10_to_str_8bit,
+ my_longlong10_to_str_8bit,
+ my_fill_8bit,
+ my_strntol_8bit,
+ my_strntoul_8bit,
+ my_strntoll_8bit,
+ my_strntoull_8bit,
+ my_strntod_8bit,
+ my_scan_8bit
+ },
+#endif
+
+
+#ifdef HAVE_CHARSET_danish
+ {
+ 15, /* number */
+ MY_CS_COMPILED, /* state */
+ "latin1", /* cs name */
+ "danish", /* name */
+ "", /* comment */
+ ctype_danish,
+ to_lower_danish,
+ to_upper_danish,
+ sort_order_danish,
+ tab_8859_1_uni, /* tab_to_uni */
+ idx_uni_8859_1, /* tab_from_uni */
+ 0, /* strxfrm_multiply */
+ my_strnncoll_simple,/* strnncoll */
+ my_strnxfrm_simple, /* strnxfrm */
+ my_like_range_simple,/* like_range */
+ my_wildcmp_8bit, /* wildcmp */
+ 1, /* mbmaxlen */
+ NULL, /* ismbchar */
+ NULL, /* ismbhead */
+ NULL, /* mbcharlen */
+ my_mb_wc_8bit, /* mb_wc */
+ my_wc_mb_8bit, /* wc_mb */
+ my_caseup_str_8bit,
+ my_casedn_str_8bit,
+ my_caseup_8bit,
+ my_casedn_8bit,
+ my_tosort_8bit,
+ my_strcasecmp_8bit,
+ my_strncasecmp_8bit,
+ my_hash_caseup_simple,
+ my_hash_sort_simple,
+ 0,
+ my_snprintf_8bit,
+ my_long10_to_str_8bit,
+ my_longlong10_to_str_8bit,
+ my_fill_8bit,
+ my_strntol_8bit,
+ my_strntoul_8bit,
+ my_strntoll_8bit,
+ my_strntoull_8bit,
+ my_strntod_8bit,
+ my_scan_8bit
+ },
+#endif
+
+#ifdef HAVE_CHARSET_dec8
+ {
+ 3, /* number */
+ MY_CS_COMPILED, /* state */
+ "dec8", /* cs name */
+ "dec8", /* name */
+ "", /* comment */
+ ctype_dec8,
+ to_lower_dec8,
+ to_upper_dec8,
+ sort_order_dec8,
+ NULL, /* tab_to_uni */
+ NULL, /* tab_from_uni */
+ 0, /* strxfrm_multiply */
+ my_strnncoll_simple,/* strnncoll */
+ my_strnxfrm_simple, /* strnxfrm */
+ my_like_range_simple,/* like_range */
+ my_wildcmp_8bit, /* wildcmp */
+ 1, /* mbmaxlen */
+ NULL, /* ismbchar */
+ NULL, /* ismbhead */
+ NULL, /* mbcharlen */
+ my_mb_wc_8bit, /* mb_wc */
+ my_wc_mb_8bit, /* wc_mb */
+ my_caseup_str_8bit,
+ my_casedn_str_8bit,
+ my_caseup_8bit,
+ my_casedn_8bit,
+ my_tosort_8bit,
+ my_strcasecmp_8bit,
+ my_strncasecmp_8bit,
+ my_hash_caseup_simple,
+ my_hash_sort_simple,
+ 0,
+ my_snprintf_8bit,
+ my_long10_to_str_8bit,
+ my_longlong10_to_str_8bit,
+ my_fill_8bit,
+ my_strntol_8bit,
+ my_strntoul_8bit,
+ my_strntoll_8bit,
+ my_strntoull_8bit,
+ my_strntod_8bit,
+ my_scan_8bit
+ },
+#endif
+
+#ifdef HAVE_CHARSET_dos
+ {
+ 4, /* number */
+ MY_CS_COMPILED, /* state */
+ "cp850", /* cs name */
+ "dos", /* name */
+ "", /* comment */
+ ctype_dos,
+ to_lower_dos,
+ to_upper_dos,
+ sort_order_dos,
+ NULL, /* tab_to_uni */
+ NULL, /* tab_from_uni */
+ 0, /* strxfrm_multiply */
+ my_strnncoll_simple,/* strnncoll */
+ my_strnxfrm_simple, /* strnxfrm */
+ my_like_range_simple,/* like_range */
+ my_wildcmp_8bit, /* wildcmp */
+ 1, /* mbmaxlen */
+ NULL, /* ismbchar */
+ NULL, /* ismbhead */
+ NULL, /* mbcharlen */
+ my_mb_wc_8bit, /* mb_wc */
+ my_wc_mb_8bit, /* wc_mb */
+ my_caseup_str_8bit,
+ my_casedn_str_8bit,
+ my_caseup_8bit,
+ my_casedn_8bit,
+ my_tosort_8bit,
+ my_strcasecmp_8bit,
+ my_strncasecmp_8bit,
+ my_hash_caseup_simple,
+ my_hash_sort_simple,
+ 0,
+ my_snprintf_8bit,
+ my_long10_to_str_8bit,
+ my_longlong10_to_str_8bit,
+ my_fill_8bit,
+ my_strntol_8bit,
+ my_strntoul_8bit,
+ my_strntoll_8bit,
+ my_strntoull_8bit,
+ my_strntod_8bit,
+ my_scan_8bit
+ },
+#endif
+
+#ifdef HAVE_CHARSET_estonia
+ {
+ 20, /* number */
+ MY_CS_COMPILED, /* state */
+ "latin7", /* cs name */
+ "estonia", /* name */
+ "", /* comment */
+ ctype_estonia,
+ to_lower_estonia,
+ to_upper_estonia,
+ sort_order_estonia,
+ NULL, /* tab_to_uni */
+ NULL, /* tab_from_uni */
+ 0, /* strxfrm_multiply */
+ my_strnncoll_simple,/* strnncoll */
+ my_strnxfrm_simple, /* strnxfrm */
+ my_like_range_simple,/* like_range */
+ my_wildcmp_8bit, /* wildcmp */
+ 1, /* mbmaxlen */
+ NULL, /* ismbchar */
+ NULL, /* ismbhead */
+ NULL, /* mbcharlen */
+ my_mb_wc_8bit, /* mb_wc */
+ my_wc_mb_8bit, /* wc_mb */
+ my_caseup_str_8bit,
+ my_casedn_str_8bit,
+ my_caseup_8bit,
+ my_casedn_8bit,
+ my_tosort_8bit,
+ my_strcasecmp_8bit,
+ my_strncasecmp_8bit,
+ my_hash_caseup_simple,
+ my_hash_sort_simple,
+ 0,
+ my_snprintf_8bit,
+ my_long10_to_str_8bit,
+ my_longlong10_to_str_8bit,
+ my_fill_8bit,
+ my_strntol_8bit,
+ my_strntoul_8bit,
+ my_strntoll_8bit,
+ my_strntoull_8bit,
+ my_strntod_8bit,
+ my_scan_8bit
+ },
+#endif
+
+
+#ifdef HAVE_CHARSET_german1
+ {
+ 5, /* number */
+ MY_CS_COMPILED, /* state */
+ "latin1", /* cs name */
+ "german1", /* name */
+ "", /* comment */
+ ctype_german1,
+ to_lower_german1,
+ to_upper_german1,
+ sort_order_german1,
+ tab_8859_1_uni, /* tab_to_uni */
+ idx_uni_8859_1, /* tab_from_uni */
+ 0, /* strxfrm_multiply */
+ my_strnncoll_simple,/* strnncoll */
+ my_strnxfrm_simple, /* strnxfrm */
+ my_like_range_simple,/* like_range */
+ my_wildcmp_8bit, /* wildcmp */
+ 1, /* mbmaxlen */
+ NULL, /* ismbchar */
+ NULL, /* ismbhead */
+ NULL, /* mbcharlen */
+ my_mb_wc_8bit, /* mb_wc */
+ my_wc_mb_8bit, /* wc_mb */
+ my_caseup_str_8bit,
+ my_casedn_str_8bit,
+ my_caseup_8bit,
+ my_casedn_8bit,
+ my_tosort_8bit,
+ my_strcasecmp_8bit,
+ my_strncasecmp_8bit,
+ my_hash_caseup_simple,
+ my_hash_sort_simple,
+ 0,
+ my_snprintf_8bit,
+ my_long10_to_str_8bit,
+ my_longlong10_to_str_8bit,
+ my_fill_8bit,
+ my_strntol_8bit,
+ my_strntoul_8bit,
+ my_strntoll_8bit,
+ my_strntoull_8bit,
+ my_strntod_8bit,
+ my_scan_8bit
+ },
+#endif
+
+#ifdef HAVE_CHARSET_greek
+ {
+ 25, /* number */
+ MY_CS_COMPILED, /* state */
+ "greek", /* cs name */
+ "greek", /* name */
+ "", /* comment */
+ ctype_greek,
+ to_lower_greek,
+ to_upper_greek,
+ sort_order_greek,
+ NULL, /* tab_to_uni */
+ NULL, /* tab_from_uni */
+ 0, /* strxfrm_multiply */
+ my_strnncoll_simple,/* strnncoll */
+ my_strnxfrm_simple, /* strnxfrm */
+ my_like_range_simple,/* like_range */
+ my_wildcmp_8bit, /* wildcmp */
+ 1, /* mbmaxlen */
+ NULL, /* ismbchar */
+ NULL, /* ismbhead */
+ NULL, /* mbcharlen */
+ my_mb_wc_8bit, /* mb_wc */
+ my_wc_mb_8bit, /* wc_mb */
+ my_caseup_str_8bit,
+ my_casedn_str_8bit,
+ my_caseup_8bit,
+ my_casedn_8bit,
+ my_tosort_8bit,
+ my_strcasecmp_8bit,
+ my_strncasecmp_8bit,
+ my_hash_caseup_simple,
+ my_hash_sort_simple,
+ 0,
+ my_snprintf_8bit,
+ my_long10_to_str_8bit,
+ my_longlong10_to_str_8bit,
+ my_fill_8bit,
+ my_strntol_8bit,
+ my_strntoul_8bit,
+ my_strntoll_8bit,
+ my_strntoull_8bit,
+ my_strntod_8bit,
+ my_scan_8bit
+ },
+#endif
+
+#ifdef HAVE_CHARSET_hebrew
+ {
+ 16, /* number */
+ MY_CS_COMPILED, /* state */
+ "hebrew", /* cs name */
+ "hebrew", /* name */
+ "", /* comment */
+ ctype_hebrew,
+ to_lower_hebrew,
+ to_upper_hebrew,
+ sort_order_hebrew,
+ NULL, /* tab_to_uni */
+ NULL, /* tab_from_uni */
+ 0, /* strxfrm_multiply */
+ my_strnncoll_simple,/* strnncoll */
+ my_strnxfrm_simple, /* strnxfrm */
+ my_like_range_simple,/* like_range */
+ my_wildcmp_8bit, /* wildcmp */
+ 1, /* mbmaxlen */
+ NULL, /* ismbchar */
+ NULL, /* ismbhead */
+ NULL, /* mbcharlen */
+ my_mb_wc_8bit, /* mb_wc */
+ my_wc_mb_8bit, /* wc_mb */
+ my_caseup_str_8bit,
+ my_casedn_str_8bit,
+ my_caseup_8bit,
+ my_casedn_8bit,
+ my_tosort_8bit,
+ my_strcasecmp_8bit,
+ my_strncasecmp_8bit,
+ my_hash_caseup_simple,
+ my_hash_sort_simple,
+ 0,
+ my_snprintf_8bit,
+ my_long10_to_str_8bit,
+ my_longlong10_to_str_8bit,
+ my_fill_8bit,
+ my_strntol_8bit,
+ my_strntoul_8bit,
+ my_strntoll_8bit,
+ my_strntoull_8bit,
+ my_strntod_8bit,
+ my_scan_8bit
+ },
+#endif
+
+#ifdef HAVE_CHARSET_hp8
+ {
+ 6, /* number */
+ MY_CS_COMPILED, /* state */
+ "hp8", /* cs name */
+ "hp8", /* name */
+ "", /* comment */
+ ctype_hp8,
+ to_lower_hp8,
+ to_upper_hp8,
+ sort_order_hp8,
+ NULL, /* tab_to_uni */
+ NULL, /* tab_from_uni */
+ 0, /* strxfrm_multiply */
+ my_strnncoll_simple,/* strnncoll */
+ my_strnxfrm_simple, /* strnxfrm */
+ my_like_range_simple,/* like_range */
+ my_wildcmp_8bit, /* wildcmp */
+ 1, /* mbmaxlen */
+ NULL, /* ismbchar */
+ NULL, /* ismbhead */
+ NULL, /* mbcharlen */
+ my_mb_wc_8bit, /* mb_wc */
+ my_wc_mb_8bit, /* wc_mb */
+ my_caseup_str_8bit,
+ my_casedn_str_8bit,
+ my_caseup_8bit,
+ my_casedn_8bit,
+ my_tosort_8bit,
+ my_strcasecmp_8bit,
+ my_strncasecmp_8bit,
+ my_hash_caseup_simple,
+ my_hash_sort_simple,
+ 0,
+ my_snprintf_8bit,
+ my_long10_to_str_8bit,
+ my_longlong10_to_str_8bit,
+ my_fill_8bit,
+ my_strntol_8bit,
+ my_strntoul_8bit,
+ my_strntoll_8bit,
+ my_strntoull_8bit,
+ my_strntod_8bit,
+ my_scan_8bit
+ },
+#endif
+
+#ifdef HAVE_CHARSET_hungarian
+ {
+ 21, /* number */
+ MY_CS_COMPILED, /* state */
+ "latin2", /* cs name */
+ "hungarian", /* name */
+ "", /* comment */
+ ctype_hungarian,
+ to_lower_hungarian,
+ to_upper_hungarian,
+ sort_order_hungarian,
+ tab_8859_2_uni, /* tab_to_uni */
+ idx_uni_8859_2, /* tab_from_uni */
+ 0, /* strxfrm_multiply */
+ my_strnncoll_simple,/* strnncoll */
+ my_strnxfrm_simple, /* strnxfrm */
+ my_like_range_simple,/* like_range */
+ my_wildcmp_8bit, /* wildcmp */
+ 1, /* mbmaxlen */
+ NULL, /* ismbchar */
+ NULL, /* ismbhead */
+ NULL, /* mbcharlen */
+ my_mb_wc_8bit, /* mb_wc */
+ my_wc_mb_8bit, /* wc_mb */
+ my_caseup_str_8bit,
+ my_casedn_str_8bit,
+ my_caseup_8bit,
+ my_casedn_8bit,
+ my_tosort_8bit,
+ my_strcasecmp_8bit,
+ my_strncasecmp_8bit,
+ my_hash_caseup_simple,
+ my_hash_sort_simple,
+ 0,
+ my_snprintf_8bit,
+ my_long10_to_str_8bit,
+ my_longlong10_to_str_8bit,
+ my_fill_8bit,
+ my_strntol_8bit,
+ my_strntoul_8bit,
+ my_strntoll_8bit,
+ my_strntoull_8bit,
+ my_strntod_8bit,
+ my_scan_8bit
+ },
+#endif
+
+#ifdef HAVE_CHARSET_koi8_ru
+ {
+ 7, /* number */
+ MY_CS_COMPILED, /* state */
+ "koi8r", /* cs name */
+ "koi8r", /* name */
+ "", /* comment */
+ ctype_koi8_ru,
+ to_lower_koi8_ru,
+ to_upper_koi8_ru,
+ sort_order_koi8_ru,
+ tab_koi8_r_uni, /* tab_to_uni */
+ idx_uni_koi8_r, /* tab_from_uni */
+ 0, /* strxfrm_multiply */
+ my_strnncoll_simple,/* strnncoll */
+ my_strnxfrm_simple, /* strnxfrm */
+ my_like_range_simple,/* like_range */
+ my_wildcmp_8bit, /* wildcmp */
+ 1, /* mbmaxlen */
+ NULL, /* ismbchar */
+ NULL, /* ismbhead */
+ NULL, /* mbcharlen */
+ my_mb_wc_8bit, /* mb_wc */
+ my_wc_mb_8bit, /* wc_mb */
+ my_caseup_str_8bit,
+ my_casedn_str_8bit,
+ my_caseup_8bit,
+ my_casedn_8bit,
+ my_tosort_8bit,
+ my_strcasecmp_8bit,
+ my_strncasecmp_8bit,
+ my_hash_caseup_simple,
+ my_hash_sort_simple,
+ 0,
+ my_snprintf_8bit,
+ my_long10_to_str_8bit,
+ my_longlong10_to_str_8bit,
+ my_fill_8bit,
+ my_strntol_8bit,
+ my_strntoul_8bit,
+ my_strntoll_8bit,
+ my_strntoull_8bit,
+ my_strntod_8bit,
+ my_scan_8bit
+ },
+#endif
+
+#ifdef HAVE_CHARSET_koi8_ukr
+ {
+ 22, /* number */
+ MY_CS_COMPILED, /* state */
+ "koi8u", /* cs name */
+ "koi8u", /* name */
+ "", /* comment */
+ ctype_koi8_ukr,
+ to_lower_koi8_ukr,
+ to_upper_koi8_ukr,
+ sort_order_koi8_ukr,
+ tab_koi8_u_uni, /* tab_to_uni */
+ idx_uni_koi8_u, /* tab_from_uni */
+ 0, /* strxfrm_multiply */
+ my_strnncoll_simple,/* strnncoll */
+ my_strnxfrm_simple, /* strnxfrm */
+ my_like_range_simple,/* like_range */
+ my_wildcmp_8bit, /* wildcmp */
+ 1, /* mbmaxlen */
+ NULL, /* ismbchar */
+ NULL, /* ismbhead */
+ NULL, /* mbcharlen */
+ my_mb_wc_8bit, /* mb_wc */
+ my_wc_mb_8bit, /* wc_mb */
+ my_caseup_str_8bit,
+ my_casedn_str_8bit,
+ my_caseup_8bit,
+ my_casedn_8bit,
+ my_tosort_8bit,
+ my_strcasecmp_8bit,
+ my_strncasecmp_8bit,
+ my_hash_caseup_simple,
+ my_hash_sort_simple,
+ 0,
+ my_snprintf_8bit,
+ my_long10_to_str_8bit,
+ my_longlong10_to_str_8bit,
+ my_fill_8bit,
+ my_strntol_8bit,
+ my_strntoul_8bit,
+ my_strntoll_8bit,
+ my_strntoull_8bit,
+ my_strntod_8bit,
+ my_scan_8bit
+ },
+#endif
+
+
+#ifdef HAVE_CHARSET_latin2
+ {
+ 9, /* number */
+ MY_CS_COMPILED, /* state */
+ "latin2", /* cs name */
+ "latin2", /* name */
+ "", /* comment */
+ ctype_latin2,
+ to_lower_latin2,
+ to_upper_latin2,
+ sort_order_latin2,
+ tab_8859_2_uni, /* tab_to_uni */
+ idx_uni_8859_2, /* tab_from_uni */
+ 0, /* strxfrm_multiply */
+ my_strnncoll_simple,/* strnncoll */
+ my_strnxfrm_simple, /* strnxfrm */
+ my_like_range_simple,/* like_range */
+ my_wildcmp_8bit, /* wildcmp */
+ 1, /* mbmaxlen */
+ NULL, /* ismbchar */
+ NULL, /* ismbhead */
+ NULL, /* mbcharlen */
+ my_mb_wc_8bit, /* mb_wc */
+ my_wc_mb_8bit, /* wc_mb */
+ my_caseup_str_8bit,
+ my_casedn_str_8bit,
+ my_caseup_8bit,
+ my_casedn_8bit,
+ my_tosort_8bit,
+ my_strcasecmp_8bit,
+ my_strncasecmp_8bit,
+ my_hash_caseup_simple,
+ my_hash_sort_simple,
+ 0,
+ my_snprintf_8bit,
+ my_long10_to_str_8bit,
+ my_longlong10_to_str_8bit,
+ my_fill_8bit,
+ my_strntol_8bit,
+ my_strntoul_8bit,
+ my_strntoll_8bit,
+ my_strntoull_8bit,
+ my_strntod_8bit,
+ my_scan_8bit
+ },
+#endif
+
+#ifdef HAVE_CHARSET_latin5
+ {
+ 30, /* number */
+ MY_CS_COMPILED, /* state */
+ "latin5", /* cs name */
+ "latin5", /* name */
+ "", /* comment */
+ ctype_latin5,
+ to_lower_latin5,
+ to_upper_latin5,
+ sort_order_latin5,
+ tab_8859_9_uni, /* tab_to_uni */
+ idx_uni_8859_9, /* tab_from_uni */
+ 0, /* strxfrm_multiply */
+ my_strnncoll_simple,/* strnncoll */
+ my_strnxfrm_simple, /* strnxfrm */
+ my_like_range_simple,/* like_range */
+ my_wildcmp_8bit, /* wildcmp */
+ 1, /* mbmaxlen */
+ NULL, /* ismbchar */
+ NULL, /* ismbhead */
+ NULL, /* mbcharlen */
+ my_mb_wc_8bit, /* mb_wc */
+ my_wc_mb_8bit, /* wc_mb */
+ my_caseup_str_8bit,
+ my_casedn_str_8bit,
+ my_caseup_8bit,
+ my_casedn_8bit,
+ my_tosort_8bit,
+ my_strcasecmp_8bit,
+ my_strncasecmp_8bit,
+ my_hash_caseup_simple,
+ my_hash_sort_simple,
+ 0,
+ my_snprintf_8bit,
+ my_long10_to_str_8bit,
+ my_longlong10_to_str_8bit,
+ my_fill_8bit,
+ my_strntol_8bit,
+ my_strntoul_8bit,
+ my_strntoll_8bit,
+ my_strntoull_8bit,
+ my_strntod_8bit,
+ my_scan_8bit
+ },
+#endif
+
+
+#ifdef HAVE_CHARSET_swe7
+ {
+ 10, /* number */
+ MY_CS_COMPILED, /* state */
+ "swe7", /* cs name */
+ "swe7", /* name */
+ "", /* comment */
+ ctype_swe7,
+ to_lower_swe7,
+ to_upper_swe7,
+ sort_order_swe7,
+ NULL, /* tab_to_uni */
+ NULL, /* tab_from_uni */
+ 0, /* strxfrm_multiply */
+ my_strnncoll_simple,/* strnncoll */
+ my_strnxfrm_simple, /* strnxfrm */
+ my_like_range_simple,/* like_range */
+ my_wildcmp_8bit, /* wildcmp */
+ 1, /* mbmaxlen */
+ NULL, /* ismbchar */
+ NULL, /* ismbhead */
+ NULL, /* mbcharlen */
+ my_mb_wc_8bit, /* mb_wc */
+ my_wc_mb_8bit, /* wc_mb */
+ my_caseup_str_8bit,
+ my_casedn_str_8bit,
+ my_caseup_8bit,
+ my_casedn_8bit,
+ my_tosort_8bit,
+ my_strcasecmp_8bit,
+ my_strncasecmp_8bit,
+ my_hash_caseup_simple,
+ my_hash_sort_simple,
+ 0,
+ my_snprintf_8bit,
+ my_long10_to_str_8bit,
+ my_longlong10_to_str_8bit,
+ my_fill_8bit,
+ my_strntol_8bit,
+ my_strntoul_8bit,
+ my_strntoll_8bit,
+ my_strntoull_8bit,
+ my_strntod_8bit,
+ my_scan_8bit
+ },
+#endif
+
+
+#ifdef HAVE_CHARSET_usa7
+ {
+ 11, /* number */
+ MY_CS_COMPILED, /* state */
+ "ascii", /* cs name */
+ "ascii", /* name */
+ "", /* comment */
+ ctype_usa7,
+ to_lower_usa7,
+ to_upper_usa7,
+ sort_order_usa7,
+ tab_us_ascii_uni, /* tab_to_uni */
+ idx_uni_us_ascii, /* tab_from_uni */
+ 0, /* strxfrm_multiply */
+ my_strnncoll_simple,/* strnncoll */
+ my_strnxfrm_simple, /* strnxfrm */
+ my_like_range_simple,/* like_range */
+ my_wildcmp_8bit, /* wildcmp */
+ 1, /* mbmaxlen */
+ NULL, /* ismbchar */
+ NULL, /* ismbhead */
+ NULL, /* mbcharlen */
+ my_mb_wc_8bit, /* mb_wc */
+ my_wc_mb_8bit, /* wc_mb */
+ my_caseup_str_8bit,
+ my_casedn_str_8bit,
+ my_caseup_8bit,
+ my_casedn_8bit,
+ my_tosort_8bit,
+ my_strcasecmp_8bit,
+ my_strncasecmp_8bit,
+ my_hash_caseup_simple,
+ my_hash_sort_simple,
+ 0,
+ my_snprintf_8bit,
+ my_long10_to_str_8bit,
+ my_longlong10_to_str_8bit,
+ my_fill_8bit,
+ my_strntol_8bit,
+ my_strntoul_8bit,
+ my_strntoll_8bit,
+ my_strntoull_8bit,
+ my_strntod_8bit,
+ my_scan_8bit
+ },
+#endif
+
+#ifdef HAVE_CHARSET_win1250
+ {
+ 26, /* number */
+ MY_CS_COMPILED, /* state */
+ "cp1250", /* cs name */
+ "cp1250", /* name */
+ "", /* comment */
+ ctype_win1250,
+ to_lower_win1250,
+ to_upper_win1250,
+ sort_order_win1250,
+ tab_cp1250_uni, /* tab_to_uni */
+ idx_uni_cp1250, /* tab_from_uni */
+ 0, /* strxfrm_multiply */
+ my_strnncoll_simple,/* strnncoll */
+ my_strnxfrm_simple, /* strnxfrm */
+ my_like_range_simple,/* like_range */
+ my_wildcmp_8bit, /* wildcmp */
+ 1, /* mbmaxlen */
+ NULL, /* ismbchar */
+ NULL, /* ismbhead */
+ NULL, /* mbcharlen */
+ my_mb_wc_8bit, /* mb_wc */
+ my_wc_mb_8bit, /* wc_mb */
+ my_caseup_str_8bit,
+ my_casedn_str_8bit,
+ my_caseup_8bit,
+ my_casedn_8bit,
+ my_tosort_8bit,
+ my_strcasecmp_8bit,
+ my_strncasecmp_8bit,
+ my_hash_caseup_simple,
+ my_hash_sort_simple,
+ 0,
+ my_snprintf_8bit,
+ my_long10_to_str_8bit,
+ my_longlong10_to_str_8bit,
+ my_fill_8bit,
+ my_strntol_8bit,
+ my_strntoul_8bit,
+ my_strntoll_8bit,
+ my_strntoull_8bit,
+ my_strntod_8bit,
+ my_scan_8bit
+ },
+#endif
+
+#ifdef HAVE_CHARSET_win1251ukr
+ {
+ 23, /* number */
+ MY_CS_COMPILED, /* state */
+ "cp1251", /* cs name */
+ "win1251ukr", /* name */
+ "", /* comment */
+ ctype_win1251ukr,
+ to_lower_win1251ukr,
+ to_upper_win1251ukr,
+ sort_order_win1251ukr,
+ tab_cp1251_uni, /* tab_to_uni */
+ idx_uni_cp1251, /* tab_from_uni */
+ 0, /* strxfrm_multiply */
+ my_strnncoll_simple,/* strnncoll */
+ my_strnxfrm_simple, /* strnxfrm */
+ my_like_range_simple,/* like_range */
+ my_wildcmp_8bit, /* wildcmp */
+ 1, /* mbmaxlen */
+ NULL, /* ismbchar */
+ NULL, /* ismbhead */
+ NULL, /* mbcharlen */
+ my_mb_wc_8bit, /* mb_wc */
+ my_wc_mb_8bit, /* wc_mb */
+ my_caseup_str_8bit,
+ my_casedn_str_8bit,
+ my_caseup_8bit,
+ my_casedn_8bit,
+ my_strcasecmp_8bit,
+ my_tosort_8bit,
+ my_strncasecmp_8bit,
+ my_hash_caseup_simple,
+ my_hash_sort_simple,
+ 0,
+ my_snprintf_8bit,
+ my_long10_to_str_8bit,
+ my_longlong10_to_str_8bit,
+ my_fill_8bit,
+ my_strntol_8bit,
+ my_strntoul_8bit,
+ my_strntoll_8bit,
+ my_strntoull_8bit,
+ my_strntod_8bit,
+ my_scan_8bit
+ },
+#endif
+
+#ifdef HAVE_CHARSET_armscii8
+ {
+ 32, /* number */
+ MY_CS_COMPILED, /* state */
+ "armscii8", /* cs name */
+ "armscii8", /* name */
+ "", /* comment */
+ ctype_armscii8,
+ to_lower_armscii8,
+ to_upper_armscii8,
+ sort_order_armscii8,
+ tab_armscii_8_uni, /* tab_to_uni */
+ idx_uni_armscii_8, /* tab_from_uni */
+ 0, /* strxfrm_multiply */
+ my_strnncoll_simple,/* strnncoll */
+ my_strnxfrm_simple, /* strnxfrm */
+ my_like_range_simple,/* like_range */
+ my_wildcmp_8bit, /* wildcmp */
+ 1, /* mbmaxlen */
+ NULL, /* ismbchar */
+ NULL, /* ismbhead */
+ NULL, /* mbcharlen */
+ my_mb_wc_8bit, /* mb_wc */
+ my_wc_mb_8bit, /* wc_mb */
+ my_caseup_str_8bit,
+ my_casedn_str_8bit,
+ my_caseup_8bit,
+ my_casedn_8bit,
+ my_tosort_8bit,
+ my_strcasecmp_8bit,
+ my_strncasecmp_8bit,
+ my_hash_caseup_simple,
+ my_hash_sort_simple,
+ 0,
+ my_snprintf_8bit,
+ my_long10_to_str_8bit,
+ my_longlong10_to_str_8bit,
+ my_fill_8bit,
+ my_strntol_8bit,
+ my_strntoul_8bit,
+ my_strntoll_8bit,
+ my_strntoull_8bit,
+ my_strntod_8bit,
+ my_scan_8bit
+ },
+#endif
+
+#ifdef HAVE_CHARSET_win1251
+ {
+ 17, /* number */
+ MY_CS_COMPILED, /* state */
+ "cp1251", /* cs name */
+ "win1251", /* name */
+ "", /* comment */
+ ctype_win1251,
+ to_lower_win1251,
+ to_upper_win1251,
+ sort_order_win1251,
+ tab_cp1251_uni, /* tab_to_uni */
+ idx_uni_cp1251, /* tab_from_uni */
+ 0, /* strxfrm_multiply */
+ my_strnncoll_simple,/* strnncoll */
+ my_strnxfrm_simple, /* strnxfrm */
+ my_like_range_simple,/* like_range */
+ my_wildcmp_8bit, /* wildcmp */
+ 1, /* mbmaxlen */
+ NULL, /* ismbchar */
+ NULL, /* ismbhead */
+ NULL, /* mbcharlen */
+ my_mb_wc_8bit, /* mb_wc */
+ my_wc_mb_8bit, /* wc_mb */
+ my_caseup_str_8bit,
+ my_casedn_str_8bit,
+ my_caseup_8bit,
+ my_casedn_8bit,
+ my_tosort_8bit,
+ my_strcasecmp_8bit,
+ my_strncasecmp_8bit,
+ my_hash_caseup_simple,
+ my_hash_sort_simple,
+ 0,
+ my_snprintf_8bit,
+ my_long10_to_str_8bit,
+ my_longlong10_to_str_8bit,
+ my_fill_8bit,
+ my_strntol_8bit,
+ my_strntoul_8bit,
+ my_strntoll_8bit,
+ my_strntoull_8bit,
+ my_strntod_8bit,
+ my_scan_8bit
+ },
+#endif
+
+ {
+ 0, /* end-of-list marker */
+ 0, /* state */
+ NullS, /* cs name */
+ NullS, /* name */
+ NullS, /* comment */
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL, /* tab_to_uni */
+ NULL, /* tab_from_uni */
+ 0,
+ NULL, /* strnncoll */
+ NULL, /* strnxfrm */
+ NULL, /* like_range */
+ NULL, /* wildcmp */
+ 0,
+ NULL,
+ NULL,
+ NULL,
+
+ NULL, /* mb_wc */
+ NULL, /* wc_mb */
+
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL, /* hash_caseup */
+ NULL, /* hash_sort */
+ 0,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL
+ }
+};
diff --git a/strings/ctype-gb2312.c b/strings/ctype-gb2312.c
index b01053866be..c0baca808cb 100644
--- a/strings/ctype-gb2312.c
+++ b/strings/ctype-gb2312.c
@@ -5726,6 +5726,7 @@ CHARSET_INFO my_charset_gb2312 =
my_snprintf_8bit,
my_long10_to_str_8bit,
my_longlong10_to_str_8bit,
+ my_fill_8bit,
my_strntol_8bit,
my_strntoul_8bit,
my_strntoll_8bit,
diff --git a/strings/ctype-gbk.c b/strings/ctype-gbk.c
index c65c9f2123e..5db91d09cc8 100644
--- a/strings/ctype-gbk.c
+++ b/strings/ctype-gbk.c
@@ -9913,6 +9913,7 @@ CHARSET_INFO my_charset_gbk =
my_snprintf_8bit,
my_long10_to_str_8bit,
my_longlong10_to_str_8bit,
+ my_fill_8bit,
my_strntol_8bit,
my_strntoul_8bit,
my_strntoll_8bit,
diff --git a/strings/ctype-latin1.c b/strings/ctype-latin1.c
new file mode 100644
index 00000000000..ac1e6dcdc18
--- /dev/null
+++ b/strings/ctype-latin1.c
@@ -0,0 +1,222 @@
+/* Copyright (C) 2000 MySQL AB
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
+
+#include <my_global.h>
+#include "m_string.h"
+#include "m_ctype.h"
+
+
+static my_wc_t latin1_uni[256]={
+ 0,0x0001,0x0002,0x0003,0x0004,0x0005,0x0006,0x0007,
+0x0008,0x0009,0x000A,0x000B,0x000C,0x000D,0x000E,0x000F,
+0x0010,0x0011,0x0012,0x0013,0x0014,0x0015,0x0016,0x0017,
+0x0018,0x0019,0x001A,0x001B,0x001C,0x001D,0x001E,0x001F,
+0x0020,0x0021,0x0022,0x0023,0x0024,0x0025,0x0026,0x0027,
+0x0028,0x0029,0x002A,0x002B,0x002C,0x002D,0x002E,0x002F,
+0x0030,0x0031,0x0032,0x0033,0x0034,0x0035,0x0036,0x0037,
+0x0038,0x0039,0x003A,0x003B,0x003C,0x003D,0x003E,0x003F,
+0x0040,0x0041,0x0042,0x0043,0x0044,0x0045,0x0046,0x0047,
+0x0048,0x0049,0x004A,0x004B,0x004C,0x004D,0x004E,0x004F,
+0x0050,0x0051,0x0052,0x0053,0x0054,0x0055,0x0056,0x0057,
+0x0058,0x0059,0x005A,0x005B,0x005C,0x005D,0x005E,0x005F,
+0x0060,0x0061,0x0062,0x0063,0x0064,0x0065,0x0066,0x0067,
+0x0068,0x0069,0x006A,0x006B,0x006C,0x006D,0x006E,0x006F,
+0x0070,0x0071,0x0072,0x0073,0x0074,0x0075,0x0076,0x0077,
+0x0078,0x0079,0x007A,0x007B,0x007C,0x007D,0x007E, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+0x00A0,0x00A1,0x00A2,0x00A3,0x00A4,0x00A5,0x00A6,0x00A7,
+0x00A8,0x00A9,0x00AA,0x00AB,0x00AC,0x00AD,0x00AE,0x00AF,
+0x00B0,0x00B1,0x00B2,0x00B3,0x00B4,0x00B5,0x00B6,0x00B7,
+0x00B8,0x00B9,0x00BA,0x00BB,0x00BC,0x00BD,0x00BE,0x00BF,
+0x00C0,0x00C1,0x00C2,0x00C3,0x00C4,0x00C5,0x00C6,0x00C7,
+0x00C8,0x00C9,0x00CA,0x00CB,0x00CC,0x00CD,0x00CE,0x00CF,
+0x00D0,0x00D1,0x00D2,0x00D3,0x00D4,0x00D5,0x00D6,0x00D7,
+0x00D8,0x00D9,0x00DA,0x00DB,0x00DC,0x00DD,0x00DE,0x00DF,
+0x00E0,0x00E1,0x00E2,0x00E3,0x00E4,0x00E5,0x00E6,0x00E7,
+0x00E8,0x00E9,0x00EA,0x00EB,0x00EC,0x00ED,0x00EE,0x00EF,
+0x00F0,0x00F1,0x00F2,0x00F3,0x00F4,0x00F5,0x00F6,0x00F7,
+0x00F8,0x00F9,0x00FA,0x00FB,0x00FC,0x00FD,0x00FE,0x00FF
+};
+
+static uchar uni_latin1[]={
+0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F,
+0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F,
+0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F,
+0x30,0x31,0x32,0x33,0x34,0x35,0x36,0x37,0x38,0x39,0x3A,0x3B,0x3C,0x3D,0x3E,0x3F,
+0x40,0x41,0x42,0x43,0x44,0x45,0x46,0x47,0x48,0x49,0x4A,0x4B,0x4C,0x4D,0x4E,0x4F,
+0x50,0x51,0x52,0x53,0x54,0x55,0x56,0x57,0x58,0x59,0x5A,0x5B,0x5C,0x5D,0x5E,0x5F,
+0x60,0x61,0x62,0x63,0x64,0x65,0x66,0x67,0x68,0x69,0x6A,0x6B,0x6C,0x6D,0x6E,0x6F,
+0x70,0x71,0x72,0x73,0x74,0x75,0x76,0x77,0x78,0x79,0x7A,0x7B,0x7C,0x7D,0x7E,0x00,
+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+0xA0,0xA1,0xA2,0xA3,0xA4,0xA5,0xA6,0xA7,0xA8,0xA9,0xAA,0xAB,0xAC,0xAD,0xAE,0xAF,
+0xB0,0xB1,0xB2,0xB3,0xB4,0xB5,0xB6,0xB7,0xB8,0xB9,0xBA,0xBB,0xBC,0xBD,0xBE,0xBF,
+0xC0,0xC1,0xC2,0xC3,0xC4,0xC5,0xC6,0xC7,0xC8,0xC9,0xCA,0xCB,0xCC,0xCD,0xCE,0xCF,
+0xD0,0xD1,0xD2,0xD3,0xD4,0xD5,0xD6,0xD7,0xD8,0xD9,0xDA,0xDB,0xDC,0xDD,0xDE,0xDF,
+0xE0,0xE1,0xE2,0xE3,0xE4,0xE5,0xE6,0xE7,0xE8,0xE9,0xEA,0xEB,0xEC,0xED,0xEE,0xEF,
+0xF0,0xF1,0xF2,0xF3,0xF4,0xF5,0xF6,0xF7,0xF8,0xF9,0xFA,0xFB,0xFC,0xFD,0xFE,0xFF};
+
+static uchar ctype_latin1[] = {
+ 0,
+ 32, 32, 32, 32, 32, 32, 32, 32, 32, 40, 40, 40, 40, 40, 32, 32,
+ 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,
+ 72, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
+ 132,132,132,132,132,132,132,132,132,132, 16, 16, 16, 16, 16, 16,
+ 16,129,129,129,129,129,129, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 16, 16, 16, 16, 16,
+ 16,130,130,130,130,130,130, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 16, 16, 16, 16, 32,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 72, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
+ 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 16, 1, 1, 1, 1, 1, 1, 1, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 16, 2, 2, 2, 2, 2, 2, 2, 2
+};
+
+static uchar to_lower_latin1[] = {
+ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
+ 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
+ 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47,
+ 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63,
+ 64, 97, 98, 99,100,101,102,103,104,105,106,107,108,109,110,111,
+ 112,113,114,115,116,117,118,119,120,121,122, 91, 92, 93, 94, 95,
+ 96, 97, 98, 99,100,101,102,103,104,105,106,107,108,109,110,111,
+ 112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,
+ 128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,
+ 144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,
+ 160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,
+ 176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,
+ 224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,
+ 240,241,242,243,244,245,246,215,248,249,250,251,252,253,254,223,
+ 224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,
+ 240,241,242,243,244,245,246,247,248,249,250,251,252,253,254,255
+};
+
+static uchar to_upper_latin1[] = {
+ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
+ 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
+ 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47,
+ 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63,
+ 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79,
+ 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95,
+ 96, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79,
+ 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90,123,124,125,126,127,
+ 128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,
+ 144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,
+ 160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,
+ 176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,
+ 192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,
+ 208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,223,
+ 192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,
+ 208,209,210,211,212,213,214,247,216,217,218,219,220,221,222,255
+};
+
+static uchar sort_order_latin1[] = {
+ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
+ 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
+ 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47,
+ 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63,
+ 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79,
+ 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95,
+ 96, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79,
+ 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90,123,124,125,126,127,
+ 128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,
+ 144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,
+ 160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,
+ 176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,
+ 65, 65, 65, 65, 92, 91, 92, 67, 69, 69, 69, 69, 73, 73, 73, 73,
+ 68, 78, 79, 79, 79, 79, 93,215,216, 85, 85, 85, 89, 89,222,223,
+ 65, 65, 65, 65, 92, 91, 92, 67, 69, 69, 69, 69, 73, 73, 73, 73,
+ 68, 78, 79, 79, 79, 79, 93,247,216, 85, 85, 85, 89, 89,222,255
+};
+
+
+static
+int my_mb_wc_latin1(CHARSET_INFO *cs __attribute__((unused)),
+ my_wc_t *wc,
+ const unsigned char *str,
+ const unsigned char *end)
+{
+ if (str >= end)
+ return MY_CS_TOOFEW(0);
+
+ return ((wc[0]= latin1_uni[*str]) || (!str[0])) ? 1 : MY_CS_ILSEQ;
+}
+
+static
+int my_wc_mb_latin1(CHARSET_INFO *cs __attribute__((unused)),
+ my_wc_t wc,
+ unsigned char *str,
+ unsigned char *end)
+{
+ if (str >= end)
+ return MY_CS_TOOSMALL;
+
+ return ((wc < 256) && ((str[0]=uni_latin1[wc]) || (!wc))) ? 1 : MY_CS_ILUNI;
+}
+
+
+CHARSET_INFO my_charset_latin1 =
+{
+ 8, /* number */
+ MY_CS_COMPILED, /* state */
+ "latin1", /* cs name */
+ "latin1", /* name */
+ "", /* comment */
+ ctype_latin1,
+ to_lower_latin1,
+ to_upper_latin1,
+ sort_order_latin1,
+ NULL, /* tab_to_uni */
+ NULL, /* tab_from_uni */
+ 2, /* strxfrm_multiply */
+ my_strnncoll_simple,
+ my_strnxfrm_simple,
+ my_like_range_simple,
+ my_wildcmp_8bit, /* wildcmp */
+ 1, /* mbmaxlen */
+ NULL, /* ismbchar */
+ NULL, /* ismbhead */
+ NULL, /* mbcharlen */
+ my_mb_wc_latin1, /* mb_wc */
+ my_wc_mb_latin1, /* wc_mb */
+ my_caseup_str_8bit,
+ my_casedn_str_8bit,
+ my_caseup_8bit,
+ my_casedn_8bit,
+ NULL, /* tosort */
+ my_strcasecmp_8bit,
+ my_strncasecmp_8bit,
+ my_hash_caseup_simple,
+ my_hash_sort_simple,
+ 0,
+ my_snprintf_8bit,
+ my_long10_to_str_8bit,
+ my_longlong10_to_str_8bit,
+ my_fill_8bit,
+ my_strntol_8bit,
+ my_strntoul_8bit,
+ my_strntoll_8bit,
+ my_strntoull_8bit,
+ my_strntod_8bit,
+ my_scan_8bit
+};
diff --git a/strings/ctype-latin1_de.c b/strings/ctype-latin1_de.c
index 6a5a9b78e8d..22aea5a2cad 100644
--- a/strings/ctype-latin1_de.c
+++ b/strings/ctype-latin1_de.c
@@ -448,6 +448,7 @@ CHARSET_INFO my_charset_latin1_de =
my_snprintf_8bit,
my_long10_to_str_8bit,
my_longlong10_to_str_8bit,
+ my_fill_8bit,
my_strntol_8bit,
my_strntoul_8bit,
my_strntoll_8bit,
diff --git a/strings/ctype-simple.c b/strings/ctype-simple.c
index e028a027484..d7d382a61c3 100644
--- a/strings/ctype-simple.c
+++ b/strings/ctype-simple.c
@@ -1000,7 +1000,7 @@ ulong my_scan_8bit(CHARSET_INFO *cs, const char *str, const char *end, int sq)
return 0;
case MY_SEQ_SPACES:
- for (str++ ; str != end ; str++)
+ for ( ; str < end ; str++)
{
if (!my_isspace(cs,*str))
break;
@@ -1010,3 +1010,9 @@ ulong my_scan_8bit(CHARSET_INFO *cs, const char *str, const char *end, int sq)
return 0;
}
}
+
+void my_fill_8bit(CHARSET_INFO *cs __attribute__((unused)),
+ char *s, uint l, int fill)
+{
+ bfill(s,l,fill);
+} \ No newline at end of file
diff --git a/strings/ctype-sjis.c b/strings/ctype-sjis.c
index 0408332ee30..b666bdf20d2 100644
--- a/strings/ctype-sjis.c
+++ b/strings/ctype-sjis.c
@@ -4500,6 +4500,7 @@ CHARSET_INFO my_charset_sjis =
my_snprintf_8bit,
my_long10_to_str_8bit,
my_longlong10_to_str_8bit,
+ my_fill_8bit,
my_strntol_8bit,
my_strntoul_8bit,
my_strntoll_8bit,
diff --git a/strings/ctype-tis620.c b/strings/ctype-tis620.c
index ac959105736..5461173b766 100644
--- a/strings/ctype-tis620.c
+++ b/strings/ctype-tis620.c
@@ -722,6 +722,7 @@ CHARSET_INFO my_charset_tis620 =
my_snprintf_8bit,
my_long10_to_str_8bit,
my_longlong10_to_str_8bit,
+ my_fill_8bit,
my_strntol_8bit,
my_strntoul_8bit,
my_strntoll_8bit,
diff --git a/strings/ctype-ujis.c b/strings/ctype-ujis.c
index 211b42db470..268a9e2296e 100644
--- a/strings/ctype-ujis.c
+++ b/strings/ctype-ujis.c
@@ -8467,6 +8467,7 @@ CHARSET_INFO my_charset_ujis =
my_snprintf_8bit,
my_long10_to_str_8bit,
my_longlong10_to_str_8bit,
+ my_fill_8bit,
my_strntol_8bit,
my_strntoul_8bit,
my_strntoll_8bit,
diff --git a/strings/ctype-utf8.c b/strings/ctype-utf8.c
index 3f859223a15..c4c12efe8b2 100644
--- a/strings/ctype-utf8.c
+++ b/strings/ctype-utf8.c
@@ -2001,6 +2001,7 @@ CHARSET_INFO my_charset_utf8 =
my_snprintf_8bit,
my_long10_to_str_8bit,
my_longlong10_to_str_8bit,
+ my_fill_8bit,
my_strntol_8bit,
my_strntoul_8bit,
my_strntoll_8bit,
@@ -3089,6 +3090,7 @@ CHARSET_INFO my_charset_ucs2 =
my_snprintf_ucs2,
my_l10tostr_ucs2,
my_ll10tostr_ucs2,
+ my_fill_8bit,
my_strntol_ucs2,
my_strntoul_ucs2,
my_strntoll_ucs2,
diff --git a/strings/ctype-win1250ch.c b/strings/ctype-win1250ch.c
index b6e78368dde..f5074a4ec0e 100644
--- a/strings/ctype-win1250ch.c
+++ b/strings/ctype-win1250ch.c
@@ -666,6 +666,7 @@ CHARSET_INFO my_charset_win1250ch =
my_snprintf_8bit,
my_long10_to_str_8bit,
my_longlong10_to_str_8bit,
+ my_fill_8bit,
my_strntol_8bit,
my_strntoul_8bit,
my_strntoll_8bit,
diff --git a/strings/ctype.c b/strings/ctype.c
index 891c3c2c882..4f6d34ddd7a 100644
--- a/strings/ctype.c
+++ b/strings/ctype.c
@@ -21,3903 +21,6 @@
#include <m_string.h>
#endif
-#ifndef HAVE_CHARSET_latin1
-#define HAVE_CHARSET_latin1
-#endif
-
-#if defined(HAVE_CHARSET_latin1)||defined(HAVE_CHARSET_latin1_de)||\
-defined(HAVE_CHARSET_danish)||defined(HAVE_CHARSET_german1)
-
-static uint16 tab_8859_1_uni[256]={
- 0,0x0001,0x0002,0x0003,0x0004,0x0005,0x0006,0x0007,
-0x0008,0x0009,0x000A,0x000B,0x000C,0x000D,0x000E,0x000F,
-0x0010,0x0011,0x0012,0x0013,0x0014,0x0015,0x0016,0x0017,
-0x0018,0x0019,0x001A,0x001B,0x001C,0x001D,0x001E,0x001F,
-0x0020,0x0021,0x0022,0x0023,0x0024,0x0025,0x0026,0x0027,
-0x0028,0x0029,0x002A,0x002B,0x002C,0x002D,0x002E,0x002F,
-0x0030,0x0031,0x0032,0x0033,0x0034,0x0035,0x0036,0x0037,
-0x0038,0x0039,0x003A,0x003B,0x003C,0x003D,0x003E,0x003F,
-0x0040,0x0041,0x0042,0x0043,0x0044,0x0045,0x0046,0x0047,
-0x0048,0x0049,0x004A,0x004B,0x004C,0x004D,0x004E,0x004F,
-0x0050,0x0051,0x0052,0x0053,0x0054,0x0055,0x0056,0x0057,
-0x0058,0x0059,0x005A,0x005B,0x005C,0x005D,0x005E,0x005F,
-0x0060,0x0061,0x0062,0x0063,0x0064,0x0065,0x0066,0x0067,
-0x0068,0x0069,0x006A,0x006B,0x006C,0x006D,0x006E,0x006F,
-0x0070,0x0071,0x0072,0x0073,0x0074,0x0075,0x0076,0x0077,
-0x0078,0x0079,0x007A,0x007B,0x007C,0x007D,0x007E, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
-0x00A0,0x00A1,0x00A2,0x00A3,0x00A4,0x00A5,0x00A6,0x00A7,
-0x00A8,0x00A9,0x00AA,0x00AB,0x00AC,0x00AD,0x00AE,0x00AF,
-0x00B0,0x00B1,0x00B2,0x00B3,0x00B4,0x00B5,0x00B6,0x00B7,
-0x00B8,0x00B9,0x00BA,0x00BB,0x00BC,0x00BD,0x00BE,0x00BF,
-0x00C0,0x00C1,0x00C2,0x00C3,0x00C4,0x00C5,0x00C6,0x00C7,
-0x00C8,0x00C9,0x00CA,0x00CB,0x00CC,0x00CD,0x00CE,0x00CF,
-0x00D0,0x00D1,0x00D2,0x00D3,0x00D4,0x00D5,0x00D6,0x00D7,
-0x00D8,0x00D9,0x00DA,0x00DB,0x00DC,0x00DD,0x00DE,0x00DF,
-0x00E0,0x00E1,0x00E2,0x00E3,0x00E4,0x00E5,0x00E6,0x00E7,
-0x00E8,0x00E9,0x00EA,0x00EB,0x00EC,0x00ED,0x00EE,0x00EF,
-0x00F0,0x00F1,0x00F2,0x00F3,0x00F4,0x00F5,0x00F6,0x00F7,
-0x00F8,0x00F9,0x00FA,0x00FB,0x00FC,0x00FD,0x00FE,0x00FF
-};
-
-static uchar tab_uni_8859_1_plane00[]={
-0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F,
-0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F,
-0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F,
-0x30,0x31,0x32,0x33,0x34,0x35,0x36,0x37,0x38,0x39,0x3A,0x3B,0x3C,0x3D,0x3E,0x3F,
-0x40,0x41,0x42,0x43,0x44,0x45,0x46,0x47,0x48,0x49,0x4A,0x4B,0x4C,0x4D,0x4E,0x4F,
-0x50,0x51,0x52,0x53,0x54,0x55,0x56,0x57,0x58,0x59,0x5A,0x5B,0x5C,0x5D,0x5E,0x5F,
-0x60,0x61,0x62,0x63,0x64,0x65,0x66,0x67,0x68,0x69,0x6A,0x6B,0x6C,0x6D,0x6E,0x6F,
-0x70,0x71,0x72,0x73,0x74,0x75,0x76,0x77,0x78,0x79,0x7A,0x7B,0x7C,0x7D,0x7E,0x00,
-0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
-0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
-0xA0,0xA1,0xA2,0xA3,0xA4,0xA5,0xA6,0xA7,0xA8,0xA9,0xAA,0xAB,0xAC,0xAD,0xAE,0xAF,
-0xB0,0xB1,0xB2,0xB3,0xB4,0xB5,0xB6,0xB7,0xB8,0xB9,0xBA,0xBB,0xBC,0xBD,0xBE,0xBF,
-0xC0,0xC1,0xC2,0xC3,0xC4,0xC5,0xC6,0xC7,0xC8,0xC9,0xCA,0xCB,0xCC,0xCD,0xCE,0xCF,
-0xD0,0xD1,0xD2,0xD3,0xD4,0xD5,0xD6,0xD7,0xD8,0xD9,0xDA,0xDB,0xDC,0xDD,0xDE,0xDF,
-0xE0,0xE1,0xE2,0xE3,0xE4,0xE5,0xE6,0xE7,0xE8,0xE9,0xEA,0xEB,0xEC,0xED,0xEE,0xEF,
-0xF0,0xF1,0xF2,0xF3,0xF4,0xF5,0xF6,0xF7,0xF8,0xF9,0xFA,0xFB,0xFC,0xFD,0xFE,0xFF};
-
-static MY_UNI_IDX idx_uni_8859_1[]={
- {0x0000,0x00FF,tab_uni_8859_1_plane00},
- {0,0,NULL}
-};
-#endif
-
-#if defined(HAVE_CHARSET_latin2)||defined(HAVE_CHARSET_croat)||\
-defined(HAVE_CHARSET_hungarian)
-
-static uint16 tab_8859_2_uni[256]={
- 0,0x0001,0x0002,0x0003,0x0004,0x0005,0x0006,0x0007,
-0x0008,0x0009,0x000A,0x000B,0x000C,0x000D,0x000E,0x000F,
-0x0010,0x0011,0x0012,0x0013,0x0014,0x0015,0x0016,0x0017,
-0x0018,0x0019,0x001A,0x001B,0x001C,0x001D,0x001E,0x001F,
-0x0020,0x0021,0x0022,0x0023,0x0024,0x0025,0x0026,0x0027,
-0x0028,0x0029,0x002A,0x002B,0x002C,0x002D,0x002E,0x002F,
-0x0030,0x0031,0x0032,0x0033,0x0034,0x0035,0x0036,0x0037,
-0x0038,0x0039,0x003A,0x003B,0x003C,0x003D,0x003E,0x003F,
-0x0040,0x0041,0x0042,0x0043,0x0044,0x0045,0x0046,0x0047,
-0x0048,0x0049,0x004A,0x004B,0x004C,0x004D,0x004E,0x004F,
-0x0050,0x0051,0x0052,0x0053,0x0054,0x0055,0x0056,0x0057,
-0x0058,0x0059,0x005A,0x005B,0x005C,0x005D,0x005E,0x005F,
-0x0060,0x0061,0x0062,0x0063,0x0064,0x0065,0x0066,0x0067,
-0x0068,0x0069,0x006A,0x006B,0x006C,0x006D,0x006E,0x006F,
-0x0070,0x0071,0x0072,0x0073,0x0074,0x0075,0x0076,0x0077,
-0x0078,0x0079,0x007A,0x007B,0x007C,0x007D,0x007E, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
-0x00A0,0x0104,0x02D8,0x0141,0x00A4,0x013D,0x015A,0x00A7,
-0x00A8,0x0160,0x015E,0x0164,0x0179,0x00AD,0x017D,0x017B,
-0x00B0,0x0105,0x02DB,0x0142,0x00B4,0x013E,0x015B,0x02C7,
-0x00B8,0x0161,0x015F,0x0165,0x017A,0x02DD,0x017E,0x017C,
-0x0154,0x00C1,0x00C2,0x0102,0x00C4,0x0139,0x0106,0x00C7,
-0x010C,0x00C9,0x0118,0x00CB,0x011A,0x00CD,0x00CE,0x010E,
-0x0110,0x0143,0x0147,0x00D3,0x00D4,0x0150,0x00D6,0x00D7,
-0x0158,0x016E,0x00DA,0x0170,0x00DC,0x00DD,0x0162,0x00DF,
-0x0155,0x00E1,0x00E2,0x0103,0x00E4,0x013A,0x0107,0x00E7,
-0x010D,0x00E9,0x0119,0x00EB,0x011B,0x00ED,0x00EE,0x010F,
-0x0111,0x0144,0x0148,0x00F3,0x00F4,0x0151,0x00F6,0x00F7,
-0x0159,0x016F,0x00FA,0x0171,0x00FC,0x00FD,0x0163,0x02D9
-};
-
-
-/* 0000-00FD , 254 chars */
-static uchar tab_uni_8859_2_plane00[]={
-0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F,
-0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F,
-0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F,
-0x30,0x31,0x32,0x33,0x34,0x35,0x36,0x37,0x38,0x39,0x3A,0x3B,0x3C,0x3D,0x3E,0x3F,
-0x40,0x41,0x42,0x43,0x44,0x45,0x46,0x47,0x48,0x49,0x4A,0x4B,0x4C,0x4D,0x4E,0x4F,
-0x50,0x51,0x52,0x53,0x54,0x55,0x56,0x57,0x58,0x59,0x5A,0x5B,0x5C,0x5D,0x5E,0x5F,
-0x60,0x61,0x62,0x63,0x64,0x65,0x66,0x67,0x68,0x69,0x6A,0x6B,0x6C,0x6D,0x6E,0x6F,
-0x70,0x71,0x72,0x73,0x74,0x75,0x76,0x77,0x78,0x79,0x7A,0x7B,0x7C,0x7D,0x7E,0x00,
-0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
-0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
-0xA0,0x00,0x00,0x00,0xA4,0x00,0x00,0xA7,0xA8,0x00,0x00,0x00,0x00,0xAD,0x00,0x00,
-0xB0,0x00,0x00,0x00,0xB4,0x00,0x00,0x00,0xB8,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
-0x00,0xC1,0xC2,0x00,0xC4,0x00,0x00,0xC7,0x00,0xC9,0x00,0xCB,0x00,0xCD,0xCE,0x00,
-0x00,0x00,0x00,0xD3,0xD4,0x00,0xD6,0xD7,0x00,0x00,0xDA,0x00,0xDC,0xDD,0x00,0xDF,
-0x00,0xE1,0xE2,0x00,0xE4,0x00,0x00,0xE7,0x00,0xE9,0x00,0xEB,0x00,0xED,0xEE,0x00,
-0x00,0x00,0x00,0xF3,0xF4,0x00,0xF6,0xF7,0x00,0x00,0xFA,0x00,0xFC,0xFD};
-
-/* 0102-017E , 125 chars */
-static uchar tab_uni_8859_2_plane01[]={
-0xC3,0xE3,0xA1,0xB1,0xC6,0xE6,0x00,0x00,0x00,0x00,0xC8,0xE8,0xCF,0xEF,0xD0,0xF0,
-0x00,0x00,0x00,0x00,0x00,0x00,0xCA,0xEA,0xCC,0xEC,0x00,0x00,0x00,0x00,0x00,0x00,
-0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
-0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xC5,0xE5,0x00,0x00,0xA5,0xB5,0x00,0x00,0xA3,
-0xB3,0xD1,0xF1,0x00,0x00,0xD2,0xF2,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xD5,0xF5,
-0x00,0x00,0xC0,0xE0,0x00,0x00,0xD8,0xF8,0xA6,0xB6,0x00,0x00,0xAA,0xBA,0xA9,0xB9,
-0xDE,0xFE,0xAB,0xBB,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xD9,0xF9,0xDB,0xFB,
-0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xAC,0xBC,0xAF,0xBF,0xAE,0xBE};
-
-/* 02C7-02DD , 23 chars */
-static uchar tab_uni_8859_2_plane02[]={
-0xB7,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
-0x00,0xA2,0xFF,0x00,0xB2,0x00,0xBD};
-
-static MY_UNI_IDX idx_uni_8859_2[]={
- {0x0000,0x00FD,tab_uni_8859_2_plane00},
- {0x0102,0x017E,tab_uni_8859_2_plane01},
- {0x02C7,0x02DD,tab_uni_8859_2_plane02},
- {0,0,NULL}
-};
-#endif
-
-#if defined(HAVE_CHARSET_cp1251) || defined(HAVE_CHARSET_win1251) || defined(HAVE_CHARSET_win1251ukr)
-static uint16 tab_cp1251_uni[256]={
- 0,0x0001,0x0002,0x0003,0x0004,0x0005,0x0006,0x0007,
-0x0008,0x0009,0x000A,0x000B,0x000C,0x000D,0x000E,0x000F,
-0x0010,0x0011,0x0012,0x0013,0x0014,0x0015,0x0016,0x0017,
-0x0018,0x0019,0x001A,0x001B,0x001C,0x001D,0x001E,0x001F,
-0x0020,0x0021,0x0022,0x0023,0x0024,0x0025,0x0026,0x0027,
-0x0028,0x0029,0x002A,0x002B,0x002C,0x002D,0x002E,0x002F,
-0x0030,0x0031,0x0032,0x0033,0x0034,0x0035,0x0036,0x0037,
-0x0038,0x0039,0x003A,0x003B,0x003C,0x003D,0x003E,0x003F,
-0x0040,0x0041,0x0042,0x0043,0x0044,0x0045,0x0046,0x0047,
-0x0048,0x0049,0x004A,0x004B,0x004C,0x004D,0x004E,0x004F,
-0x0050,0x0051,0x0052,0x0053,0x0054,0x0055,0x0056,0x0057,
-0x0058,0x0059,0x005A,0x005B,0x005C,0x005D,0x005E,0x005F,
-0x0060,0x0061,0x0062,0x0063,0x0064,0x0065,0x0066,0x0067,
-0x0068,0x0069,0x006A,0x006B,0x006C,0x006D,0x006E,0x006F,
-0x0070,0x0071,0x0072,0x0073,0x0074,0x0075,0x0076,0x0077,
-0x0078,0x0079,0x007A,0x007B,0x007C,0x007D,0x007E,0x007F,
-0x0402,0x0403,0x201A,0x0453,0x201E,0x2026,0x2020,0x2021,
- 0,0x2030,0x0409,0x2039,0x040A,0x040C,0x040B,0x040F,
-0x0452,0x2018,0x2019,0x201C,0x201D,0x2022,0x2013,0x2014,
- 0,0x2122,0x0459,0x203A,0x045A,0x045C,0x045B,0x045F,
-0x00A0,0x040E,0x045E,0x0408,0x00A4,0x0490,0x00A6,0x00A7,
-0x0401,0x00A9,0x0404,0x00AB,0x00AC,0x00AD,0x00AE,0x0407,
-0x00B0,0x00B1,0x0406,0x0456,0x0491,0x00B5,0x00B6,0x00B7,
-0x0451,0x2116,0x0454,0x00BB,0x0458,0x0405,0x0455,0x0457,
-0x0410,0x0411,0x0412,0x0413,0x0414,0x0415,0x0416,0x0417,
-0x0418,0x0419,0x041A,0x041B,0x041C,0x041D,0x041E,0x041F,
-0x0420,0x0421,0x0422,0x0423,0x0424,0x0425,0x0426,0x0427,
-0x0428,0x0429,0x042A,0x042B,0x042C,0x042D,0x042E,0x042F,
-0x0430,0x0431,0x0432,0x0433,0x0434,0x0435,0x0436,0x0437,
-0x0438,0x0439,0x043A,0x043B,0x043C,0x043D,0x043E,0x043F,
-0x0440,0x0441,0x0442,0x0443,0x0444,0x0445,0x0446,0x0447,
-0x0448,0x0449,0x044A,0x044B,0x044C,0x044D,0x044E,0x044F
-};
-
-/* 0000-00BB , 188 chars */
-static uchar tab_uni_cp1251_plane00[]={
-0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F,
-0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F,
-0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F,
-0x30,0x31,0x32,0x33,0x34,0x35,0x36,0x37,0x38,0x39,0x3A,0x3B,0x3C,0x3D,0x3E,0x3F,
-0x40,0x41,0x42,0x43,0x44,0x45,0x46,0x47,0x48,0x49,0x4A,0x4B,0x4C,0x4D,0x4E,0x4F,
-0x50,0x51,0x52,0x53,0x54,0x55,0x56,0x57,0x58,0x59,0x5A,0x5B,0x5C,0x5D,0x5E,0x5F,
-0x60,0x61,0x62,0x63,0x64,0x65,0x66,0x67,0x68,0x69,0x6A,0x6B,0x6C,0x6D,0x6E,0x6F,
-0x70,0x71,0x72,0x73,0x74,0x75,0x76,0x77,0x78,0x79,0x7A,0x7B,0x7C,0x7D,0x7E,0x7F,
-0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
-0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
-0xA0,0x00,0x00,0x00,0xA4,0x00,0xA6,0xA7,0x00,0xA9,0x00,0xAB,0xAC,0xAD,0xAE,0x00,
-0xB0,0xB1,0x00,0x00,0x00,0xB5,0xB6,0xB7,0x00,0x00,0x00,0xBB};
-
-/* 0401-0491 , 145 chars */
-static uchar tab_uni_cp1251_plane04[]={
-0xA8,0x80,0x81,0xAA,0xBD,0xB2,0xAF,0xA3,0x8A,0x8C,0x8E,0x8D,0x00,0xA1,0x8F,0xC0,
-0xC1,0xC2,0xC3,0xC4,0xC5,0xC6,0xC7,0xC8,0xC9,0xCA,0xCB,0xCC,0xCD,0xCE,0xCF,0xD0,
-0xD1,0xD2,0xD3,0xD4,0xD5,0xD6,0xD7,0xD8,0xD9,0xDA,0xDB,0xDC,0xDD,0xDE,0xDF,0xE0,
-0xE1,0xE2,0xE3,0xE4,0xE5,0xE6,0xE7,0xE8,0xE9,0xEA,0xEB,0xEC,0xED,0xEE,0xEF,0xF0,
-0xF1,0xF2,0xF3,0xF4,0xF5,0xF6,0xF7,0xF8,0xF9,0xFA,0xFB,0xFC,0xFD,0xFE,0xFF,0x00,
-0xB8,0x90,0x83,0xBA,0xBE,0xB3,0xBF,0xBC,0x9A,0x9C,0x9E,0x9D,0x00,0xA2,0x9F,0x00,
-0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
-0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
-0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xA5,
-0xB4};
-
-/* 2013-203A , 40 chars */
-static uchar tab_uni_cp1251_plane20[]={
-0x96,0x97,0x00,0x00,0x00,0x91,0x92,0x82,0x00,0x93,0x94,0x84,0x00,0x86,0x87,0x95,
-0x00,0x00,0x00,0x85,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x89,0x00,0x00,
-0x00,0x00,0x00,0x00,0x00,0x00,0x8B,0x9B};
-
-/* 2116-2122 , 13 chars */
-static uchar tab_uni_cp1251_plane21[]={
-0xB9,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x99};
-
-static MY_UNI_IDX idx_uni_cp1251[]={
- {0x0000,0x00BB,tab_uni_cp1251_plane00},
- {0x0401,0x0491,tab_uni_cp1251_plane04},
- {0x2013,0x203A,tab_uni_cp1251_plane20},
- {0x2116,0x2122,tab_uni_cp1251_plane21},
- {0,0,NULL}
-};
-#endif
-
-
-
-#ifdef HAVE_CHARSET_armscii8
-static uchar ctype_armscii8[] = {
- 0,
- 32, 32, 32, 32, 32, 32, 32, 32, 32, 40, 40, 40, 40, 40, 32, 32,
- 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,
- 72, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
- 132,132,132,132,132,132,132,132,132,132, 16, 16, 16, 16, 16, 16,
- 16,129,129,129,129,129,129, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 16, 16, 16, 16, 16,
- 16,130,130,130,130,130,130, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 16, 16, 16, 16, 32,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 72, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
- 16, 16, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2,
- 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2,
- 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2,
- 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2,
- 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 16, 16
-};
-
-static uchar to_lower_armscii8[] = {
- 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
- 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
- 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47,
- 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63,
- 64, 97, 98, 99,100,101,102,103,104,105,106,107,108,109,110,111,
- 112,113,114,115,116,117,118,119,120,121,122, 91, 92, 93, 94, 95,
- 96, 97, 98, 99,100,101,102,103,104,105,106,107,108,109,110,111,
- 112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,
- 128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,
- 144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,
- 160,161,162,163,164,165,166,167,184,169,170,171,172,173,174,175,
- 176,177,179,179,181,181,183,183,185,185,187,187,189,189,191,191,
- 193,193,195,195,197,197,199,199,201,201,203,203,205,205,207,207,
- 209,209,211,211,213,213,215,215,217,217,219,219,221,221,223,223,
- 225,225,227,227,229,229,231,231,233,233,235,235,237,237,239,239,
- 241,241,243,243,245,245,247,247,249,249,251,251,253,253,254,255
-};
-
-static uchar to_upper_armscii8[] = {
- 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
- 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
- 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47,
- 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63,
- 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79,
- 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95,
- 96, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79,
- 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90,123,124,125,126,127,
- 128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,
- 144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,
- 160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,
- 176,177,178,178,180,180,182,182,184,184,186,186,188,188,190,190,
- 192,192,194,194,196,196,198,198,200,200,202,202,204,204,206,206,
- 208,208,210,210,212,212,214,214,216,216,218,218,220,220,222,222,
- 224,224,226,226,228,228,230,230,232,232,234,234,236,236,238,238,
- 240,240,242,242,244,244,246,246,248,248,250,250,252,252,254,255
-};
-
-static uchar sort_order_armscii8[] = {
- 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
- 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
- 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47,
- 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63,
- 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79,
- 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95,
- 96, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79,
- 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90,123,124,125,126,127,
- 128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,
- 144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,
- 160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,
- 176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,
- 192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,
- 208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,223,
- 224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,
- 240,241,242,243,244,245,246,247,248,249,250,251,252,253,254,255
-};
-
-static uint16 tab_armscii_8_uni[256]={
- 0,0x0001,0x0002,0x0003,0x0004,0x0005,0x0006,0x0007,
-0x0008,0x0009,0x000A,0x000B,0x000C,0x000D,0x000E,0x000F,
-0x0010,0x0011,0x0012,0x0013,0x0014,0x0015,0x0016,0x0017,
-0x0018,0x0019,0x001A,0x001B,0x001C,0x001D,0x001E,0x001F,
-0x0020,0x0021,0x0022,0x0023,0x0024,0x0025,0x0026,0x0027,
-0x0028,0x0029,0x002A,0x002B,0x002C,0x002D,0x002E,0x002F,
-0x0030,0x0031,0x0032,0x0033,0x0034,0x0035,0x0036,0x0037,
-0x0038,0x0039,0x003A,0x003B,0x003C,0x003D,0x003E,0x003F,
-0x0040,0x0041,0x0042,0x0043,0x0044,0x0045,0x0046,0x0047,
-0x0048,0x0049,0x004A,0x004B,0x004C,0x004D,0x004E,0x004F,
-0x0050,0x0051,0x0052,0x0053,0x0054,0x0055,0x0056,0x0057,
-0x0058,0x0059,0x005A,0x005B,0x005C,0x005D,0x005E,0x005F,
-0x0060,0x0061,0x0062,0x0063,0x0064,0x0065,0x0066,0x0067,
-0x0068,0x0069,0x006A,0x006B,0x006C,0x006D,0x006E,0x006F,
-0x0070,0x0071,0x0072,0x0073,0x0074,0x0075,0x0076,0x0077,
-0x0078,0x0079,0x007A,0x007B,0x007C,0x007D,0x007E,0x007F,
-0x0080,0x0081,0x0082,0x0083,0x0084,0x0085,0x0086,0x0087,
-0x0088,0x0089,0x008A,0x008B,0x008C,0x008D,0x008E,0x008F,
-0x0090,0x0091,0x0092,0x0093,0x0094,0x0095,0x0096,0x0097,
-0x0098,0x0099,0x009A,0x009B,0x009C,0x009D,0x009E,0x009F,
-0x00A0,0x2741,0x00A7,0x0589,0x0029,0x0028,0x00BB,0x00AB,
-0x2014,0x002E,0x055D,0x002C,0x002D,0x055F,0x2026,0x055C,
-0x055B,0x055E,0x0531,0x0561,0x0532,0x0562,0x0533,0x0563,
-0x0534,0x0564,0x0535,0x0565,0x0536,0x0566,0x0537,0x0567,
-0x0538,0x0568,0x0539,0x0569,0x053A,0x056A,0x053B,0x056B,
-0x053C,0x056C,0x053D,0x056D,0x053E,0x056E,0x053F,0x056F,
-0x0540,0x0570,0x0541,0x0571,0x0542,0x0572,0x0543,0x0573,
-0x0544,0x0574,0x0545,0x0575,0x0546,0x0576,0x0547,0x0577,
-0x0548,0x0578,0x0549,0x0579,0x054A,0x057A,0x054B,0x057B,
-0x054C,0x057C,0x054D,0x057D,0x054E,0x057E,0x054F,0x057F,
-0x0550,0x0580,0x0551,0x0581,0x0552,0x0582,0x0553,0x0583,
-0x0554,0x0584,0x0555,0x0585,0x0556,0x0586,0x2019,0x0027
-};
-
-
-/* 0000-00BB , 188 chars */
-static uchar tab_uni_armscii_8_plane00[]={
-0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F,
-0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F,
-0x20,0x21,0x22,0x23,0x24,0x25,0x26,0xFF,0xA5,0xA4,0x2A,0x2B,0xAB,0xAC,0xA9,0x2F,
-0x30,0x31,0x32,0x33,0x34,0x35,0x36,0x37,0x38,0x39,0x3A,0x3B,0x3C,0x3D,0x3E,0x3F,
-0x40,0x41,0x42,0x43,0x44,0x45,0x46,0x47,0x48,0x49,0x4A,0x4B,0x4C,0x4D,0x4E,0x4F,
-0x50,0x51,0x52,0x53,0x54,0x55,0x56,0x57,0x58,0x59,0x5A,0x5B,0x5C,0x5D,0x5E,0x5F,
-0x60,0x61,0x62,0x63,0x64,0x65,0x66,0x67,0x68,0x69,0x6A,0x6B,0x6C,0x6D,0x6E,0x6F,
-0x70,0x71,0x72,0x73,0x74,0x75,0x76,0x77,0x78,0x79,0x7A,0x7B,0x7C,0x7D,0x7E,0x7F,
-0x80,0x81,0x82,0x83,0x84,0x85,0x86,0x87,0x88,0x89,0x8A,0x8B,0x8C,0x8D,0x8E,0x8F,
-0x90,0x91,0x92,0x93,0x94,0x95,0x96,0x97,0x98,0x99,0x9A,0x9B,0x9C,0x9D,0x9E,0x9F,
-0xA0,0x00,0x00,0x00,0x00,0x00,0x00,0xA2,0x00,0x00,0x00,0xA7,0x00,0x00,0x00,0x00,
-0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xA6};
-
-/* 0531-0589 , 89 chars */
-static uchar tab_uni_armscii_8_plane05[]={
-0xB2,0xB4,0xB6,0xB8,0xBA,0xBC,0xBE,0xC0,0xC2,0xC4,0xC6,0xC8,0xCA,0xCC,0xCE,0xD0,
-0xD2,0xD4,0xD6,0xD8,0xDA,0xDC,0xDE,0xE0,0xE2,0xE4,0xE6,0xE8,0xEA,0xEC,0xEE,0xF0,
-0xF2,0xF4,0xF6,0xF8,0xFA,0xFC,0x00,0x00,0x00,0x00,0xB0,0xAF,0xAA,0xB1,0xAD,0x00,
-0xB3,0xB5,0xB7,0xB9,0xBB,0xBD,0xBF,0xC1,0xC3,0xC5,0xC7,0xC9,0xCB,0xCD,0xCF,0xD1,
-0xD3,0xD5,0xD7,0xD9,0xDB,0xDD,0xDF,0xE1,0xE3,0xE5,0xE7,0xE9,0xEB,0xED,0xEF,0xF1,
-0xF3,0xF5,0xF7,0xF9,0xFB,0xFD,0x00,0x00,0xA3};
-
-/* 2014-2026 , 19 chars */
-static uchar tab_uni_armscii_8_plane20[]={
-0xA8,0x00,0x00,0x00,0x00,0xFE,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
-0x00,0x00,0xAE};
-
-/* 2741-2741 , 1 chars */
-static uchar tab_uni_armscii_8_plane27[]={
-0xA1};
-
-
-static MY_UNI_IDX idx_uni_armscii_8[]={
- {0x0000,0x00BB,tab_uni_armscii_8_plane00},
- {0x0531,0x0589,tab_uni_armscii_8_plane05},
- {0x2014,0x2026,tab_uni_armscii_8_plane20},
- {0x2741,0x2741,tab_uni_armscii_8_plane27},
- {0,0,NULL}
-};
-
-#endif
-
-
-#ifdef HAVE_CHARSET_cp1251
-
-/* The cp1251 character set. Generated automatically by
- * the ./conf_to_src program
- */
-
-static uchar ctype_cp1251[] = {
- 0,
- 32, 32, 32, 32, 32, 32, 32, 32, 32, 40, 40, 40, 40, 40, 32, 32,
- 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,
- 72, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
- 132,132,132,132,132,132,132,132,132,132, 16, 16, 16, 16, 16, 16,
- 16,129,129,129,129,129,129, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 16, 16, 16, 16, 16,
- 16,130,130,130,130,130,130, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 16, 16, 16, 16, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2
-};
-
-static uchar to_lower_cp1251[] = {
- 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
- 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
- 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47,
- 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63,
- 64, 97, 98, 99,100,101,102,103,104,105,106,107,108,109,110,111,
- 112,113,114,115,116,117,118,119,120,121,122, 91, 92, 93, 94, 95,
- 96, 97, 98, 99,100,101,102,103,104,105,106,107,108,109,110,111,
- 112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,
- 128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,
- 144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,
- 160,161,162,163,164,165,166,167,184,169,170,171,172,173,174,175,
- 176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,
- 224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,
- 240,241,242,243,244,245,246,247,248,249,250,251,252,253,254,255,
- 224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,
- 240,241,242,243,244,245,246,247,248,249,250,251,252,253,254,255
-};
-
-static uchar to_upper_cp1251[] = {
- 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
- 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
- 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47,
- 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63,
- 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79,
- 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95,
- 96, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79,
- 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90,123,124,125,126,127,
- 128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,
- 144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,
- 160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,
- 176,177,178,179,180,181,182,183,168,185,186,187,188,189,190,191,
- 192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,
- 208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,223,
- 192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,
- 208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,223
-};
-
-static uchar sort_order_cp1251[] = {
- 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
- 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
- 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47,
- 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63,
- 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79,
- 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90,124,125,126,127,128,
- 129, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79,
- 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90,130,131,132,133,255,
- 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,
- 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,
- 255,255,255,255,255,255,255,255, 97,255,255,255,255,255,255,255,
- 255,255,255,255,255,255,255,255, 97,255,255,255,255,255,255,255,
- 91, 92, 93, 94, 95, 96, 98, 99,100,101,102,103,104,105,106,107,
- 108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,
- 91, 92, 93, 94, 95, 96, 98, 99,100,101,102,103,104,105,106,107,
- 108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123
-};
-
-#endif
-
-
-#ifdef HAVE_CHARSET_cp1257
-
-/* The cp1257 character set. Generated automatically by
- * the ./conf_to_src program
- */
-
-static uchar ctype_cp1257[] = {
- 0,
- 32, 32, 32, 32, 32, 32, 32, 32, 32, 40, 40, 40, 40, 40, 32, 32,
- 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,
- 72, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
- 132,132,132,132,132,132,132,132,132,132, 16, 16, 16, 16, 16, 16,
- 16,129,129,129,129,129,129, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 16, 16, 16, 16, 16,
- 16,130,130,130,130,130,130, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 16, 16, 16, 16, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 1, 1, 0, 0, 0, 0, 1, 0, 1, 0, 0, 1, 0, 0, 0, 0,
- 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0,
- 2, 2, 0, 0, 0, 0, 2, 0, 2, 0, 0, 2, 0, 0, 0, 0,
- 2, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 2, 0, 0, 2, 0
-};
-
-static uchar to_lower_cp1257[] = {
- 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
- 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
- 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47,
- 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63,
- 64, 97, 98, 99,100,101,102,103,104,105,106,107,108,109,110,111,
- 112,113,114,115,116,117,118,119,120,121,122, 91, 92, 93, 94, 95,
- 96, 97, 98, 99,100,101,102,103,104,105,106,107,108,109,110,111,
- 112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,
- 128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,
- 144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,
- 160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,
- 176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,
- 224,225,194,195,196,197,230,199,232,201,202,235,204,205,206,207,
- 240,209,210,211,212,213,214,215,248,217,218,251,220,221,254,223,
- 224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,
- 240,241,242,243,244,245,246,247,248,249,250,251,252,253,254,255
-};
-
-static uchar to_upper_cp1257[] = {
- 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
- 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
- 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47,
- 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63,
- 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79,
- 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95,
- 96, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79,
- 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90,123,124,125,126,127,
- 128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,
- 144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,
- 160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,
- 176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,
- 192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,
- 208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,223,
- 192,193,226,227,228,229,198,231,200,233,234,203,236,237,238,239,
- 208,241,242,243,244,245,246,247,216,249,250,219,252,253,222,255
-};
-
-static uchar sort_order_cp1257[] = {
- 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
- 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
- 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47,
- 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63,
- 64, 65, 67, 68, 70, 71, 74, 75, 76, 77, 80, 81, 82, 83, 84, 85,
- 86, 87, 88, 89, 91, 92, 95, 96, 97, 78,255, 98, 99,100,101,102,
- 103, 65, 67, 68, 70, 71, 74, 75, 76, 77, 80, 81, 82, 83, 84, 85,
- 86, 87, 88, 89, 91, 92, 95, 96, 97, 78,255,104,105,106,107,255,
- 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,
- 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,
- 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,
- 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,
- 66, 79,255,255,255,255, 72,255, 69,255,255, 73,255,255,255,255,
- 90,255,255,255,255,255,255,255, 94,255,255, 93,255,255,255,255,
- 255, 79,255,255,255,255, 72,255, 69,255,255, 73,255,255,255,255,
- 90,255,255,255,255,255,255,255, 94,255,255, 93,255,255,255,255
-};
-
-static uint16 tab_cp1257_uni[256]={
- 0,0x0001,0x0002,0x0003,0x0004,0x0005,0x0006,0x0007,
-0x0008,0x0009,0x000A,0x000B,0x000C,0x000D,0x000E,0x000F,
-0x0010,0x0011,0x0012,0x0013,0x0014,0x0015,0x0016,0x0017,
-0x0018,0x0019,0x001A,0x001B,0x001C,0x001D,0x001E,0x001F,
-0x0020,0x0021,0x0022,0x0023,0x0024,0x0025,0x0026,0x0027,
-0x0028,0x0029,0x002A,0x002B,0x002C,0x002D,0x002E,0x002F,
-0x0030,0x0031,0x0032,0x0033,0x0034,0x0035,0x0036,0x0037,
-0x0038,0x0039,0x003A,0x003B,0x003C,0x003D,0x003E,0x003F,
-0x0040,0x0041,0x0042,0x0043,0x0044,0x0045,0x0046,0x0047,
-0x0048,0x0049,0x004A,0x004B,0x004C,0x004D,0x004E,0x004F,
-0x0050,0x0051,0x0052,0x0053,0x0054,0x0055,0x0056,0x0057,
-0x0058,0x0059,0x005A,0x005B,0x005C,0x005D,0x005E,0x005F,
-0x0060,0x0061,0x0062,0x0063,0x0064,0x0065,0x0066,0x0067,
-0x0068,0x0069,0x006A,0x006B,0x006C,0x006D,0x006E,0x006F,
-0x0070,0x0071,0x0072,0x0073,0x0074,0x0075,0x0076,0x0077,
-0x0078,0x0079,0x007A,0x007B,0x007C,0x007D,0x007E,0x007F,
-0x20AC, 0,0x201A, 0,0x201E,0x2026,0x2020,0x2021,
- 0,0x2030, 0,0x2039, 0,0x00A8,0x02C7,0x00B8,
- 0,0x2018,0x2019,0x201C,0x201D,0x2022,0x2013,0x2014,
- 0,0x2122, 0,0x203A, 0,0x00AF,0x02DB, 0,
-0x00A0, 0,0x00A2,0x00A3,0x00A4, 0,0x00A6,0x00A7,
-0x00D8,0x00A9,0x0156,0x00AB,0x00AC,0x00AD,0x00AE,0x00C6,
-0x00B0,0x00B1,0x00B2,0x00B3,0x00B4,0x00B5,0x00B6,0x00B7,
-0x00F8,0x00B9,0x0157,0x00BB,0x00BC,0x00BD,0x00BE,0x00E6,
-0x0104,0x012E,0x0100,0x0106,0x00C4,0x00C5,0x0118,0x0112,
-0x010C,0x00C9,0x0179,0x0116,0x0122,0x0136,0x012A,0x013B,
-0x0160,0x0143,0x0145,0x00D3,0x014C,0x00D5,0x00D6,0x00D7,
-0x0172,0x0141,0x015A,0x016A,0x00DC,0x017B,0x017D,0x00DF,
-0x0105,0x012F,0x0101,0x0107,0x00E4,0x00E5,0x0119,0x0113,
-0x010D,0x00E9,0x017A,0x0117,0x0123,0x0137,0x012B,0x013C,
-0x0161,0x0144,0x0146,0x00F3,0x014D,0x00F5,0x00F6,0x00F7,
-0x0173,0x0142,0x015B,0x016B,0x00FC,0x017C,0x017E,0x02D9
-};
-
-
-/* 0000-00FC , 253 chars */
-static uchar tab_uni_cp1257_plane00[]={
-0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F,
-0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F,
-0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F,
-0x30,0x31,0x32,0x33,0x34,0x35,0x36,0x37,0x38,0x39,0x3A,0x3B,0x3C,0x3D,0x3E,0x3F,
-0x40,0x41,0x42,0x43,0x44,0x45,0x46,0x47,0x48,0x49,0x4A,0x4B,0x4C,0x4D,0x4E,0x4F,
-0x50,0x51,0x52,0x53,0x54,0x55,0x56,0x57,0x58,0x59,0x5A,0x5B,0x5C,0x5D,0x5E,0x5F,
-0x60,0x61,0x62,0x63,0x64,0x65,0x66,0x67,0x68,0x69,0x6A,0x6B,0x6C,0x6D,0x6E,0x6F,
-0x70,0x71,0x72,0x73,0x74,0x75,0x76,0x77,0x78,0x79,0x7A,0x7B,0x7C,0x7D,0x7E,0x7F,
-0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
-0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
-0xA0,0x00,0xA2,0xA3,0xA4,0x00,0xA6,0xA7,0x8D,0xA9,0x00,0xAB,0xAC,0xAD,0xAE,0x9D,
-0xB0,0xB1,0xB2,0xB3,0xB4,0xB5,0xB6,0xB7,0x8F,0xB9,0x00,0xBB,0xBC,0xBD,0xBE,0x00,
-0x00,0x00,0x00,0x00,0xC4,0xC5,0xAF,0x00,0x00,0xC9,0x00,0x00,0x00,0x00,0x00,0x00,
-0x00,0x00,0x00,0xD3,0x00,0xD5,0xD6,0xD7,0xA8,0x00,0x00,0x00,0xDC,0x00,0x00,0xDF,
-0x00,0x00,0x00,0x00,0xE4,0xE5,0xBF,0x00,0x00,0xE9,0x00,0x00,0x00,0x00,0x00,0x00,
-0x00,0x00,0x00,0xF3,0x00,0xF5,0xF6,0xF7,0xB8,0x00,0x00,0x00,0xFC};
-
-/* 0100-017E , 127 chars */
-static uchar tab_uni_cp1257_plane01[]={
-0xC2,0xE2,0x00,0x00,0xC0,0xE0,0xC3,0xE3,0x00,0x00,0x00,0x00,0xC8,0xE8,0x00,0x00,
-0x00,0x00,0xC7,0xE7,0x00,0x00,0xCB,0xEB,0xC6,0xE6,0x00,0x00,0x00,0x00,0x00,0x00,
-0x00,0x00,0xCC,0xEC,0x00,0x00,0x00,0x00,0x00,0x00,0xCE,0xEE,0x00,0x00,0xC1,0xE1,
-0x00,0x00,0x00,0x00,0x00,0x00,0xCD,0xED,0x00,0x00,0x00,0xCF,0xEF,0x00,0x00,0x00,
-0x00,0xD9,0xF9,0xD1,0xF1,0xD2,0xF2,0x00,0x00,0x00,0x00,0x00,0xD4,0xF4,0x00,0x00,
-0x00,0x00,0x00,0x00,0x00,0x00,0xAA,0xBA,0x00,0x00,0xDA,0xFA,0x00,0x00,0x00,0x00,
-0xD0,0xF0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xDB,0xFB,0x00,0x00,0x00,0x00,
-0x00,0x00,0xD8,0xF8,0x00,0x00,0x00,0x00,0x00,0xCA,0xEA,0xDD,0xFD,0xDE,0xFE};
-
-/* 2013-20AC , 154 chars */
-static uchar tab_uni_cp1257_plane20[]={
-0x96,0x97,0x00,0x00,0x00,0x91,0x92,0x82,0x00,0x93,0x94,0x84,0x00,0x86,0x87,0x95,
-0x00,0x00,0x00,0x85,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x89,0x00,0x00,
-0x00,0x00,0x00,0x00,0x00,0x00,0x8B,0x9B,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
-0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
-0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
-0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
-0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
-0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
-0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
-0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80};
-
-/* 02C7-02DB , 21 chars */
-static uchar tab_uni_cp1257_plane02[]={
-0x8E,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
-0x00,0x00,0xFF,0x00,0x9E};
-
-/* 2122-2122 , 1 chars */
-static uchar tab_uni_cp1257_plane21[]={
-0x99};
-
-static MY_UNI_IDX idx_uni_cp1257[]={
- {0x0000,0x00FC,tab_uni_cp1257_plane00},
- {0x0100,0x017E,tab_uni_cp1257_plane01},
- {0x2013,0x20AC,tab_uni_cp1257_plane20},
- {0x02C7,0x02DB,tab_uni_cp1257_plane02},
- {0x2122,0x2122,tab_uni_cp1257_plane21},
- {0,0,NULL}
-};
-
-#endif
-
-
-#ifdef HAVE_CHARSET_croat
-
-/* The croat character set. Generated by
- * the ./conf_to_src program
- */
-
-static uchar ctype_croat[] = {
- 0,
- 32, 32, 32, 32, 32, 32, 32, 32, 32, 40, 40, 40, 40, 40, 32, 32,
- 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,
- 72, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
- 132,132,132,132,132,132,132,132,132,132, 16, 16, 16, 16, 16, 16,
- 16,129,129,129,129,129,129, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 16, 16, 16, 16, 16,
- 16,130,130,130,130,130,130, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 16, 16, 16, 16, 32,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 2, 0, 0,
- 72, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
- 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 16, 1, 1, 1, 1, 1, 1, 1, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 16, 2, 2, 2, 2, 2, 2, 2, 2
-};
-
-static uchar to_lower_croat[] = {
- 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
- 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
- 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47,
- 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63,
- 64, 97, 98, 99,100,101,102,103,104,105,106,107,108,109,110,111,
- 112,113,114,115,116,117,118,119,120,121,122, 91, 92, 93, 94, 95,
- 96, 97, 98, 99,100,101,102,103,104,105,106,107,108,109,110,111,
- 112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,
- 128,129,130,131,132,133,134,135,136,137,154,139,140,141,158,143,
- 144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,
- 160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,
- 176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,
- 224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,
- 240,241,242,243,244,245,246,215,248,249,250,251,252,253,254,223,
- 224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,
- 240,241,242,243,244,245,246,247,248,249,250,251,252,253,254,255
-};
-
-static uchar to_upper_croat[] = {
- 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
- 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
- 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47,
- 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63,
- 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79,
- 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95,
- 96, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79,
- 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90,123,124,125,126,127,
- 128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,
- 144,145,146,147,148,149,150,151,152,153,138,155,156,157,142,159,
- 160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,
- 176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,
- 192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,
- 208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,223,
- 192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,
- 208,209,210,211,212,213,214,247,216,217,218,219,220,221,222,255
-};
-
-static uchar sort_order_croat[] = {
- 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
- 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
- 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47,
- 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63,
- 64, 65, 66, 67, 70, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82,
- 83, 84, 85, 86, 88, 89, 90, 91, 92, 93, 94, 91, 92, 93, 94, 95,
- 96, 65, 66, 67, 70, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82,
- 83, 84, 85, 86, 88, 89, 90, 91, 92, 93, 94,123,124,125,126,127,
- 128,129,130,131,132,133,134,135,136,137, 87,139,140,141, 95,143,
- 144,145,146,147,148,149,150,151,152,153, 87,155,156,157, 95,159,
- 160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,
- 176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,
- 65, 65, 65, 65, 92, 91, 69, 67, 68, 69, 69, 69, 73, 73, 73, 73,
- 71, 78, 79, 79, 79, 79, 93,215,216, 85, 85, 85, 89, 89,222,223,
- 65, 65, 65, 65, 92, 91, 69, 67, 68, 69, 69, 69, 73, 73, 73, 73,
- 71, 78, 79, 79, 79, 79, 93,247,216, 85, 85, 85, 89, 89,222,255
-};
-#endif
-
-
-#ifdef HAVE_CHARSET_danish
-
-/* The danish character set. Generated automatically by
- * the ./conf_to_src program
- */
-
-static uchar ctype_danish[] = {
- 0,
- 32, 32, 32, 32, 32, 32, 32, 32, 32, 40, 40, 40, 40, 40, 32, 32,
- 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,
- 72, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
- 132,132,132,132,132,132,132,132,132,132, 16, 16, 16, 16, 16, 16,
- 16,129,129,129,129,129,129, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 16, 16, 16, 16, 16,
- 16,130,130,130,130,130,130, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 16, 16, 16, 16, 32,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 72, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
- 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 16, 1, 1, 1, 1, 1, 1, 1, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 16, 2, 2, 2, 2, 2, 2, 2, 2
-};
-
-static uchar to_lower_danish[] = {
- 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
- 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
- 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47,
- 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63,
- 64, 97, 98, 99,100,101,102,103,104,105,106,107,108,109,110,111,
- 112,113,114,115,116,117,118,119,120,121,122, 91, 92, 93, 94, 95,
- 96, 97, 98, 99,100,101,102,103,104,105,106,107,108,109,110,111,
- 112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,
- 128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,
- 144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,
- 160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,
- 176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,
- 224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,
- 240,241,242,243,244,245,246,215,248,249,250,251,252,253,254,223,
- 224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,
- 240,241,242,243,244,245,246,247,248,249,250,251,252,253,254,255
-};
-
-static uchar to_upper_danish[] = {
- 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
- 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
- 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47,
- 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63,
- 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79,
- 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95,
- 96, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79,
- 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90,123,124,125,126,127,
- 128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,
- 144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,
- 160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,
- 176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,
- 192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,
- 208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,223,
- 192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,
- 208,209,210,211,212,213,214,247,216,217,218,219,220,221,222,255
-};
-
-static uchar sort_order_danish[] = {
- 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
- 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
- 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47,
- 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63,
- 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79,
- 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95,
- 96, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79,
- 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90,123,124,125,126,127,
- 128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,
- 144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,
- 160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,
- 176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,
- 65, 65, 65, 65, 91, 93, 91, 67, 69, 69, 69, 69, 73, 73, 73, 73,
- 68, 78, 79, 79, 79, 79, 92,215, 92, 85, 85, 85, 89, 89,222,223,
- 65, 65, 65, 65, 91, 93, 91, 67, 69, 69, 69, 69, 73, 73, 73, 73,
- 68, 78, 79, 79, 79, 79, 92,247, 92, 85, 85, 85, 89, 89,222,255
-};
-#endif
-
-
-
-#ifdef HAVE_CHARSET_dec8
-
-/* The dec8 character set. Generated automatically by
- * the ./conf_to_src program
- */
-
-static uchar ctype_dec8[] = {
- 0,
- 32, 32, 32, 32, 32, 32, 32, 32, 32, 40, 40, 40, 40, 40, 32, 32,
- 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,
- 72, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
- 132,132,132,132,132,132,132,132,132,132, 16, 16, 16, 16, 16, 16,
- 16,129,129,129,129,129,129, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 16, 16, 16, 16, 16,
- 16,130,130,130,130,130,130, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 16, 16, 16, 16, 32,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 72, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
- 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 16, 1, 1, 1, 1, 1, 1, 1, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 16, 2, 2, 2, 2, 2, 2, 2, 2
-};
-
-static uchar to_lower_dec8[] = {
- 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
- 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
- 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47,
- 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63,
- 64, 97, 98, 99,100,101,102,103,104,105,106,107,108,109,110,111,
- 112,113,114,115,116,117,118,119,120,121,122, 91, 92, 93, 94, 95,
- 96, 97, 98, 99,100,101,102,103,104,105,106,107,108,109,110,111,
- 112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,
- 128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,
- 144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,
- 160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,
- 176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,
- 224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,
- 240,241,242,243,244,245,246,215,248,249,250,251,252,253,254,223,
- 224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,
- 240,241,242,243,244,245,246,247,248,249,250,251,252,253,254,255
-};
-
-static uchar to_upper_dec8[] = {
- 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
- 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
- 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47,
- 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63,
- 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79,
- 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95,
- 96, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79,
- 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90,123,124,125,126,127,
- 128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,
- 144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,
- 160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,
- 176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,
- 192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,
- 208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,223,
- 192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,
- 208,209,210,211,212,213,214,247,216,217,218,219,220,221,222,255
-};
-
-static uchar sort_order_dec8[] = {
- 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
- 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
- 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47,
- 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63,
- 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79,
- 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95,
- 96, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79,
- 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90,123,124,125,126,127,
- 128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,
- 144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,
- 160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,
- 176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,
- 65, 65, 65, 65, 92, 91, 92, 67, 69, 69, 69, 69, 73, 73, 73, 73,
- 68, 78, 79, 79, 79, 79, 93,215,216, 85, 85, 85, 89, 89,222,223,
- 65, 65, 65, 65, 92, 91, 92, 67, 69, 69, 69, 69, 73, 73, 73, 73,
- 68, 78, 79, 79, 79, 79, 93,247,216, 85, 85, 85, 89, 89,222,255
-};
-#endif
-
-
-#ifdef HAVE_CHARSET_dos
-
-/* The dos character set. Generated automatically by
- * the ./conf_to_src program
- */
-
-static uchar ctype_dos[] = {
- 0,
- 32, 48, 48, 48, 48, 48, 48, 32, 32, 40, 40, 40, 40, 40, 48, 48,
- 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 32, 48, 48, 48, 48, 48,
- 72, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
- 132,132,132,132,132,132,132,132,132,132, 16, 16, 16, 16, 16, 16,
- 16,129,129,129,129,129,129, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 16, 16, 16, 16, 16,
- 16,130,130,130,130,130,130, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 16, 16, 16, 16, 48,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 1,
- 1, 2, 1, 2, 2, 2, 2, 2, 2, 1, 1, 16, 16, 16, 16, 16,
- 2, 2, 2, 2, 2, 1, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
- 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
- 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
- 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
- 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
- 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 32
-};
-
-static uchar to_lower_dos[] = {
- 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
- 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
- 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47,
- 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63,
- 64, 97, 98, 99,100,101,102,103,104,105,106,107,108,109,110,111,
- 112,113,114,115,116,117,118,119,120,121,122, 91, 92, 93, 94, 95,
- 96, 97, 98, 99,100,101,102,103,104,105,106,107,108,109,110,111,
- 112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,
- 135,129,130,131,132,133,134,135,136,137,138,139,140,141,132,134,
- 130,145,145,147,148,149,150,151,152,148,129,155,156,157,158,159,
- 160,161,162,163,164,164,166,167,168,169,170,171,172,173,174,175,
- 176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,
- 192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,
- 208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,223,
- 224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,
- 240,241,242,243,244,245,246,247,248,249,250,251,252,253,254,255
-};
-
-static uchar to_upper_dos[] = {
- 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
- 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
- 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47,
- 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63,
- 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79,
- 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95,
- 96, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79,
- 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90,123,124,125,126,127,
- 128,154,144, 65,142, 65,143,128, 69, 69, 69, 73, 73, 73,142,143,
- 144,146,146, 79,153, 79, 85, 85, 89,153,154,155,156,157,158,159,
- 65, 73, 79, 85,165,165,166,167,168,169,170,171,172,173,174,175,
- 176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,
- 192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,
- 208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,223,
- 224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,
- 240,241,242,243,244,245,246,247,248,249,250,251,252,253,254,255
-};
-
-static uchar sort_order_dos[] = {
- 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
- 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
- 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47,
- 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63,
- 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79,
- 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95,
- 96, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79,
- 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90,123,124,125,126,127,
- 67, 89, 69, 65, 92, 65, 91, 67, 69, 69, 69, 73, 73, 73, 92, 91,
- 69, 92, 92, 79, 93, 79, 85, 85, 89, 93, 89, 36, 36, 36, 36, 36,
- 65, 73, 79, 85, 78, 78,166,167, 63,169,170,171,172, 33, 34, 34,
- 176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,
- 192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,
- 208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,223,
- 224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,
- 240,241,242,243,244,245,246,247,248,249,250,251,252,253,254,255
-};
-#endif
-
-#ifdef HAVE_CHARSET_estonia
-
-/* The estonia character set. Generated automatically by
- * the ./conf_to_src program
- */
-
-static uchar ctype_estonia[] = {
- 0,
- 32, 32, 32, 32, 32, 32, 32, 32, 32, 40, 40, 40, 40, 40, 32, 32,
- 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,
- 72, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
- 132,132,132,132,132,132,132,132,132,132, 16, 16, 16, 16, 16, 16,
- 16,129,129,129,129,129,129, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 16, 16, 16, 16, 16,
- 16,130,130,130,130,130,130, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 16, 16, 16, 16, 32,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 72, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
- 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 16, 1, 1, 1, 1, 1, 1, 1, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 16, 2, 2, 2, 2, 2, 2, 2, 2
-};
-
-static uchar to_lower_estonia[] = {
- 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
- 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
- 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47,
- 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63,
- 64, 97, 98, 99,100,101,102,103,104,105,106,107,108,109,110,111,
- 112,113,114,115,116,117,118,119,120,121,122, 91, 92, 93, 94, 95,
- 96, 97, 98, 99,100,101,102,103,104,105,106,107,108,109,110,111,
- 112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,
- 128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,
- 144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,
- 160,161,162,163,164,165,166,167,184,169,186,171,172,173,174,191,
- 176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,
- 224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,
- 240,241,242,243,244,245,246,215,248,249,250,251,252,253,254,223,
- 224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,
- 240,241,242,243,244,245,246,247,248,249,250,251,252,253,254,255
-};
-
-static uchar to_upper_estonia[] = {
- 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
- 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
- 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47,
- 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63,
- 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79,
- 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95,
- 96, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79,
- 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90,123,124,125,126,127,
- 128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,
- 144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,
- 160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,
- 176,177,178,179,180,181,182,183,168,185,170,187,188,189,190,175,
- 192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,
- 208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,223,
- 192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,
- 208,209,210,211,212,213,214,247,216,217,218,219,220,221,222,255
-};
-
-static uchar sort_order_estonia[] = {
- 0, 2, 3, 4, 5, 6, 7, 8, 9, 46, 47, 48, 49, 50, 10, 11,
- 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27,
- 44, 51, 52, 53, 54, 55, 56, 39, 57, 58, 59, 93, 60, 40, 61, 62,
- 118,122,124,126,128,129,130,131,132,133, 63, 64, 94, 95, 96, 65,
- 66,134,144,146,152,154,164,166,170,172,178,180,184,190,192,198,
- 206,208,210,214,229,232,238,240,250,252,221, 67, 68, 69, 70, 71,
- 72,135,145,147,153,155,165,167,171,173,179,181,185,191,193,199,
- 207,209,211,215,230,233,239,241,251,253,222, 73, 74, 75, 76, 28,
- 1, 29, 87, 30, 90,116,113,114, 31,117, 32, 91, 33, 78, 82, 81,
- 34, 85, 86, 88, 89,115, 42, 43, 35,231, 36, 92, 37, 79, 84, 38,
- 45,254,102,103,104,255, 77,105,204,106,212, 98,107, 41,108,142,
- 109, 97,125,127, 80,110,111,112,205,123,213, 99,119,120,121,143,
- 140,176,136,148,244,138,162,160,150,156,223,158,168,182,174,186,
- 219,194,196,200,202,242,246,100,236,188,216,234,248,225,227,218,
- 141,177,137,149,245,139,163,161,151,157,224,159,169,183,175,187,
- 220,195,197,201,203,243,247,101,237,189,217,235,249,226,228, 83
-};
-#endif
-
-#ifdef HAVE_CHARSET_german1
-
-/* The german1 character set. Generated automatically by
- * the ./conf_to_src program
- */
-
-static uchar ctype_german1[] = {
- 0,
- 32, 32, 32, 32, 32, 32, 32, 32, 32, 40, 40, 40, 40, 40, 32, 32,
- 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,
- 72, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
- 132,132,132,132,132,132,132,132,132,132, 16, 16, 16, 16, 16, 16,
- 16,129,129,129,129,129,129, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 16, 16, 16, 16, 16,
- 16,130,130,130,130,130,130, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 16, 16, 16, 16, 32,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 72, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
- 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 16, 1, 1, 1, 1, 1, 1, 1, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 16, 2, 2, 2, 2, 2, 2, 2, 2
-};
-
-static uchar to_lower_german1[] = {
- 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
- 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
- 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47,
- 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63,
- 64, 97, 98, 99,100,101,102,103,104,105,106,107,108,109,110,111,
- 112,113,114,115,116,117,118,119,120,121,122, 91, 92, 93, 94, 95,
- 96, 97, 98, 99,100,101,102,103,104,105,106,107,108,109,110,111,
- 112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,
- 128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,
- 144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,
- 160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,
- 176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,
- 224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,
- 240,241,242,243,244,245,246,215,248,249,250,251,252,253,254,223,
- 224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,
- 240,241,242,243,244,245,246,247,248,249,250,251,252,253,254,255
-};
-
-static uchar to_upper_german1[] = {
- 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
- 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
- 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47,
- 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63,
- 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79,
- 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95,
- 96, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79,
- 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90,123,124,125,126,127,
- 128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,
- 144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,
- 160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,
- 176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,
- 192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,
- 208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,223,
- 192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,
- 208,209,210,211,212,213,214,247,216,217,218,219,220,221,222,255
-};
-
-static uchar sort_order_german1[] = {
- 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
- 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
- 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47,
- 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63,
- 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79,
- 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95,
- 96, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79,
- 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90,123,124,125,126,127,
- 128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,
- 144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,
- 160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,
- 176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,
- 65, 65, 65, 65, 65, 65, 65, 67, 69, 69, 69, 69, 73, 73, 73, 73,
- 208, 78, 79, 79, 79, 79, 79,215, 79, 85, 85, 85, 85, 89,222, 83,
- 65, 65, 65, 65, 65, 65, 65, 67, 69, 69, 69, 69, 73, 73, 73, 73,
- 208, 78, 79, 79, 79, 79, 79,247, 79, 85, 85, 85, 85, 89,222,255
-};
-#endif
-
-#ifdef HAVE_CHARSET_greek
-
-/* The greek character set. Generated automatically by
- * the ./conf_to_src program
- */
-
-static uchar ctype_greek[] = {
- 0,
- 32, 32, 32, 32, 32, 32, 32, 32, 32, 40, 40, 40, 40, 40, 32, 32,
- 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,
- 72, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
- 132,132,132,132,132,132,132,132,132,132, 16, 16, 16, 16, 16, 16,
- 16,129,129,129,129,129,129, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 16, 16, 16, 16, 16,
- 16,130,130,130,130,130,130, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 16, 16, 16, 16, 32,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 72, 16, 16, 16, 0, 0, 16, 16, 16, 16, 0, 16, 16, 16, 0, 16,
- 16, 16, 16, 16, 16, 16, 1, 16, 1, 1, 1, 16, 1, 16, 1, 1,
- 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 0
-};
-
-static uchar to_lower_greek[] = {
- 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
- 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
- 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47,
- 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63,
- 64, 97, 98, 99,100,101,102,103,104,105,106,107,108,109,110,111,
- 112,113,114,115,116,117,118,119,120,121,122, 91, 92, 93, 94, 95,
- 96, 97, 98, 99,100,101,102,103,104,105,106,107,108,109,110,111,
- 112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,
- 128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,
- 144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,
- 160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,
- 176,177,178,179,180,181,220,183,221,222,223,187,252,189,253,254,
- 192,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,
- 240,241,210,243,244,245,246,247,248,249,250,251,220,221,222,223,
- 224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,
- 240,241,242,243,244,245,246,247,248,249,250,251,252,253,254,255
-};
-
-static uchar to_upper_greek[] = {
- 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
- 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
- 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47,
- 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63,
- 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79,
- 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95,
- 96, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79,
- 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90,123,124,125,126,127,
- 128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,
- 144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,
- 160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,
- 176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,
- 218,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,
- 208,209,210,211,212,213,214,215,216,217,218,219,193,197,199,201,
- 219,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,
- 208,209,211,211,212,213,214,215,216,217,218,219,207,213,217,255
-};
-
-static uchar sort_order_greek[] = {
- 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
- 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
- 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47,
- 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63,
- 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79,
- 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95,
- 96, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79,
- 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90,123,124,125,126,127,
- 128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,
- 144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,
- 160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,
- 176,177,178,179,180,181,193,183,197,199,201,187,207,189,213,217,
- 201,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,
- 208,209,210,211,212,213,214,215,216,217,201,213,193,197,199,201,
- 213,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,
- 208,209,211,211,212,213,214,215,216,217,201,213,207,213,217,255
-};
-#endif
-
-#ifdef HAVE_CHARSET_hebrew
-
-/* The hebrew character set. Generated automatically by
- * the ./conf_to_src program
- */
-
-static uchar ctype_hebrew[] = {
- 0,
- 32, 32, 32, 32, 32, 32, 32, 32, 32, 40, 40, 40, 40, 40, 32, 32,
- 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,
- 72, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
- 132,132,132,132,132,132,132,132,132,132, 16, 16, 16, 16, 16, 16,
- 16,129,129,129,129,129,129, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 16, 16, 16, 16, 16,
- 16,130,130,130,130,130,130, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 16, 16, 16, 16, 32,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 72, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
- 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 0, 0, 0, 0, 0
-};
-
-static uchar to_lower_hebrew[] = {
- 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
- 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
- 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47,
- 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63,
- 64, 97, 98, 99,100,101,102,103,104,105,106,107,108,109,110,111,
- 112,113,114,115,116,117,118,119,120,121,122, 91, 92, 93, 94, 95,
- 96, 97, 98, 99,100,101,102,103,104,105,106,107,108,109,110,111,
- 112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,
- 128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,
- 144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,
- 160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,
- 176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,
- 192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,
- 208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,223,
- 224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,
- 240,241,242,243,244,245,246,247,248,249,250,251,252,253,254,255
-};
-
-static uchar to_upper_hebrew[] = {
- 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
- 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
- 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47,
- 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63,
- 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79,
- 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95,
- 96, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79,
- 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90,123,124,125,126,127,
- 128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,
- 144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,
- 160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,
- 176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,
- 192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,
- 208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,223,
- 224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,
- 240,241,242,243,244,245,246,247,248,249,250,251,252,253,254,255
-};
-
-static uchar sort_order_hebrew[] = {
- 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
- 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
- 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47,
- 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63,
- 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79,
- 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95,
- 96, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79,
- 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90,123,124,125,126,127,
- 128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,
- 144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,
- 160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,
- 176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,
- 192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,
- 208,209,210,211,212,213,214,247,216,217,218,219,220,221,222,255,
- 224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,
- 240,241,242,243,244,245,246,247,248,249,250,251,252,253,254,255
-};
-#endif
-
-#ifdef HAVE_CHARSET_hp8
-
-/* The hp8 character set. Generated automatically by
- * the ./conf_to_src program
- */
-
-static uchar ctype_hp8[] = {
- 0,
- 32, 32, 32, 32, 32, 32, 32, 32, 32, 40, 40, 40, 40, 40, 32, 32,
- 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,
- 72, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
- 132,132,132,132,132,132,132,132,132,132, 16, 16, 16, 16, 16, 16,
- 16,129,129,129,129,129,129, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 16, 16, 16, 16, 16,
- 16,130,130,130,130,130,130, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 16, 16, 16, 16, 32,
- 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,
- 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,
- 32, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
- 16, 32, 32, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
- 16, 16, 16, 16, 16, 2, 16, 16, 16, 16, 16, 16, 2, 16, 2, 2,
- 1, 16, 16, 1, 2, 16, 16, 2, 1, 16, 1, 1, 1, 16, 16, 16,
- 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
- 16, 16, 32, 32, 32, 32, 16, 16, 16, 16, 16, 16, 16, 16, 16, 32
-};
-
-static uchar to_lower_hp8[] = {
- 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
- 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
- 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47,
- 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63,
- 64, 97, 98, 99,100,101,102,103,104,105,106,107,108,109,110,111,
- 112,113,114,115,116,117,118,119,120,121,122, 91, 92, 93, 94, 95,
- 96, 97, 98, 99,100,101,102,103,104,105,106,107,108,109,110,111,
- 112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,
- 128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,
- 144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,
- 160,200,192,201,193,205,209,221,168,169,170,171,172,203,195,175,
- 176,178,178,179,181,181,183,183,184,185,186,187,188,189,190,191,
- 192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,
- 212,209,214,215,212,213,214,215,204,217,206,207,197,221,222,194,
- 196,226,226,228,228,213,217,198,202,234,234,236,236,199,239,239,
- 241,241,242,243,244,245,246,247,248,249,250,251,252,253,254,255
-};
-
-static uchar to_upper_hp8[] = {
- 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
- 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
- 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47,
- 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63,
- 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79,
- 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95,
- 96, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79,
- 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90,123,124,125,126,127,
- 128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,
- 144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,
- 160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,
- 176,177,177,179,180,180,182,182,184,185,186,187,188,189,190,191,
- 162,164,223,174,224,220,231,237,161,163,232,173,216,165,218,219,
- 208,166,210,211,208,229,210,211,216,230,218,219,220,167,222,223,
- 224,225,225,227,227,229,230,231,232,233,233,235,235,237,238,238,
- 240,240,242,243,244,245,246,247,248,249,250,251,252,253,254,255
-};
-
-static uchar sort_order_hp8[] = {
- 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
- 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
- 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47,
- 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63,
- 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79,
- 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 92, 93, 91, 94, 95,
- 96, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79,
- 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90,123,124,125,126,127,
- 128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,
- 144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,
- 160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,
- 176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,
- 192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,
- 208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,223,
- 224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,
- 240,241,242,243,244,245,246,247,248,249,250,251,252,253,254,255
-};
-#endif
-
-#ifdef HAVE_CHARSET_hungarian
-
-/* The hungarian character set. Generated automatically by
- * the ./conf_to_src program
- */
-
-static uchar ctype_hungarian[] = {
- 0,
- 32, 32, 32, 32, 32, 32, 32, 32, 32, 40, 40, 40, 40, 40, 32, 32,
- 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,
- 72, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
- 132,132,132,132,132,132,132,132,132,132, 16, 16, 16, 16, 16, 16,
- 16,129,129,129,129,129,129, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 16, 16, 16, 16, 16,
- 16,130,130,130,130,130,130, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 16, 16, 16, 16, 32,
- 32, 32, 32, 32, 32, 32, 32, 32, 40, 40, 40, 40, 40, 32, 32, 32,
- 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 72,
- 1, 16, 1, 16, 1, 1, 16, 0, 0, 1, 1, 1, 1, 16, 1, 1,
- 16, 2, 16, 2, 16, 2, 2, 16, 16, 2, 2, 2, 2, 16, 2, 2,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 16, 1, 1, 1, 1, 1, 1, 16, 1, 1, 1, 1, 1, 1, 1, 16,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 16, 2, 2, 2, 2, 2, 2, 2, 16
-};
-
-static uchar to_lower_hungarian[] = {
- 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
- 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
- 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47,
- 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63,
- 64, 97, 98, 99,100,101,102,103,104,105,106,107,108,109,110,111,
- 112,113,114,115,116,117,118,119,120,121,122, 91, 92, 93, 94, 95,
- 96, 97, 98, 99,100,101,102,103,104,105,106,107,108,109,110,111,
- 112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,
- 128,129,130,131,132,133,134,135,136,137,139,139,161,161,142,160,
- 130,145,146,147,148,162,150,163,150,148,129,155,156,157,158,159,
- 160,161,162,163,181,182,166,147,168,185,186,187,188,173,190,191,
- 176,177,178,179,180,225,182,183,184,185,186,187,188,189,190,191,
- 224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,
- 208,241,242,243,244,245,246,215,248,249,250,251,252,253,254,223,
- 162,225,226,227,228,229,230,231,232,233,234,150,236,237,238,239,
- 240,241,242,243,244,245,246,247,248,249,250,251,252,253,254,255
-};
-
-static uchar to_upper_hungarian[] = {
- 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
- 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
- 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47,
- 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63,
- 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79,
- 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95,
- 96, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79,
- 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90,123,124,125,126,127,
- 128,154,144,131,132,133,134,135,136,137,138,138,140,141,142,143,
- 144,145,146,167,153,149,152,151,152,153,154,155,156,157,158,159,
- 143,141,149,151,164,165,166,167,168,169,170,171,172,173,174,175,
- 176,160,178,162,180,181,165,183,184,169,170,171,172,189,174,175,
- 192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,
- 208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,223,
- 224,193,194,195,196,197,198,199,200,201,202,235,204,205,206,207,
- 240,209,210,211,212,213,214,247,216,217,218,219,220,221,222,255
-};
-
-static uchar sort_order_hungarian[] = {
- 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
- 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
- 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47,
- 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63,
- 64, 65, 71, 72, 76, 78, 83, 84, 85, 86, 90, 91, 92, 96, 97,100,
- 105,106,107,110,114,117,122,123,124,125,127,131,132,133,134,135,
- 136, 65, 71, 72, 76, 78, 83, 84, 85, 86, 90, 91, 92, 96, 97,100,
- 105,106,107,110,114,117,122,123,124,125,127,137,138,139,140, 0,
- 1,120, 78, 4, 5, 6, 7, 8, 9, 10,103,103, 86, 86, 15, 65,
- 78, 18, 19,103,103,100,120,117,120,103,120, 28, 29, 30, 31,255,
- 65, 86,100,117, 94,111,255,103,255,112,113,115,128,255,129,130,
- 255, 66,255, 93,255, 65,111,255,255,112,113,115,128,255,129,130,
- 108, 65, 68, 69, 70, 95, 73, 75, 74, 78, 81, 82, 80, 86, 87, 77,
- 255, 98, 99,100,102,103,103,255,109,119,117,120,120,126,116,255,
- 100, 65, 68, 69, 70, 95, 73, 75, 74, 78, 81,120, 80, 86, 88, 77,
- 255, 98, 99,100,102,103,103,255,109,119,117,120,120,126,116,255
-};
-#endif
-
-#ifdef HAVE_CHARSET_koi8_ru
-
-/* The koi8_ru character set. Generated automatically by
- * the ./conf_to_src program
- */
-
-static uchar ctype_koi8_ru[] = {
- 0,
- 32, 32, 32, 32, 32, 32, 32, 32, 32, 40, 40, 40, 40, 40, 32, 32,
- 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,
- 72, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
- 132,132,132,132,132,132,132,132,132,132, 16, 16, 16, 16, 16, 16,
- 16,129,129,129,129,129,129, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 16, 16, 16, 16, 16,
- 16,130,130,130,130,130,130, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 16, 16, 16, 16, 32,
- 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
- 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
- 16, 16, 16, 2, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
- 16, 16, 16, 1, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1
-};
-
-static uchar to_lower_koi8_ru[] = {
- 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
- 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
- 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47,
- 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63,
- 64, 97, 98, 99,100,101,102,103,104,105,106,107,108,109,110,111,
- 112,113,114,115,116,117,118,119,120,121,122, 91, 92, 93, 94, 95,
- 96, 97, 98, 99,100,101,102,103,104,105,106,107,108,109,110,111,
- 112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,
- 128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,
- 144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,
- 160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,
- 176,177,178,163,180,181,182,183,184,185,186,187,188,189,190,191,
- 192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,
- 208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,223,
- 192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,
- 208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,223
-};
-
-static uchar to_upper_koi8_ru[] = {
- 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
- 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
- 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47,
- 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63,
- 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79,
- 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95,
- 96, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79,
- 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90,123,124,125,126,127,
- 128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,
- 144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,
- 160,161,162,179,164,165,166,167,168,169,170,171,172,173,174,175,
- 176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,
- 224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,
- 240,241,242,243,244,245,246,247,248,249,250,251,252,253,254,255,
- 224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,
- 240,241,242,243,244,245,246,247,248,249,250,251,252,253,254,255
-};
-
-static uchar sort_order_koi8_ru[] = {
- 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
- 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
- 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47,
- 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63,
- 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79,
- 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95,
- 96, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79,
- 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90,123,124,125,126,127,
- 128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,
- 144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,
- 160,161,162,229,163,164,165,166,167,168,169,170,171,172,173,174,
- 175,176,177,229,178,179,180,181,182,183,184,185,186,187,188,189,
- 254,223,224,246,227,228,244,226,245,232,233,234,235,236,237,238,
- 239,255,240,241,242,243,230,225,252,251,231,248,253,249,247,250,
- 254,223,224,246,227,228,244,226,245,232,233,234,235,236,237,238,
- 239,255,240,241,242,243,230,225,252,251,231,248,253,249,247,250
-};
-
-static uint16 tab_koi8_r_uni[256]={
- 0,0x0001,0x0002,0x0003,0x0004,0x0005,0x0006,0x0007,
-0x0008,0x0009,0x000A,0x000B,0x000C,0x000D,0x000E,0x000F,
-0x0010,0x0011,0x0012,0x0013,0x0014,0x0015,0x0016,0x0017,
-0x0018,0x0019,0x001A,0x001B,0x001C,0x001D,0x001E,0x001F,
-0x0020,0x0021,0x0022,0x0023,0x0024,0x0025,0x0026,0x0027,
-0x0028,0x0029,0x002A,0x002B,0x002C,0x002D,0x002E,0x002F,
-0x0030,0x0031,0x0032,0x0033,0x0034,0x0035,0x0036,0x0037,
-0x0038,0x0039,0x003A,0x003B,0x003C,0x003D,0x003E,0x003F,
-0x0040,0x0041,0x0042,0x0043,0x0044,0x0045,0x0046,0x0047,
-0x0048,0x0049,0x004A,0x004B,0x004C,0x004D,0x004E,0x004F,
-0x0050,0x0051,0x0052,0x0053,0x0054,0x0055,0x0056,0x0057,
-0x0058,0x0059,0x005A,0x005B,0x005C,0x005D,0x005E,0x005F,
-0x0060,0x0061,0x0062,0x0063,0x0064,0x0065,0x0066,0x0067,
-0x0068,0x0069,0x006A,0x006B,0x006C,0x006D,0x006E,0x006F,
-0x0070,0x0071,0x0072,0x0073,0x0074,0x0075,0x0076,0x0077,
-0x0078,0x0079,0x007A,0x007B,0x007C,0x007D,0x007E,0x007F,
-0x2500,0x2502,0x250C,0x2510,0x2514,0x2518,0x251C,0x2524,
-0x252C,0x2534,0x253C,0x2580,0x2584,0x2588,0x258C,0x2590,
-0x2591,0x2592,0x2593,0x2320,0x25A0,0x2219,0x221A,0x2248,
-0x2264,0x2265,0x00A0,0x2321,0x00B0,0x00B2,0x00B7,0x00F7,
-0x2550,0x2551,0x2552,0x0451,0x2553,0x2554,0x2555,0x2556,
-0x2557,0x2558,0x2559,0x255A,0x255B,0x255C,0x255D,0x255E,
-0x255F,0x2560,0x2561,0x0401,0x2562,0x2563,0x2564,0x2565,
-0x2566,0x2567,0x2568,0x2569,0x256A,0x256B,0x256C,0x00A9,
-0x044E,0x0430,0x0431,0x0446,0x0434,0x0435,0x0444,0x0433,
-0x0445,0x0438,0x0439,0x043A,0x043B,0x043C,0x043D,0x043E,
-0x043F,0x044F,0x0440,0x0441,0x0442,0x0443,0x0436,0x0432,
-0x044C,0x044B,0x0437,0x0448,0x044D,0x0449,0x0447,0x044A,
-0x042E,0x0410,0x0411,0x0426,0x0414,0x0415,0x0424,0x0413,
-0x0425,0x0418,0x0419,0x041A,0x041B,0x041C,0x041D,0x041E,
-0x041F,0x042F,0x0420,0x0421,0x0422,0x0423,0x0416,0x0412,
-0x042C,0x042B,0x0417,0x0428,0x042D,0x0429,0x0427,0x042A
-};
-
-
-/* 0000-00F7 , 248 chars */
-static uchar tab_uni_koi8_r_plane00[]={
-0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F,
-0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F,
-0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F,
-0x30,0x31,0x32,0x33,0x34,0x35,0x36,0x37,0x38,0x39,0x3A,0x3B,0x3C,0x3D,0x3E,0x3F,
-0x40,0x41,0x42,0x43,0x44,0x45,0x46,0x47,0x48,0x49,0x4A,0x4B,0x4C,0x4D,0x4E,0x4F,
-0x50,0x51,0x52,0x53,0x54,0x55,0x56,0x57,0x58,0x59,0x5A,0x5B,0x5C,0x5D,0x5E,0x5F,
-0x60,0x61,0x62,0x63,0x64,0x65,0x66,0x67,0x68,0x69,0x6A,0x6B,0x6C,0x6D,0x6E,0x6F,
-0x70,0x71,0x72,0x73,0x74,0x75,0x76,0x77,0x78,0x79,0x7A,0x7B,0x7C,0x7D,0x7E,0x7F,
-0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
-0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
-0x9A,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xBF,0x00,0x00,0x00,0x00,0x00,0x00,
-0x9C,0x00,0x9D,0x00,0x00,0x00,0x00,0x9E,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
-0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
-0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
-0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
-0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x9F};
-
-/* 0401-0451 , 81 chars */
-static uchar tab_uni_koi8_r_plane04[]={
-0xB3,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xE1,
-0xE2,0xF7,0xE7,0xE4,0xE5,0xF6,0xFA,0xE9,0xEA,0xEB,0xEC,0xED,0xEE,0xEF,0xF0,0xF2,
-0xF3,0xF4,0xF5,0xE6,0xE8,0xE3,0xFE,0xFB,0xFD,0xFF,0xF9,0xF8,0xFC,0xE0,0xF1,0xC1,
-0xC2,0xD7,0xC7,0xC4,0xC5,0xD6,0xDA,0xC9,0xCA,0xCB,0xCC,0xCD,0xCE,0xCF,0xD0,0xD2,
-0xD3,0xD4,0xD5,0xC6,0xC8,0xC3,0xDE,0xDB,0xDD,0xDF,0xD9,0xD8,0xDC,0xC0,0xD1,0x00,
-0xA3};
-
-/* 2500-25A0 , 161 chars */
-static uchar tab_uni_koi8_r_plane25[]={
-0x80,0x00,0x81,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x82,0x00,0x00,0x00,
-0x83,0x00,0x00,0x00,0x84,0x00,0x00,0x00,0x85,0x00,0x00,0x00,0x86,0x00,0x00,0x00,
-0x00,0x00,0x00,0x00,0x87,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x88,0x00,0x00,0x00,
-0x00,0x00,0x00,0x00,0x89,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x8A,0x00,0x00,0x00,
-0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
-0xA0,0xA1,0xA2,0xA4,0xA5,0xA6,0xA7,0xA8,0xA9,0xAA,0xAB,0xAC,0xAD,0xAE,0xAF,0xB0,
-0xB1,0xB2,0xB4,0xB5,0xB6,0xB7,0xB8,0xB9,0xBA,0xBB,0xBC,0xBD,0xBE,0x00,0x00,0x00,
-0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
-0x8B,0x00,0x00,0x00,0x8C,0x00,0x00,0x00,0x8D,0x00,0x00,0x00,0x8E,0x00,0x00,0x00,
-0x8F,0x90,0x91,0x92,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
-0x94};
-
-/* 2219-2265 , 77 chars */
-static uchar tab_uni_koi8_r_plane22[]={
-0x95,0x96,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
-0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
-0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x97,
-0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
-0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x98,0x99};
-
-/* 2320-2321 , 2 chars */
-static uchar tab_uni_koi8_r_plane23[]={
-0x93,0x9B};
-
-
-static MY_UNI_IDX idx_uni_koi8_r[]={
- {0x0000,0x00F7,tab_uni_koi8_r_plane00},
- {0x0401,0x0451,tab_uni_koi8_r_plane04},
- {0x2500,0x25A0,tab_uni_koi8_r_plane25},
- {0x2219,0x2265,tab_uni_koi8_r_plane22},
- {0x2320,0x2321,tab_uni_koi8_r_plane23},
- {0,0,NULL}
-};
-
-#endif
-
-#ifdef HAVE_CHARSET_koi8_ukr
-
-/* The koi8_ukr character set. Generated automatically by
- * the ./conf_to_src program
- */
-
-static uchar ctype_koi8_ukr[] = {
- 0,
- 32, 32, 32, 32, 32, 32, 32, 32, 32, 40, 40, 40, 40, 40, 32, 32,
- 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,
- 72, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
- 132,132,132,132,132,132,132,132,132,132, 16, 16, 16, 16, 16, 16,
- 16,129,129,129,129,129,129, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 16, 16, 16, 16, 16,
- 16,130,130,130,130,130,130, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 16, 16, 16, 16, 32,
- 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
- 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
- 16, 16, 16, 2, 2, 16, 2, 2, 16, 16, 16, 16, 16, 2, 16, 16,
- 16, 16, 16, 1, 1, 16, 1, 1, 16, 16, 16, 16, 16, 1, 16, 16,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1
-};
-
-static uchar to_lower_koi8_ukr[] = {
- 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
- 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
- 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47,
- 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63,
- 64, 97, 98, 99,100,101,102,103,104,105,106,107,108,109,110,111,
- 112,113,114,115,116,117,118,119,120,121,122, 91, 92, 93, 94, 95,
- 32, 97, 98, 99,100,101,102,103,104,105,106,107,108,109,110,111,
- 112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,
- 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,
- 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,
- 32, 32, 32,163,164, 32,166,167, 32, 32, 32, 32, 32,173, 32, 32,
- 32, 32, 32,163,164, 32,166,167, 32, 32, 32, 32, 32,173, 32, 32,
- 192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,
- 208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,223,
- 192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,
- 208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,223
-};
-
-static uchar to_upper_koi8_ukr[] = {
- 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
- 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
- 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47,
- 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63,
- 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79,
- 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95,
- 32, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79,
- 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90,123,124,125,126,127,
- 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,
- 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,
- 32, 32, 32,179,180, 32,182,183, 32, 32, 32, 32, 32,189, 32, 32,
- 32, 32, 32,179,180, 32,182,183, 32, 32, 32, 32, 32,189, 32, 32,
- 224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,
- 240,241,242,243,244,245,246,247,248,249,250,251,252,253,254,255,
- 224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,
- 240,241,242,243,244,245,246,247,248,249,250,251,252,253,254,255
-};
-
-static uchar sort_order_koi8_ukr[] = {
- 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
- 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
- 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47,
- 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63,
- 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79,
- 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95,
- 32, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79,
- 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90,123,124,125,126,127,
- 165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,
- 181,182,183,184,185,186,187,188,189,190,191,192,193,194,195,196,
- 197,198,199,136,135,200,140,141,201,202,203,204,205,132,206,207,
- 208,209,210,136,135,211,140,141,212,213,214,215,216,132,217,218,
- 163,128,129,155,133,134,153,131,154,139,142,143,144,145,146,147,
- 148,164,149,150,151,152,137,130,161,160,138,157,162,158,156,159,
- 163,128,129,155,133,134,153,131,154,139,142,143,144,145,146,147,
- 148,164,149,150,151,152,137,130,161,160,138,157,162,158,156,159
-};
-
-static uint16 tab_koi8_u_uni[256]={
- 0,0x0001,0x0002,0x0003,0x0004,0x0005,0x0006,0x0007,
-0x0008,0x0009,0x000A,0x000B,0x000C,0x000D,0x000E,0x000F,
-0x0010,0x0011,0x0012,0x0013,0x0014,0x0015,0x0016,0x0017,
-0x0018,0x0019,0x001A,0x001B,0x001C,0x001D,0x001E,0x001F,
-0x0020,0x0021,0x0022,0x0023,0x0024,0x0025,0x0026,0x0027,
-0x0028,0x0029,0x002A,0x002B,0x002C,0x002D,0x002E,0x002F,
-0x0030,0x0031,0x0032,0x0033,0x0034,0x0035,0x0036,0x0037,
-0x0038,0x0039,0x003A,0x003B,0x003C,0x003D,0x003E,0x003F,
-0x0040,0x0041,0x0042,0x0043,0x0044,0x0045,0x0046,0x0047,
-0x0048,0x0049,0x004A,0x004B,0x004C,0x004D,0x004E,0x004F,
-0x0050,0x0051,0x0052,0x0053,0x0054,0x0055,0x0056,0x0057,
-0x0058,0x0059,0x005A,0x005B,0x005C,0x005D,0x005E,0x005F,
-0x0060,0x0061,0x0062,0x0063,0x0064,0x0065,0x0066,0x0067,
-0x0068,0x0069,0x006A,0x006B,0x006C,0x006D,0x006E,0x006F,
-0x0070,0x0071,0x0072,0x0073,0x0074,0x0075,0x0076,0x0077,
-0x0078,0x0079,0x007A,0x007B,0x007C,0x007D,0x007E, 0,
-0x2500,0x2502,0x250C,0x2510,0x2514,0x2518,0x251C,0x2524,
-0x252C,0x2534,0x253C,0x2580,0x2584,0x2588,0x258C,0x2590,
-0x2591,0x2592,0x2593,0x2320,0x25A0,0x2022,0x221A,0x2248,
-0x2264,0x2265,0x00A0,0x2321,0x00B0,0x00B2,0x00B7,0x00F7,
-0x2550,0x2551,0x2552,0x0451,0x0454,0x2554,0x0456,0x0457,
-0x2557,0x2558,0x2559,0x255A,0x255B,0x0491,0x255D,0x255E,
-0x255F,0x2560,0x2561,0x0401,0x0404,0x2563,0x0406,0x0407,
-0x2566,0x2567,0x2568,0x2569,0x256A,0x0490,0x256C,0x00A9,
-0x044E,0x0430,0x0431,0x0446,0x0434,0x0435,0x0444,0x0433,
-0x0445,0x0438,0x0439,0x043A,0x043B,0x043C,0x043D,0x043E,
-0x043F,0x044F,0x0440,0x0441,0x0442,0x0443,0x0436,0x0432,
-0x044C,0x044B,0x0437,0x0448,0x044D,0x0449,0x0447,0x044A,
-0x042E,0x0410,0x0411,0x0426,0x0414,0x0415,0x0424,0x0413,
-0x0425,0x0418,0x0419,0x041A,0x041B,0x041C,0x041D,0x041E,
-0x041F,0x042F,0x0420,0x0421,0x0422,0x0423,0x0416,0x0412,
-0x042C,0x042B,0x0417,0x0428,0x042D,0x0429,0x0427,0x042A
-};
-
-
-/* 0000-00F7 , 248 chars */
-static uchar tab_uni_koi8_u_plane00[]={
-0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F,
-0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F,
-0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F,
-0x30,0x31,0x32,0x33,0x34,0x35,0x36,0x37,0x38,0x39,0x3A,0x3B,0x3C,0x3D,0x3E,0x3F,
-0x40,0x41,0x42,0x43,0x44,0x45,0x46,0x47,0x48,0x49,0x4A,0x4B,0x4C,0x4D,0x4E,0x4F,
-0x50,0x51,0x52,0x53,0x54,0x55,0x56,0x57,0x58,0x59,0x5A,0x5B,0x5C,0x5D,0x5E,0x5F,
-0x60,0x61,0x62,0x63,0x64,0x65,0x66,0x67,0x68,0x69,0x6A,0x6B,0x6C,0x6D,0x6E,0x6F,
-0x70,0x71,0x72,0x73,0x74,0x75,0x76,0x77,0x78,0x79,0x7A,0x7B,0x7C,0x7D,0x7E,0x00,
-0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
-0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
-0x9A,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xBF,0x00,0x00,0x00,0x00,0x00,0x00,
-0x9C,0x00,0x9D,0x00,0x00,0x00,0x00,0x9E,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
-0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
-0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
-0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
-0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x9F};
-
-/* 0401-0491 , 145 chars */
-static uchar tab_uni_koi8_u_plane04[]={
-0xB3,0x00,0x00,0xB4,0x00,0xB6,0xB7,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xE1,
-0xE2,0xF7,0xE7,0xE4,0xE5,0xF6,0xFA,0xE9,0xEA,0xEB,0xEC,0xED,0xEE,0xEF,0xF0,0xF2,
-0xF3,0xF4,0xF5,0xE6,0xE8,0xE3,0xFE,0xFB,0xFD,0xFF,0xF9,0xF8,0xFC,0xE0,0xF1,0xC1,
-0xC2,0xD7,0xC7,0xC4,0xC5,0xD6,0xDA,0xC9,0xCA,0xCB,0xCC,0xCD,0xCE,0xCF,0xD0,0xD2,
-0xD3,0xD4,0xD5,0xC6,0xC8,0xC3,0xDE,0xDB,0xDD,0xDF,0xD9,0xD8,0xDC,0xC0,0xD1,0x00,
-0xA3,0x00,0x00,0xA4,0x00,0xA6,0xA7,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
-0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
-0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
-0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xBD,
-0xAD};
-
-/* 2500-25A0 , 161 chars */
-static uchar tab_uni_koi8_u_plane25[]={
-0x80,0x00,0x81,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x82,0x00,0x00,0x00,
-0x83,0x00,0x00,0x00,0x84,0x00,0x00,0x00,0x85,0x00,0x00,0x00,0x86,0x00,0x00,0x00,
-0x00,0x00,0x00,0x00,0x87,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x88,0x00,0x00,0x00,
-0x00,0x00,0x00,0x00,0x89,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x8A,0x00,0x00,0x00,
-0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
-0xA0,0xA1,0xA2,0x00,0xA5,0x00,0x00,0xA8,0xA9,0xAA,0xAB,0xAC,0x00,0xAE,0xAF,0xB0,
-0xB1,0xB2,0x00,0xB5,0x00,0x00,0xB8,0xB9,0xBA,0xBB,0xBC,0x00,0xBE,0x00,0x00,0x00,
-0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
-0x8B,0x00,0x00,0x00,0x8C,0x00,0x00,0x00,0x8D,0x00,0x00,0x00,0x8E,0x00,0x00,0x00,
-0x8F,0x90,0x91,0x92,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
-0x94};
-
-/* 221A-2265 , 76 chars */
-static uchar tab_uni_koi8_u_plane22[]={
-0x96,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
-0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
-0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x97,0x00,
-0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
-0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x98,0x99};
-
-/* 2320-2321 , 2 chars */
-static uchar tab_uni_koi8_u_plane23[]={
-0x93,0x9B};
-
-/* 2022-2022 , 1 chars */
-static uchar tab_uni_koi8_u_plane20[]={
-0x95};
-
-
-static MY_UNI_IDX idx_uni_koi8_u[]={
- {0x0000,0x00F7,tab_uni_koi8_u_plane00},
- {0x0401,0x0491,tab_uni_koi8_u_plane04},
- {0x2500,0x25A0,tab_uni_koi8_u_plane25},
- {0x221A,0x2265,tab_uni_koi8_u_plane22},
- {0x2320,0x2321,tab_uni_koi8_u_plane23},
- {0x2022,0x2022,tab_uni_koi8_u_plane20},
- {0,0,NULL}
-};
-
-#endif
-
-#ifdef HAVE_CHARSET_latin1
-
-/* The latin1 character set. Generated automatically by
- * the ./conf_to_src program
- */
-
-static uchar ctype_latin1[] = {
- 0,
- 32, 32, 32, 32, 32, 32, 32, 32, 32, 40, 40, 40, 40, 40, 32, 32,
- 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,
- 72, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
- 132,132,132,132,132,132,132,132,132,132, 16, 16, 16, 16, 16, 16,
- 16,129,129,129,129,129,129, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 16, 16, 16, 16, 16,
- 16,130,130,130,130,130,130, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 16, 16, 16, 16, 32,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 72, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
- 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 16, 1, 1, 1, 1, 1, 1, 1, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 16, 2, 2, 2, 2, 2, 2, 2, 2
-};
-
-static uchar to_lower_latin1[] = {
- 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
- 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
- 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47,
- 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63,
- 64, 97, 98, 99,100,101,102,103,104,105,106,107,108,109,110,111,
- 112,113,114,115,116,117,118,119,120,121,122, 91, 92, 93, 94, 95,
- 96, 97, 98, 99,100,101,102,103,104,105,106,107,108,109,110,111,
- 112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,
- 128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,
- 144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,
- 160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,
- 176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,
- 224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,
- 240,241,242,243,244,245,246,215,248,249,250,251,252,253,254,223,
- 224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,
- 240,241,242,243,244,245,246,247,248,249,250,251,252,253,254,255
-};
-
-static uchar to_upper_latin1[] = {
- 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
- 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
- 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47,
- 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63,
- 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79,
- 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95,
- 96, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79,
- 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90,123,124,125,126,127,
- 128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,
- 144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,
- 160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,
- 176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,
- 192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,
- 208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,223,
- 192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,
- 208,209,210,211,212,213,214,247,216,217,218,219,220,221,222,255
-};
-
-static uchar sort_order_latin1[] = {
- 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
- 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
- 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47,
- 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63,
- 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79,
- 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95,
- 96, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79,
- 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90,123,124,125,126,127,
- 128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,
- 144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,
- 160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,
- 176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,
- 65, 65, 65, 65, 92, 91, 92, 67, 69, 69, 69, 69, 73, 73, 73, 73,
- 68, 78, 79, 79, 79, 79, 93,215,216, 85, 85, 85, 89, 89,222,223,
- 65, 65, 65, 65, 92, 91, 92, 67, 69, 69, 69, 69, 73, 73, 73, 73,
- 68, 78, 79, 79, 79, 79, 93,247,216, 85, 85, 85, 89, 89,222,255
-};
-#endif
-
-#ifdef HAVE_CHARSET_latin2
-
-/* The latin2 character set. Generated automatically by
- * the ./conf_to_src program
- */
-
-static uchar ctype_latin2[] = {
- 0,
- 32, 32, 32, 32, 32, 32, 32, 32, 32, 40, 40, 40, 40, 40, 32, 32,
- 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,
- 72, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
- 132,132,132,132,132,132,132,132,132,132, 16, 16, 16, 16, 16, 16,
- 16,129,129,129,129,129,129, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 16, 16, 16, 16, 16,
- 16,130,130,130,130,130,130, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 16, 16, 16, 16, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 72, 1, 16, 1, 16, 1, 1, 16, 16, 1, 1, 1, 1, 16, 1, 1,
- 16, 2, 16, 2, 16, 2, 2, 16, 16, 2, 2, 2, 2, 16, 2, 2,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 16, 1, 1, 1, 1, 1, 1, 16, 1, 1, 1, 1, 1, 1, 1, 16,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 16, 2, 2, 2, 2, 2, 2, 2, 16
-};
-
-static uchar to_lower_latin2[] = {
- 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
- 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
- 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47,
- 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63,
- 64, 97, 98, 99,100,101,102,103,104,105,106,107,108,109,110,111,
- 112,113,114,115,116,117,118,119,120,121,122, 91, 92, 93, 94, 95,
- 96, 97, 98, 99,100,101,102,103,104,105,106,107,108,109,110,111,
- 112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,
- 128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,
- 144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,
- 160,177,162,179,164,181,182,167,168,185,186,187,188,173,190,191,
- 176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,
- 224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,
- 208,241,242,243,244,245,246,215,248,249,250,251,252,253,254,223,
- 224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,
- 240,241,242,243,244,245,246,247,248,249,250,251,252,253,254,255
-};
-
-static uchar to_upper_latin2[] = {
- 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
- 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
- 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47,
- 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63,
- 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79,
- 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95,
- 96, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79,
- 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90,123,124,125,126,127,
- 128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,
- 144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,
- 160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,
- 176,161,178,163,180,165,166,183,184,169,170,171,172,189,174,175,
- 192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,
- 208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,223,
- 192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,
- 240,209,210,211,212,213,214,247,216,217,218,219,220,221,222,255
-};
-
-static uchar sort_order_latin2[] = {
- 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
- 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
- 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47,
- 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63,
- 64, 65, 68, 69, 72, 73, 75, 76, 77, 78, 79, 80, 81, 83, 84, 86,
- 88, 89, 90, 91, 94, 95, 96, 97, 98, 99,100,104,105,106,107,108,
- 109, 65, 68, 69, 72, 73, 75, 76, 77, 78, 79, 80, 81, 83, 84, 86,
- 88, 89, 90, 91, 94, 95, 96, 97, 98, 99,100,110,111,112,113,255,
- 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,
- 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,
- 255, 66,255, 82,255, 81, 92,255,255, 93, 91, 94,101,255,103,102,
- 255, 66,255, 82,255, 81, 92,255,255, 93, 91, 94,101,255,103,102,
- 90, 67, 67, 67, 67, 81, 70, 69, 71, 73, 74, 73, 73, 78, 78, 72,
- 255, 85, 84, 87, 86, 86, 86,255, 90, 95, 95, 95, 95, 99, 94,255,
- 90, 67, 67, 67, 67, 81, 70, 69, 71, 73, 74, 73, 73, 78, 78, 72,
- 255, 85, 84, 87, 86, 86, 86,255, 90, 95, 95, 95, 95, 99, 94,255
-};
-#endif
-
-#ifdef HAVE_CHARSET_latin5
-
-/* The latin5 character set. Generated automatically by
- * the ./conf_to_src program
- */
-
-static uchar ctype_latin5[] = {
- 0,
- 32, 32, 32, 32, 32, 32, 32, 32, 32, 40, 40, 40, 40, 40, 32, 32,
- 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,
- 72, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
- 132,132,132,132,132,132,132,132,132,132, 16, 16, 16, 16, 16, 16,
- 16,129,129,129,129,129,129, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 16, 16, 16, 16, 16,
- 16,130,130,130,130,130,130, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 16, 16, 16, 16, 32,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 72, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
- 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 16, 1, 1, 1, 1, 1, 1, 1, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 16, 2, 2, 2, 2, 2, 2, 2, 2
-};
-
-static uchar to_lower_latin5[] = {
- 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
- 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
- 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47,
- 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63,
- 64, 97, 98, 99,100,101,102,103,104,253,106,107,108,109,110,111,
- 112,113,114,115,116,117,118,119,120,121,122, 91, 92, 93, 94, 95,
- 96, 97, 98, 99,100,101,102,103,104,105,106,107,108,109,110,111,
- 112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,
- 128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,
- 144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,
- 160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,
- 176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,
- 224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,
- 240,241,242,243,244,245,246,215,248,249,250,251,252,105,254,223,
- 224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,
- 240,241,242,243,244,245,246,247,248,249,250,251,252,253,254,255
-};
-
-static uchar to_upper_latin5[] = {
- 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
- 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
- 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47,
- 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63,
- 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79,
- 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95,
- 96, 65, 66, 67, 68, 69, 70, 71, 72,221, 74, 75, 76, 77, 78, 79,
- 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90,123,124,125,126,127,
- 128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,
- 144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,
- 160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,
- 176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,
- 192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,
- 208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,223,
- 192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,
- 208,209,210,211,212,213,214,247,216,217,218,219,220, 73,222,255
-};
-
-static uchar sort_order_latin5[] = {
- 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
- 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
- 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47,
- 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63,
- 64, 65, 66, 67, 69, 70, 71, 72, 74, 75, 77, 78, 79, 80, 81, 82,
- 84, 85, 86, 87, 89, 90, 92, 93, 94, 95, 96, 97, 98, 99,100,101,
- 102, 65, 66, 67, 69, 70, 71, 72, 74, 76, 77, 78, 79, 80, 81, 82,
- 84, 85, 86, 87, 89, 90, 92, 93, 94, 95, 96,135,136,137,138,139,
- 140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,
- 156,157,158,159,160,161,162,163,164,165,166,167,168,169,170,171,
- 172,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,
- 188,189,190,191,192,193,194,195,196,197,198,199,200,201,202,203,
- 204,205,206,207,208,209,210, 68,211,212,213,214,215,216,217,218,
- 73,219,220,221,222,223, 83,224,225,226,227,228, 91, 76, 88,229,
- 204,205,206,207,208,209,210, 68,211,212,213,214,215,216,217,218,
- 73,219,220,221,222,223, 83,250,225,226,227,228, 91, 75, 88,255
-};
-
-static uint16 tab_8859_9_uni[256]={
- 0,0x0001,0x0002,0x0003,0x0004,0x0005,0x0006,0x0007,
-0x0008,0x0009,0x000A,0x000B,0x000C,0x000D,0x000E,0x000F,
-0x0010,0x0011,0x0012,0x0013,0x0014,0x0015,0x0016,0x0017,
-0x0018,0x0019,0x001A,0x001B,0x001C,0x001D,0x001E,0x001F,
-0x0020,0x0021,0x0022,0x0023,0x0024,0x0025,0x0026,0x0027,
-0x0028,0x0029,0x002A,0x002B,0x002C,0x002D,0x002E,0x002F,
-0x0030,0x0031,0x0032,0x0033,0x0034,0x0035,0x0036,0x0037,
-0x0038,0x0039,0x003A,0x003B,0x003C,0x003D,0x003E,0x003F,
-0x0040,0x0041,0x0042,0x0043,0x0044,0x0045,0x0046,0x0047,
-0x0048,0x0049,0x004A,0x004B,0x004C,0x004D,0x004E,0x004F,
-0x0050,0x0051,0x0052,0x0053,0x0054,0x0055,0x0056,0x0057,
-0x0058,0x0059,0x005A,0x005B,0x005C,0x005D,0x005E,0x005F,
-0x0060,0x0061,0x0062,0x0063,0x0064,0x0065,0x0066,0x0067,
-0x0068,0x0069,0x006A,0x006B,0x006C,0x006D,0x006E,0x006F,
-0x0070,0x0071,0x0072,0x0073,0x0074,0x0075,0x0076,0x0077,
-0x0078,0x0079,0x007A,0x007B,0x007C,0x007D,0x007E, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
-0x00A0,0x00A1,0x00A2,0x00A3,0x00A4,0x00A5,0x00A6,0x00A7,
-0x00A8,0x00A9,0x00AA,0x00AB,0x00AC,0x00AD,0x00AE,0x00AF,
-0x00B0,0x00B1,0x00B2,0x00B3,0x00B4,0x00B5,0x00B6,0x00B7,
-0x00B8,0x00B9,0x00BA,0x00BB,0x00BC,0x00BD,0x00BE,0x00BF,
-0x00C0,0x00C1,0x00C2,0x00C3,0x00C4,0x00C5,0x00C6,0x00C7,
-0x00C8,0x00C9,0x00CA,0x00CB,0x00CC,0x00CD,0x00CE,0x00CF,
-0x011E,0x00D1,0x00D2,0x00D3,0x00D4,0x00D5,0x00D6,0x00D7,
-0x00D8,0x00D9,0x00DA,0x00DB,0x00DC,0x0130,0x015E,0x00DF,
-0x00E0,0x00E1,0x00E2,0x00E3,0x00E4,0x00E5,0x00E6,0x00E7,
-0x00E8,0x00E9,0x00EA,0x00EB,0x00EC,0x00ED,0x00EE,0x00EF,
-0x011F,0x00F1,0x00F2,0x00F3,0x00F4,0x00F5,0x00F6,0x00F7,
-0x00F8,0x00F9,0x00FA,0x00FB,0x00FC,0x0131,0x015F,0x00FF
-};
-
-
-/* 0000-00FF , 256 chars */
-static uchar tab_uni_8859_9_plane00[]={
-0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F,
-0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F,
-0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F,
-0x30,0x31,0x32,0x33,0x34,0x35,0x36,0x37,0x38,0x39,0x3A,0x3B,0x3C,0x3D,0x3E,0x3F,
-0x40,0x41,0x42,0x43,0x44,0x45,0x46,0x47,0x48,0x49,0x4A,0x4B,0x4C,0x4D,0x4E,0x4F,
-0x50,0x51,0x52,0x53,0x54,0x55,0x56,0x57,0x58,0x59,0x5A,0x5B,0x5C,0x5D,0x5E,0x5F,
-0x60,0x61,0x62,0x63,0x64,0x65,0x66,0x67,0x68,0x69,0x6A,0x6B,0x6C,0x6D,0x6E,0x6F,
-0x70,0x71,0x72,0x73,0x74,0x75,0x76,0x77,0x78,0x79,0x7A,0x7B,0x7C,0x7D,0x7E,0x00,
-0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
-0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
-0xA0,0xA1,0xA2,0xA3,0xA4,0xA5,0xA6,0xA7,0xA8,0xA9,0xAA,0xAB,0xAC,0xAD,0xAE,0xAF,
-0xB0,0xB1,0xB2,0xB3,0xB4,0xB5,0xB6,0xB7,0xB8,0xB9,0xBA,0xBB,0xBC,0xBD,0xBE,0xBF,
-0xC0,0xC1,0xC2,0xC3,0xC4,0xC5,0xC6,0xC7,0xC8,0xC9,0xCA,0xCB,0xCC,0xCD,0xCE,0xCF,
-0x00,0xD1,0xD2,0xD3,0xD4,0xD5,0xD6,0xD7,0xD8,0xD9,0xDA,0xDB,0xDC,0x00,0x00,0xDF,
-0xE0,0xE1,0xE2,0xE3,0xE4,0xE5,0xE6,0xE7,0xE8,0xE9,0xEA,0xEB,0xEC,0xED,0xEE,0xEF,
-0x00,0xF1,0xF2,0xF3,0xF4,0xF5,0xF6,0xF7,0xF8,0xF9,0xFA,0xFB,0xFC,0x00,0x00,0xFF};
-
-/* 011E-015F , 66 chars */
-static uchar tab_uni_8859_9_plane01[]={
-0xD0,0xF0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
-0x00,0x00,0xDD,0xFD,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
-0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
-0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
-0xDE,0xFE};
-
-
-static MY_UNI_IDX idx_uni_8859_9[]={
- {0x0000,0x00FF,tab_uni_8859_9_plane00},
- {0x011E,0x015F,tab_uni_8859_9_plane01},
- {0,0,NULL}
-};
-
-#endif
-
-#ifdef HAVE_CHARSET_swe7
-
-/* The swe7 character set. Generated automatically by
- * the ./conf_to_src program
- */
-
-static uchar ctype_swe7[] = {
- 0,
- 32, 32, 32, 32, 32, 32, 32, 32, 32, 40, 40, 40, 40, 40, 32, 32,
- 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,
- 72, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
- 132,132,132,132,132,132,132,132,132,132, 16, 16, 16, 16, 16, 16,
- 1,129,129,129,129,129,129, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 16,
- 1,130,130,130,130,130,130, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 32,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
-};
-
-static uchar to_lower_swe7[] = {
- 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
- 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
- 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47,
- 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63,
- 96, 97, 98, 99,100,101,102,103,104,105,106,107,108,109,110,111,
- 112,113,114,115,116,117,118,119,120,121,122,123,124,125,126, 95,
- 96, 97, 98, 99,100,101,102,103,104,105,106,107,108,109,110,111,
- 112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,
- 128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,
- 144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,
- 160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,
- 176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,
- 192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,
- 208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,223,
- 224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,
- 240,241,242,243,244,245,246,247,248,249,250,251,252,253,254,255
-};
-
-static uchar to_upper_swe7[] = {
- 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
- 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
- 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47,
- 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63,
- 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79,
- 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95,
- 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79,
- 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94,127,
- 128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,
- 144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,
- 160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,
- 176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,
- 192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,
- 208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,223,
- 224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,
- 240,241,242,243,244,245,246,247,248,249,250,251,252,253,254,255
-};
-
-static uchar sort_order_swe7[] = {
- 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
- 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
- 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47,
- 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63,
- 69, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79,
- 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 92, 93, 91, 89, 95,
- 69, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79,
- 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 92, 93, 91, 89,127,
- 128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,
- 144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,
- 160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,
- 176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,
- 192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,
- 208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,223,
- 224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,
- 240,241,242,243,244,245,246,247,248,249,250,251,252,253,254,255
-};
-#endif
-
-#ifdef HAVE_CHARSET_usa7
-
-/* The usa7 character set. Generated automatically by
- * the ./conf_to_src program
- */
-
-static uchar ctype_usa7[] = {
- 0,
- 32, 32, 32, 32, 32, 32, 32, 32, 32, 40, 40, 40, 40, 40, 32, 32,
- 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,
- 72, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
- 132,132,132,132,132,132,132,132,132,132, 16, 16, 16, 16, 16, 16,
- 16,129,129,129,129,129,129, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 16, 16, 16, 16, 16,
- 16,130,130,130,130,130,130, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 16, 16, 16, 16, 32,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
-};
-
-static uchar to_lower_usa7[] = {
- 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
- 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
- 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47,
- 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63,
- 64, 97, 98, 99,100,101,102,103,104,105,106,107,108,109,110,111,
- 112,113,114,115,116,117,118,119,120,121,122, 91, 92, 93, 94, 95,
- 96, 97, 98, 99,100,101,102,103,104,105,106,107,108,109,110,111,
- 112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,
- 128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,
- 144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,
- 160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,
- 176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,
- 192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,
- 208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,223,
- 224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,
- 240,241,242,243,244,245,246,247,248,249,250,251,252,253,254,255
-};
-
-static uchar to_upper_usa7[] = {
- 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
- 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
- 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47,
- 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63,
- 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79,
- 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95,
- 96, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79,
- 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90,123,124,125,126,127,
- 128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,
- 144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,
- 160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,
- 176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,
- 192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,
- 208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,223,
- 224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,
- 240,241,242,243,244,245,246,247,248,249,250,251,252,253,254,255
-};
-
-static uchar sort_order_usa7[] = {
- 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
- 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
- 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47,
- 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63,
- 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79,
- 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 92, 93, 91, 94, 95,
- 69, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79,
- 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90,123,124,125, 89,127,
- 128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,
- 144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,
- 160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,
- 176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,
- 192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,
- 208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,223,
- 224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,
- 240,241,242,243,244,245,246,247,248,249,250,251,252,253,254,255
-};
-
-static uint16 tab_us_ascii_uni[256]={
- 0,0x0001,0x0002,0x0003,0x0004,0x0005,0x0006,0x0007,
-0x0008,0x0009,0x000A,0x000B,0x000C,0x000D,0x000E,0x000F,
-0x0010,0x0011,0x0012,0x0013,0x0014,0x0015,0x0016,0x0017,
-0x0018,0x0019,0x001A,0x001B,0x001C,0x001D,0x001E,0x001F,
-0x0020,0x0021,0x0022,0x0023,0x0024,0x0025,0x0026,0x0027,
-0x0028,0x0029,0x002A,0x002B,0x002C,0x002D,0x002E,0x002F,
-0x0030,0x0031,0x0032,0x0033,0x0034,0x0035,0x0036,0x0037,
-0x0038,0x0039,0x003A,0x003B,0x003C,0x003D,0x003E,0x003F,
-0x0040,0x0041,0x0042,0x0043,0x0044,0x0045,0x0046,0x0047,
-0x0048,0x0049,0x004A,0x004B,0x004C,0x004D,0x004E,0x004F,
-0x0050,0x0051,0x0052,0x0053,0x0054,0x0055,0x0056,0x0057,
-0x0058,0x0059,0x005A,0x005B,0x005C,0x005D,0x005E,0x005F,
-0x0060,0x0061,0x0062,0x0063,0x0064,0x0065,0x0066,0x0067,
-0x0068,0x0069,0x006A,0x006B,0x006C,0x006D,0x006E,0x006F,
-0x0070,0x0071,0x0072,0x0073,0x0074,0x0075,0x0076,0x0077,
-0x0078,0x0079,0x007A,0x007B,0x007C,0x007D,0x007E, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0
-};
-
-
-/* 0000-007E , 127 chars */
-static uchar tab_uni_us_ascii_plane00[]={
-0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F,
-0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F,
-0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F,
-0x30,0x31,0x32,0x33,0x34,0x35,0x36,0x37,0x38,0x39,0x3A,0x3B,0x3C,0x3D,0x3E,0x3F,
-0x40,0x41,0x42,0x43,0x44,0x45,0x46,0x47,0x48,0x49,0x4A,0x4B,0x4C,0x4D,0x4E,0x4F,
-0x50,0x51,0x52,0x53,0x54,0x55,0x56,0x57,0x58,0x59,0x5A,0x5B,0x5C,0x5D,0x5E,0x5F,
-0x60,0x61,0x62,0x63,0x64,0x65,0x66,0x67,0x68,0x69,0x6A,0x6B,0x6C,0x6D,0x6E,0x6F,
-0x70,0x71,0x72,0x73,0x74,0x75,0x76,0x77,0x78,0x79,0x7A,0x7B,0x7C,0x7D,0x7E};
-
-
-static MY_UNI_IDX idx_uni_us_ascii[]={
- {0x0000,0x007E,tab_uni_us_ascii_plane00},
- {0,0,NULL}
-};
-
-#endif
-
-#ifdef HAVE_CHARSET_win1250
-
-/* The win1250 character set. Generated automatically by
- * the ./conf_to_src program
- */
-
-static uchar ctype_win1250[] = {
- 0,
- 32, 32, 32, 32, 32, 32, 32, 32, 32, 40, 40, 40, 40, 40, 32, 32,
- 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,
- 72, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
- 132,132,132,132,132,132,132,132,132,132, 16, 16, 16, 16, 16, 16,
- 16,129,129,129,129,129,129, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 16, 16, 16, 16, 16,
- 16,130,130,130,130,130,130, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 16, 16, 16, 16, 32,
- 32, 32, 16, 32, 16, 16, 16, 16, 32, 16, 1, 16, 1, 1, 1, 1,
- 32, 16, 16, 16, 16, 16, 16, 16, 32, 16, 2, 16, 2, 2, 2, 2,
- 72, 16, 16, 1, 16, 1, 16, 1, 16, 16, 1, 16, 16, 16, 16, 1,
- 16, 16, 16, 2, 16, 16, 16, 16, 16, 2, 2, 16, 1, 16, 2, 2,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 16, 1, 1, 1, 1, 1, 1, 1, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 16, 2, 2, 2, 2, 2, 2, 2, 16
-};
-
-static uchar to_lower_win1250[] = {
- 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
- 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
- 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47,
- 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63,
- 64, 97, 98, 99,100,101,102,103,104,105,106,107,108,109,110,111,
- 112,113,114,115,116,117,118,119,120,121,122, 91, 92, 93, 94, 95,
- 96, 97, 98, 99,100,101,102,103,104,105,106,107,108,109,110,111,
- 112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,
- 128,129,130,131,132,133,134,135,136,137,154,139,156,157,158,159,
- 144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,
- 160,161,162,179,164,185,166,223,168,169,186,171,172,173,174,191,
- 176,177,178,179,180,181,182,183,184,185,186,187,190,189,190,191,
- 224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,
- 240,241,242,243,244,245,246,215,248,249,250,251,252,253,254,223,
- 224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,
- 240,241,242,243,244,245,246,247,248,249,250,251,252,253,254,255
-};
-
-static uchar to_upper_win1250[] = {
- 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
- 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
- 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47,
- 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63,
- 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79,
- 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95,
- 96, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79,
- 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90,123,124,125,126,127,
- 128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,
- 144,145,146,147,148,149,150,151,152,153,138,155,140,141,142,143,
- 160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,
- 176,177,178,163,180,181,182,183,184,165,170,187,188,189,188,175,
- 192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,
- 208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,167,
- 192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,
- 208,209,210,211,212,213,214,247,216,217,218,219,220,221,222,255
-};
-
-static uchar sort_order_win1250[] = {
- 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
- 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
- 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47,
- 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63,
- 64, 65, 66, 67, 70, 73, 74, 75, 76, 77, 78, 79, 80, 82, 83, 85,
- 86, 87, 88, 89, 91, 92, 93, 94, 95, 96, 97, 99,100,101,102,103,
- 104, 65, 66, 67, 70, 73, 74, 75, 76, 77, 78, 79, 80, 82, 83, 85,
- 86, 87, 88, 89, 91, 92, 93, 94, 95, 96, 97,123,124,125,126,127,
- 128,129,130,131,132,133,134,135,136,137, 90,139, 90, 91, 98, 98,
- 144,145,146,147,148,149,150,151,152,153, 90,155, 90, 91, 98, 98,
- 32,161,162, 80,164, 65,166, 89,168,169, 89,171,172,173,174, 98,
- 176,177,178, 80,180,181,182,183,184, 65, 89,187, 80,189, 80, 98,
- 88, 65, 65, 65, 65, 80, 69, 67, 68, 73, 73, 73, 73, 77, 77, 70,
- 71, 83, 83, 85, 85, 85, 85,215, 88, 92, 92, 92, 92, 96, 91, 89,
- 88, 65, 65, 65, 65, 80, 69, 67, 68, 73, 73, 73, 73, 77, 77, 70,
- 71, 83, 83, 85, 85, 85, 85,247, 88, 92, 92, 92, 92, 96, 91,255
-};
-#endif
-
-#if defined(HAVE_CHARSET_win1250)
-
-static uint16 tab_cp1250_uni[256]={
- 0,0x0001,0x0002,0x0003,0x0004,0x0005,0x0006,0x0007,
-0x0008,0x0009,0x000A,0x000B,0x000C,0x000D,0x000E,0x000F,
-0x0010,0x0011,0x0012,0x0013,0x0014,0x0015,0x0016,0x0017,
-0x0018,0x0019,0x001A,0x001B,0x001C,0x001D,0x001E,0x001F,
-0x0020,0x0021,0x0022,0x0023,0x0024,0x0025,0x0026,0x0027,
-0x0028,0x0029,0x002A,0x002B,0x002C,0x002D,0x002E,0x002F,
-0x0030,0x0031,0x0032,0x0033,0x0034,0x0035,0x0036,0x0037,
-0x0038,0x0039,0x003A,0x003B,0x003C,0x003D,0x003E,0x003F,
-0x0040,0x0041,0x0042,0x0043,0x0044,0x0045,0x0046,0x0047,
-0x0048,0x0049,0x004A,0x004B,0x004C,0x004D,0x004E,0x004F,
-0x0050,0x0051,0x0052,0x0053,0x0054,0x0055,0x0056,0x0057,
-0x0058,0x0059,0x005A,0x005B,0x005C,0x005D,0x005E,0x005F,
-0x0060,0x0061,0x0062,0x0063,0x0064,0x0065,0x0066,0x0067,
-0x0068,0x0069,0x006A,0x006B,0x006C,0x006D,0x006E,0x006F,
-0x0070,0x0071,0x0072,0x0073,0x0074,0x0075,0x0076,0x0077,
-0x0078,0x0079,0x007A,0x007B,0x007C,0x007D,0x007E,0x007F,
-0x20AC, 0,0x201A, 0,0x201E,0x2026,0x2020,0x2021,
- 0,0x2030,0x0160,0x2039,0x015A,0x0164,0x017D,0x0179,
- 0,0x2018,0x2019,0x201C,0x201D,0x2022,0x2013,0x2014,
- 0,0x2122,0x0161,0x203A,0x015B,0x0165,0x017E,0x017A,
-0x00A0,0x02C7,0x02D8,0x0141,0x00A4,0x0104,0x00A6,0x00A7,
-0x00A8,0x00A9,0x015E,0x00AB,0x00AC,0x00AD,0x00AE,0x017B,
-0x00B0,0x00B1,0x02DB,0x0142,0x00B4,0x00B5,0x00B6,0x00B7,
-0x00B8,0x0105,0x015F,0x00BB,0x013D,0x02DD,0x013E,0x017C,
-0x0154,0x00C1,0x00C2,0x0102,0x00C4,0x0139,0x0106,0x00C7,
-0x010C,0x00C9,0x0118,0x00CB,0x011A,0x00CD,0x00CE,0x010E,
-0x0110,0x0143,0x0147,0x00D3,0x00D4,0x0150,0x00D6,0x00D7,
-0x0158,0x016E,0x00DA,0x0170,0x00DC,0x00DD,0x0162,0x00DF,
-0x0155,0x00E1,0x00E2,0x0103,0x00E4,0x013A,0x0107,0x00E7,
-0x010D,0x00E9,0x0119,0x00EB,0x011B,0x00ED,0x00EE,0x010F,
-0x0111,0x0144,0x0148,0x00F3,0x00F4,0x0151,0x00F6,0x00F7,
-0x0159,0x016F,0x00FA,0x0171,0x00FC,0x00FD,0x0163,0x02D9
-};
-
-
-/* 0000-00FD , 254 chars */
-static uchar tab_uni_cp1250_plane00[]={
-0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F,
-0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F,
-0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F,
-0x30,0x31,0x32,0x33,0x34,0x35,0x36,0x37,0x38,0x39,0x3A,0x3B,0x3C,0x3D,0x3E,0x3F,
-0x40,0x41,0x42,0x43,0x44,0x45,0x46,0x47,0x48,0x49,0x4A,0x4B,0x4C,0x4D,0x4E,0x4F,
-0x50,0x51,0x52,0x53,0x54,0x55,0x56,0x57,0x58,0x59,0x5A,0x5B,0x5C,0x5D,0x5E,0x5F,
-0x60,0x61,0x62,0x63,0x64,0x65,0x66,0x67,0x68,0x69,0x6A,0x6B,0x6C,0x6D,0x6E,0x6F,
-0x70,0x71,0x72,0x73,0x74,0x75,0x76,0x77,0x78,0x79,0x7A,0x7B,0x7C,0x7D,0x7E,0x7F,
-0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
-0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
-0xA0,0x00,0x00,0x00,0xA4,0x00,0xA6,0xA7,0xA8,0xA9,0x00,0xAB,0xAC,0xAD,0xAE,0x00,
-0xB0,0xB1,0x00,0x00,0xB4,0xB5,0xB6,0xB7,0xB8,0x00,0x00,0xBB,0x00,0x00,0x00,0x00,
-0x00,0xC1,0xC2,0x00,0xC4,0x00,0x00,0xC7,0x00,0xC9,0x00,0xCB,0x00,0xCD,0xCE,0x00,
-0x00,0x00,0x00,0xD3,0xD4,0x00,0xD6,0xD7,0x00,0x00,0xDA,0x00,0xDC,0xDD,0x00,0xDF,
-0x00,0xE1,0xE2,0x00,0xE4,0x00,0x00,0xE7,0x00,0xE9,0x00,0xEB,0x00,0xED,0xEE,0x00,
-0x00,0x00,0x00,0xF3,0xF4,0x00,0xF6,0xF7,0x00,0x00,0xFA,0x00,0xFC,0xFD};
-
-/* 0102-017E , 125 chars */
-static uchar tab_uni_cp1250_plane01[]={
-0xC3,0xE3,0xA5,0xB9,0xC6,0xE6,0x00,0x00,0x00,0x00,0xC8,0xE8,0xCF,0xEF,0xD0,0xF0,
-0x00,0x00,0x00,0x00,0x00,0x00,0xCA,0xEA,0xCC,0xEC,0x00,0x00,0x00,0x00,0x00,0x00,
-0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
-0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xC5,0xE5,0x00,0x00,0xBC,0xBE,0x00,0x00,0xA3,
-0xB3,0xD1,0xF1,0x00,0x00,0xD2,0xF2,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xD5,0xF5,
-0x00,0x00,0xC0,0xE0,0x00,0x00,0xD8,0xF8,0x8C,0x9C,0x00,0x00,0xAA,0xBA,0x8A,0x9A,
-0xDE,0xFE,0x8D,0x9D,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xD9,0xF9,0xDB,0xFB,
-0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x8F,0x9F,0xAF,0xBF,0x8E,0x9E};
-
-/* 2013-20AC , 154 chars */
-static uchar tab_uni_cp1250_plane20[]={
-0x96,0x97,0x00,0x00,0x00,0x91,0x92,0x82,0x00,0x93,0x94,0x84,0x00,0x86,0x87,0x95,
-0x00,0x00,0x00,0x85,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x89,0x00,0x00,
-0x00,0x00,0x00,0x00,0x00,0x00,0x8B,0x9B,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
-0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
-0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
-0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
-0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
-0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
-0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
-0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80};
-
-/* 02C7-02DD , 23 chars */
-static uchar tab_uni_cp1250_plane02[]={
-0xA1,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
-0x00,0xA2,0xFF,0x00,0xB2,0x00,0xBD};
-
-/* 2122-2122 , 1 chars */
-static uchar tab_uni_cp1250_plane21[]={
-0x99};
-
-
-static MY_UNI_IDX idx_uni_cp1250[]={
- {0x0000,0x00FD,tab_uni_cp1250_plane00},
- {0x0102,0x017E,tab_uni_cp1250_plane01},
- {0x2013,0x20AC,tab_uni_cp1250_plane20},
- {0x02C7,0x02DD,tab_uni_cp1250_plane02},
- {0x2122,0x2122,tab_uni_cp1250_plane21},
- {0,0,NULL}
-};
-
-#endif
-
-#ifdef HAVE_CHARSET_win1251
-
-/* The win1251 character set. Generated automatically by
- * the ./conf_to_src program
- */
-
-static uchar ctype_win1251[] = {
- 0,
- 32, 32, 32, 32, 32, 32, 32, 32, 32, 40, 40, 40, 40, 40, 32, 32,
- 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,
- 72, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
- 132,132,132,132,132,132,132,132,132,132, 16, 16, 16, 16, 16, 16,
- 16,129,129,129,129,129,129, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 16, 16, 16, 16, 16,
- 16,130,130,130,130,130,130, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 16, 16, 16, 16, 32,
- 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
- 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
- 16, 16, 16, 16, 16, 16, 16, 16, 1, 16, 16, 16, 16, 16, 16, 16,
- 16, 16, 16, 16, 16, 16, 16, 16, 2, 16, 16, 16, 16, 16, 16, 16,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2
-};
-
-static uchar to_lower_win1251[] = {
- 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
- 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
- 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47,
- 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63,
- 64, 97, 98, 99,100,101,102,103,104,105,106,107,108,109,110,111,
- 112,113,114,115,116,117,118,119,120,121,122, 91, 92, 93, 94, 95,
- 96, 97, 98, 99,100,101,102,103,104,105,106,107,108,109,110,111,
- 112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,
- 128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,
- 144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,
- 160,161,162,163,164,165,166,167,184,169,170,171,172,173,174,175,
- 176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,
- 224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,
- 240,241,242,243,244,245,245,247,248,249,250,251,252,253,254,255,
- 224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,
- 240,241,242,243,244,245,246,247,248,249,250,251,252,253,254,255
-};
-
-static uchar to_upper_win1251[] = {
- 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
- 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
- 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47,
- 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63,
- 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79,
- 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95,
- 96, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79,
- 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90,123,124,125,126,127,
- 128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,
- 144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,
- 160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,
- 176,177,178,179,180,181,182,183,168,185,186,187,188,189,190,191,
- 192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,
- 208,209,210,211,212,213,213,215,216,217,218,219,220,221,222,223,
- 192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,
- 208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,223
-};
-
-static uchar sort_order_win1251[] = {
- 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
- 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
- 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47,
- 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63,
- 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79,
- 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95,
- 96, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79,
- 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90,123,124,125,126,127,
- 128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,
- 144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,
- 160,161,162,163,164,165,166,167,198,169,170,171,172,173,174,175,
- 176,177,178,179,180,181,182,183,198,185,186,187,188,189,190,191,
- 192,193,194,195,196,197,199,200,201,202,203,204,205,206,207,208,
- 209,210,211,212,213,214,215,216,217,218,219,220,221,222,223,224,
- 192,193,194,195,196,197,199,200,201,202,203,204,205,206,207,208,
- 209,210,211,212,213,214,215,216,217,218,219,220,221,222,223,224
-};
-#endif
-
-#ifdef HAVE_CHARSET_win1251ukr
-
-/* The win1251ukr character set. Generated automatically by
- * the ./conf_to_src program
- */
-
-static uchar ctype_win1251ukr[] = {
- 0,
- 32, 32, 32, 32, 32, 32, 32, 32, 32, 40, 40, 40, 40, 40, 32, 32,
- 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,
- 72, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
- 132,132,132,132,132,132,132,132,132,132, 16, 16, 16, 16, 16, 16,
- 16,129,129,129,129,129,129, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 16, 16, 16, 16, 16,
- 16,130,130,130,130,130,130, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 16, 16, 16, 16, 32,
- 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
- 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
- 16, 16, 16, 16, 16, 16, 16, 16, 1, 16, 1, 16, 16, 16, 16, 1,
- 16, 16, 1, 2, 16, 16, 16, 16, 2, 16, 2, 16, 16, 16, 16, 2,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2
-};
-
-static uchar to_lower_win1251ukr[] = {
- 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
- 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
- 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47,
- 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63,
- 64, 97, 98, 99,100,101,102,103,104,105,106,107,108,109,110,111,
- 112,113,114,115,116,117,118,119,120,121,122, 91, 92, 93, 94, 95,
- 32, 97, 98, 99,100,101,102,103,104,105,106,107,108,109,110,111,
- 112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,
- 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,
- 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,
- 32, 32, 32, 32, 32,165, 32, 32,168, 32,170, 32, 32, 32, 32,175,
- 32, 32,178,178,165, 32, 32, 32,168, 32,170, 32, 32, 32, 32,175,
- 192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,
- 208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,223,
- 192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,
- 208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,223
-};
-
-static uchar to_upper_win1251ukr[] = {
- 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
- 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
- 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47,
- 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63,
- 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79,
- 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95,
- 32, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79,
- 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90,123,124,125,126,127,
- 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,
- 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,
- 32, 32, 32, 32, 32,180, 32, 32,184, 32,186, 32, 32, 32, 32,191,
- 32, 32,179,179,180, 32, 32, 32,184, 32,186, 32, 32, 32, 32,191,
- 224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,
- 240,241,242,243,244,245,246,247,248,249,250,251,252,253,254,255,
- 224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,
- 240,241,242,243,244,245,246,247,248,249,250,251,252,253,254,255
-};
-
-static uchar sort_order_win1251ukr[] = {
- 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
- 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
- 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47,
- 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63,
- 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79,
- 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95,
- 32, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79,
- 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90,123,124,125,126,127,
- 165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,
- 181,182,183,184,185,186,187,188,189,190,191,192,193,194,195,196,
- 197,198,199,200,201,132,202,203,136,204,135,205,206,207,208,141,
- 209,210,140,140,132,211,212,213,136,214,135,215,216,217,218,141,
- 128,129,130,131,133,134,137,138,139,142,143,144,145,146,147,148,
- 149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,
- 128,129,130,131,133,134,137,138,139,142,143,144,145,146,147,148,
- 149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164
-};
-#endif
-
-
-
-static CHARSET_INFO compiled_charsets[] = {
-
-#ifdef HAVE_CHARSET_latin1
- {
- 8, /* number */
- MY_CS_COMPILED|MY_CS_PRIMARY, /* state */
- "latin1", /* cs name */
- "latin1", /* name */
- "", /* comment */
- ctype_latin1,
- to_lower_latin1,
- to_upper_latin1,
- sort_order_latin1,
- tab_8859_1_uni, /* tab_to_uni */
- idx_uni_8859_1, /* tab_from_uni */
- 0, /* strxfrm_multiply */
- my_strnncoll_simple,/* strnncoll */
- my_strnxfrm_simple, /* strnxfrm */
- my_like_range_simple,/* like_range */
- my_wildcmp_8bit, /* wildcmp */
- 1, /* mbmaxlen */
- NULL, /* ismbchar */
- NULL, /* ismbhead */
- NULL, /* mbcharlen */
- my_mb_wc_8bit, /* mb_wc */
- my_wc_mb_8bit, /* wc_mb */
- my_caseup_str_8bit,
- my_casedn_str_8bit,
- my_caseup_8bit,
- my_casedn_8bit,
- my_tosort_8bit,
- my_strcasecmp_8bit,
- my_strncasecmp_8bit,
- my_hash_caseup_simple,
- my_hash_sort_simple,
- 0,
- my_snprintf_8bit,
- my_long10_to_str_8bit,
- my_longlong10_to_str_8bit,
- my_strntol_8bit,
- my_strntoul_8bit,
- my_strntoll_8bit,
- my_strntoull_8bit,
- my_strntod_8bit,
- my_scan_8bit
- },
-#endif
-
-
-#ifdef HAVE_CHARSET_cp1251
- {
- 14, /* number */
- MY_CS_COMPILED, /* state */
- "cp1251", /* cs name */
- "cp1251", /* name */
- "", /* comment */
- ctype_cp1251,
- to_lower_cp1251,
- to_upper_cp1251,
- sort_order_cp1251,
- tab_cp1251_uni, /* tab_to_uni */
- idx_uni_cp1251, /* tab_from_uni */
- 0, /* strxfrm_multiply */
- my_strnncoll_simple,/* strnncoll */
- my_strnxfrm_simple, /* strnxfrm */
- my_like_range_simple,/* like_range */
- my_wildcmp_8bit, /* wildcmp */
- 1, /* mbmaxlen */
- NULL, /* ismbchar */
- NULL, /* ismbhead */
- NULL, /* mbcharlen */
- my_mb_wc_8bit, /* mb_wc */
- my_wc_mb_8bit, /* wc_mb */
- my_caseup_str_8bit,
- my_casedn_str_8bit,
- my_caseup_8bit,
- my_casedn_8bit,
- my_tosort_8bit,
- my_strcasecmp_8bit,
- my_strncasecmp_8bit,
- my_hash_caseup_simple,
- my_hash_sort_simple,
- 0,
- my_snprintf_8bit,
- my_long10_to_str_8bit,
- my_longlong10_to_str_8bit,
- my_strntol_8bit,
- my_strntoul_8bit,
- my_strntoll_8bit,
- my_strntoull_8bit,
- my_strntod_8bit,
- my_scan_8bit
- },
-#endif
-
-#ifdef HAVE_CHARSET_cp1257
- {
- 29, /* number */
- MY_CS_COMPILED, /* state */
- "cp1257", /* cs name */
- "cp1257", /* name */
- "", /* comment */
- ctype_cp1257,
- to_lower_cp1257,
- to_upper_cp1257,
- sort_order_cp1257,
- tab_cp1257_uni, /* tab_to_uni */
- idx_uni_cp1257, /* tab_from_uni */
- 0, /* strxfrm_multiply */
- my_strnncoll_simple,/* strnncoll */
- my_strnxfrm_simple, /* strnxfrm */
- my_like_range_simple,/* like_range */
- my_wildcmp_8bit, /* wildcmp */
- 1, /* mbmaxlen */
- NULL, /* ismbchar */
- NULL, /* ismbhead */
- NULL, /* mbcharlen */
- my_mb_wc_8bit, /* mb_wc */
- my_wc_mb_8bit, /* wc_mb */
- my_caseup_str_8bit,
- my_casedn_str_8bit,
- my_caseup_8bit,
- my_casedn_8bit,
- my_tosort_8bit,
- my_strcasecmp_8bit,
- my_strncasecmp_8bit,
- my_hash_caseup_simple,
- my_hash_sort_simple,
- 0,
- my_snprintf_8bit,
- my_long10_to_str_8bit,
- my_longlong10_to_str_8bit,
- my_strntol_8bit,
- my_strntoul_8bit,
- my_strntoll_8bit,
- my_strntoull_8bit,
- my_strntod_8bit,
- my_scan_8bit
- },
-#endif
-
-#ifdef HAVE_CHARSET_croat
- {
- 27, /* number */
- MY_CS_COMPILED, /* state */
- "latin2", /* cs name */
- "croat", /* name */
- "", /* comment */
- ctype_croat,
- to_lower_croat,
- to_upper_croat,
- sort_order_croat,
- tab_8859_2_uni, /* tab_to_uni */
- idx_uni_8859_2, /* tab_from_uni */
- 0, /* strxfrm_multiply */
- my_strnncoll_simple,/* strnncoll */
- my_strnxfrm_simple, /* strnxfrm */
- my_like_range_simple,/* like_range */
- my_wildcmp_8bit, /* wildcmp */
- 1, /* mbmaxlen */
- NULL, /* ismbchar */
- NULL, /* ismbhead */
- NULL, /* mbcharlen */
- my_mb_wc_8bit, /* mb_wc */
- my_wc_mb_8bit, /* wc_mb */
- my_caseup_str_8bit,
- my_casedn_str_8bit,
- my_caseup_8bit,
- my_casedn_8bit,
- my_tosort_8bit,
- my_strcasecmp_8bit,
- my_strncasecmp_8bit,
- my_hash_caseup_simple,
- my_hash_sort_simple,
- 0,
- my_snprintf_8bit,
- my_long10_to_str_8bit,
- my_longlong10_to_str_8bit,
- my_strntol_8bit,
- my_strntoul_8bit,
- my_strntoll_8bit,
- my_strntoull_8bit,
- my_strntod_8bit,
- my_scan_8bit
- },
-#endif
-
-
-#ifdef HAVE_CHARSET_danish
- {
- 15, /* number */
- MY_CS_COMPILED, /* state */
- "latin1", /* cs name */
- "danish", /* name */
- "", /* comment */
- ctype_danish,
- to_lower_danish,
- to_upper_danish,
- sort_order_danish,
- tab_8859_1_uni, /* tab_to_uni */
- idx_uni_8859_1, /* tab_from_uni */
- 0, /* strxfrm_multiply */
- my_strnncoll_simple,/* strnncoll */
- my_strnxfrm_simple, /* strnxfrm */
- my_like_range_simple,/* like_range */
- my_wildcmp_8bit, /* wildcmp */
- 1, /* mbmaxlen */
- NULL, /* ismbchar */
- NULL, /* ismbhead */
- NULL, /* mbcharlen */
- my_mb_wc_8bit, /* mb_wc */
- my_wc_mb_8bit, /* wc_mb */
- my_caseup_str_8bit,
- my_casedn_str_8bit,
- my_caseup_8bit,
- my_casedn_8bit,
- my_tosort_8bit,
- my_strcasecmp_8bit,
- my_strncasecmp_8bit,
- my_hash_caseup_simple,
- my_hash_sort_simple,
- 0,
- my_snprintf_8bit,
- my_long10_to_str_8bit,
- my_longlong10_to_str_8bit,
- my_strntol_8bit,
- my_strntoul_8bit,
- my_strntoll_8bit,
- my_strntoull_8bit,
- my_strntod_8bit,
- my_scan_8bit
- },
-#endif
-
-#ifdef HAVE_CHARSET_dec8
- {
- 3, /* number */
- MY_CS_COMPILED, /* state */
- "dec8", /* cs name */
- "dec8", /* name */
- "", /* comment */
- ctype_dec8,
- to_lower_dec8,
- to_upper_dec8,
- sort_order_dec8,
- NULL, /* tab_to_uni */
- NULL, /* tab_from_uni */
- 0, /* strxfrm_multiply */
- my_strnncoll_simple,/* strnncoll */
- my_strnxfrm_simple, /* strnxfrm */
- my_like_range_simple,/* like_range */
- my_wildcmp_8bit, /* wildcmp */
- 1, /* mbmaxlen */
- NULL, /* ismbchar */
- NULL, /* ismbhead */
- NULL, /* mbcharlen */
- my_mb_wc_8bit, /* mb_wc */
- my_wc_mb_8bit, /* wc_mb */
- my_caseup_str_8bit,
- my_casedn_str_8bit,
- my_caseup_8bit,
- my_casedn_8bit,
- my_tosort_8bit,
- my_strcasecmp_8bit,
- my_strncasecmp_8bit,
- my_hash_caseup_simple,
- my_hash_sort_simple,
- 0,
- my_snprintf_8bit,
- my_long10_to_str_8bit,
- my_longlong10_to_str_8bit,
- my_strntol_8bit,
- my_strntoul_8bit,
- my_strntoll_8bit,
- my_strntoull_8bit,
- my_strntod_8bit,
- my_scan_8bit
- },
-#endif
-
-#ifdef HAVE_CHARSET_dos
- {
- 4, /* number */
- MY_CS_COMPILED, /* state */
- "cp850", /* cs name */
- "dos", /* name */
- "", /* comment */
- ctype_dos,
- to_lower_dos,
- to_upper_dos,
- sort_order_dos,
- NULL, /* tab_to_uni */
- NULL, /* tab_from_uni */
- 0, /* strxfrm_multiply */
- my_strnncoll_simple,/* strnncoll */
- my_strnxfrm_simple, /* strnxfrm */
- my_like_range_simple,/* like_range */
- my_wildcmp_8bit, /* wildcmp */
- 1, /* mbmaxlen */
- NULL, /* ismbchar */
- NULL, /* ismbhead */
- NULL, /* mbcharlen */
- my_mb_wc_8bit, /* mb_wc */
- my_wc_mb_8bit, /* wc_mb */
- my_caseup_str_8bit,
- my_casedn_str_8bit,
- my_caseup_8bit,
- my_casedn_8bit,
- my_tosort_8bit,
- my_strcasecmp_8bit,
- my_strncasecmp_8bit,
- my_hash_caseup_simple,
- my_hash_sort_simple,
- 0,
- my_snprintf_8bit,
- my_long10_to_str_8bit,
- my_longlong10_to_str_8bit,
- my_strntol_8bit,
- my_strntoul_8bit,
- my_strntoll_8bit,
- my_strntoull_8bit,
- my_strntod_8bit,
- my_scan_8bit
- },
-#endif
-
-#ifdef HAVE_CHARSET_estonia
- {
- 20, /* number */
- MY_CS_COMPILED, /* state */
- "latin7", /* cs name */
- "estonia", /* name */
- "", /* comment */
- ctype_estonia,
- to_lower_estonia,
- to_upper_estonia,
- sort_order_estonia,
- NULL, /* tab_to_uni */
- NULL, /* tab_from_uni */
- 0, /* strxfrm_multiply */
- my_strnncoll_simple,/* strnncoll */
- my_strnxfrm_simple, /* strnxfrm */
- my_like_range_simple,/* like_range */
- my_wildcmp_8bit, /* wildcmp */
- 1, /* mbmaxlen */
- NULL, /* ismbchar */
- NULL, /* ismbhead */
- NULL, /* mbcharlen */
- my_mb_wc_8bit, /* mb_wc */
- my_wc_mb_8bit, /* wc_mb */
- my_caseup_str_8bit,
- my_casedn_str_8bit,
- my_caseup_8bit,
- my_casedn_8bit,
- my_tosort_8bit,
- my_strcasecmp_8bit,
- my_strncasecmp_8bit,
- my_hash_caseup_simple,
- my_hash_sort_simple,
- 0,
- my_snprintf_8bit,
- my_long10_to_str_8bit,
- my_longlong10_to_str_8bit,
- my_strntol_8bit,
- my_strntoul_8bit,
- my_strntoll_8bit,
- my_strntoull_8bit,
- my_strntod_8bit,
- my_scan_8bit
- },
-#endif
-
-
-#ifdef HAVE_CHARSET_german1
- {
- 5, /* number */
- MY_CS_COMPILED, /* state */
- "latin1", /* cs name */
- "german1", /* name */
- "", /* comment */
- ctype_german1,
- to_lower_german1,
- to_upper_german1,
- sort_order_german1,
- tab_8859_1_uni, /* tab_to_uni */
- idx_uni_8859_1, /* tab_from_uni */
- 0, /* strxfrm_multiply */
- my_strnncoll_simple,/* strnncoll */
- my_strnxfrm_simple, /* strnxfrm */
- my_like_range_simple,/* like_range */
- my_wildcmp_8bit, /* wildcmp */
- 1, /* mbmaxlen */
- NULL, /* ismbchar */
- NULL, /* ismbhead */
- NULL, /* mbcharlen */
- my_mb_wc_8bit, /* mb_wc */
- my_wc_mb_8bit, /* wc_mb */
- my_caseup_str_8bit,
- my_casedn_str_8bit,
- my_caseup_8bit,
- my_casedn_8bit,
- my_tosort_8bit,
- my_strcasecmp_8bit,
- my_strncasecmp_8bit,
- my_hash_caseup_simple,
- my_hash_sort_simple,
- 0,
- my_snprintf_8bit,
- my_long10_to_str_8bit,
- my_longlong10_to_str_8bit,
- my_strntol_8bit,
- my_strntoul_8bit,
- my_strntoll_8bit,
- my_strntoull_8bit,
- my_strntod_8bit,
- my_scan_8bit
- },
-#endif
-
-#ifdef HAVE_CHARSET_greek
- {
- 25, /* number */
- MY_CS_COMPILED, /* state */
- "greek", /* cs name */
- "greek", /* name */
- "", /* comment */
- ctype_greek,
- to_lower_greek,
- to_upper_greek,
- sort_order_greek,
- NULL, /* tab_to_uni */
- NULL, /* tab_from_uni */
- 0, /* strxfrm_multiply */
- my_strnncoll_simple,/* strnncoll */
- my_strnxfrm_simple, /* strnxfrm */
- my_like_range_simple,/* like_range */
- my_wildcmp_8bit, /* wildcmp */
- 1, /* mbmaxlen */
- NULL, /* ismbchar */
- NULL, /* ismbhead */
- NULL, /* mbcharlen */
- my_mb_wc_8bit, /* mb_wc */
- my_wc_mb_8bit, /* wc_mb */
- my_caseup_str_8bit,
- my_casedn_str_8bit,
- my_caseup_8bit,
- my_casedn_8bit,
- my_tosort_8bit,
- my_strcasecmp_8bit,
- my_strncasecmp_8bit,
- my_hash_caseup_simple,
- my_hash_sort_simple,
- 0,
- my_snprintf_8bit,
- my_long10_to_str_8bit,
- my_longlong10_to_str_8bit,
- my_strntol_8bit,
- my_strntoul_8bit,
- my_strntoll_8bit,
- my_strntoull_8bit,
- my_strntod_8bit,
- my_scan_8bit
- },
-#endif
-
-#ifdef HAVE_CHARSET_hebrew
- {
- 16, /* number */
- MY_CS_COMPILED, /* state */
- "hebrew", /* cs name */
- "hebrew", /* name */
- "", /* comment */
- ctype_hebrew,
- to_lower_hebrew,
- to_upper_hebrew,
- sort_order_hebrew,
- NULL, /* tab_to_uni */
- NULL, /* tab_from_uni */
- 0, /* strxfrm_multiply */
- my_strnncoll_simple,/* strnncoll */
- my_strnxfrm_simple, /* strnxfrm */
- my_like_range_simple,/* like_range */
- my_wildcmp_8bit, /* wildcmp */
- 1, /* mbmaxlen */
- NULL, /* ismbchar */
- NULL, /* ismbhead */
- NULL, /* mbcharlen */
- my_mb_wc_8bit, /* mb_wc */
- my_wc_mb_8bit, /* wc_mb */
- my_caseup_str_8bit,
- my_casedn_str_8bit,
- my_caseup_8bit,
- my_casedn_8bit,
- my_tosort_8bit,
- my_strcasecmp_8bit,
- my_strncasecmp_8bit,
- my_hash_caseup_simple,
- my_hash_sort_simple,
- 0,
- my_snprintf_8bit,
- my_long10_to_str_8bit,
- my_longlong10_to_str_8bit,
- my_strntol_8bit,
- my_strntoul_8bit,
- my_strntoll_8bit,
- my_strntoull_8bit,
- my_strntod_8bit,
- my_scan_8bit
- },
-#endif
-
-#ifdef HAVE_CHARSET_hp8
- {
- 6, /* number */
- MY_CS_COMPILED, /* state */
- "hp8", /* cs name */
- "hp8", /* name */
- "", /* comment */
- ctype_hp8,
- to_lower_hp8,
- to_upper_hp8,
- sort_order_hp8,
- NULL, /* tab_to_uni */
- NULL, /* tab_from_uni */
- 0, /* strxfrm_multiply */
- my_strnncoll_simple,/* strnncoll */
- my_strnxfrm_simple, /* strnxfrm */
- my_like_range_simple,/* like_range */
- my_wildcmp_8bit, /* wildcmp */
- 1, /* mbmaxlen */
- NULL, /* ismbchar */
- NULL, /* ismbhead */
- NULL, /* mbcharlen */
- my_mb_wc_8bit, /* mb_wc */
- my_wc_mb_8bit, /* wc_mb */
- my_caseup_str_8bit,
- my_casedn_str_8bit,
- my_caseup_8bit,
- my_casedn_8bit,
- my_tosort_8bit,
- my_strcasecmp_8bit,
- my_strncasecmp_8bit,
- my_hash_caseup_simple,
- my_hash_sort_simple,
- 0,
- my_snprintf_8bit,
- my_long10_to_str_8bit,
- my_longlong10_to_str_8bit,
- my_strntol_8bit,
- my_strntoul_8bit,
- my_strntoll_8bit,
- my_strntoull_8bit,
- my_strntod_8bit,
- my_scan_8bit
- },
-#endif
-
-#ifdef HAVE_CHARSET_hungarian
- {
- 21, /* number */
- MY_CS_COMPILED, /* state */
- "latin2", /* cs name */
- "hungarian", /* name */
- "", /* comment */
- ctype_hungarian,
- to_lower_hungarian,
- to_upper_hungarian,
- sort_order_hungarian,
- tab_8859_2_uni, /* tab_to_uni */
- idx_uni_8859_2, /* tab_from_uni */
- 0, /* strxfrm_multiply */
- my_strnncoll_simple,/* strnncoll */
- my_strnxfrm_simple, /* strnxfrm */
- my_like_range_simple,/* like_range */
- my_wildcmp_8bit, /* wildcmp */
- 1, /* mbmaxlen */
- NULL, /* ismbchar */
- NULL, /* ismbhead */
- NULL, /* mbcharlen */
- my_mb_wc_8bit, /* mb_wc */
- my_wc_mb_8bit, /* wc_mb */
- my_caseup_str_8bit,
- my_casedn_str_8bit,
- my_caseup_8bit,
- my_casedn_8bit,
- my_tosort_8bit,
- my_strcasecmp_8bit,
- my_strncasecmp_8bit,
- my_hash_caseup_simple,
- my_hash_sort_simple,
- 0,
- my_snprintf_8bit,
- my_long10_to_str_8bit,
- my_longlong10_to_str_8bit,
- my_strntol_8bit,
- my_strntoul_8bit,
- my_strntoll_8bit,
- my_strntoull_8bit,
- my_strntod_8bit,
- my_scan_8bit
- },
-#endif
-
-#ifdef HAVE_CHARSET_koi8_ru
- {
- 7, /* number */
- MY_CS_COMPILED, /* state */
- "koi8r", /* cs name */
- "koi8r", /* name */
- "", /* comment */
- ctype_koi8_ru,
- to_lower_koi8_ru,
- to_upper_koi8_ru,
- sort_order_koi8_ru,
- tab_koi8_r_uni, /* tab_to_uni */
- idx_uni_koi8_r, /* tab_from_uni */
- 0, /* strxfrm_multiply */
- my_strnncoll_simple,/* strnncoll */
- my_strnxfrm_simple, /* strnxfrm */
- my_like_range_simple,/* like_range */
- my_wildcmp_8bit, /* wildcmp */
- 1, /* mbmaxlen */
- NULL, /* ismbchar */
- NULL, /* ismbhead */
- NULL, /* mbcharlen */
- my_mb_wc_8bit, /* mb_wc */
- my_wc_mb_8bit, /* wc_mb */
- my_caseup_str_8bit,
- my_casedn_str_8bit,
- my_caseup_8bit,
- my_casedn_8bit,
- my_tosort_8bit,
- my_strcasecmp_8bit,
- my_strncasecmp_8bit,
- my_hash_caseup_simple,
- my_hash_sort_simple,
- 0,
- my_snprintf_8bit,
- my_long10_to_str_8bit,
- my_longlong10_to_str_8bit,
- my_strntol_8bit,
- my_strntoul_8bit,
- my_strntoll_8bit,
- my_strntoull_8bit,
- my_strntod_8bit,
- my_scan_8bit
- },
-#endif
-
-#ifdef HAVE_CHARSET_koi8_ukr
- {
- 22, /* number */
- MY_CS_COMPILED, /* state */
- "koi8u", /* cs name */
- "koi8u", /* name */
- "", /* comment */
- ctype_koi8_ukr,
- to_lower_koi8_ukr,
- to_upper_koi8_ukr,
- sort_order_koi8_ukr,
- tab_koi8_u_uni, /* tab_to_uni */
- idx_uni_koi8_u, /* tab_from_uni */
- 0, /* strxfrm_multiply */
- my_strnncoll_simple,/* strnncoll */
- my_strnxfrm_simple, /* strnxfrm */
- my_like_range_simple,/* like_range */
- my_wildcmp_8bit, /* wildcmp */
- 1, /* mbmaxlen */
- NULL, /* ismbchar */
- NULL, /* ismbhead */
- NULL, /* mbcharlen */
- my_mb_wc_8bit, /* mb_wc */
- my_wc_mb_8bit, /* wc_mb */
- my_caseup_str_8bit,
- my_casedn_str_8bit,
- my_caseup_8bit,
- my_casedn_8bit,
- my_tosort_8bit,
- my_strcasecmp_8bit,
- my_strncasecmp_8bit,
- my_hash_caseup_simple,
- my_hash_sort_simple,
- 0,
- my_snprintf_8bit,
- my_long10_to_str_8bit,
- my_longlong10_to_str_8bit,
- my_strntol_8bit,
- my_strntoul_8bit,
- my_strntoll_8bit,
- my_strntoull_8bit,
- my_strntod_8bit,
- my_scan_8bit
- },
-#endif
-
-
-#ifdef HAVE_CHARSET_latin2
- {
- 9, /* number */
- MY_CS_COMPILED, /* state */
- "latin2", /* cs name */
- "latin2", /* name */
- "", /* comment */
- ctype_latin2,
- to_lower_latin2,
- to_upper_latin2,
- sort_order_latin2,
- tab_8859_2_uni, /* tab_to_uni */
- idx_uni_8859_2, /* tab_from_uni */
- 0, /* strxfrm_multiply */
- my_strnncoll_simple,/* strnncoll */
- my_strnxfrm_simple, /* strnxfrm */
- my_like_range_simple,/* like_range */
- my_wildcmp_8bit, /* wildcmp */
- 1, /* mbmaxlen */
- NULL, /* ismbchar */
- NULL, /* ismbhead */
- NULL, /* mbcharlen */
- my_mb_wc_8bit, /* mb_wc */
- my_wc_mb_8bit, /* wc_mb */
- my_caseup_str_8bit,
- my_casedn_str_8bit,
- my_caseup_8bit,
- my_casedn_8bit,
- my_tosort_8bit,
- my_strcasecmp_8bit,
- my_strncasecmp_8bit,
- my_hash_caseup_simple,
- my_hash_sort_simple,
- 0,
- my_snprintf_8bit,
- my_long10_to_str_8bit,
- my_longlong10_to_str_8bit,
- my_strntol_8bit,
- my_strntoul_8bit,
- my_strntoll_8bit,
- my_strntoull_8bit,
- my_strntod_8bit,
- my_scan_8bit
- },
-#endif
-
-#ifdef HAVE_CHARSET_latin5
- {
- 30, /* number */
- MY_CS_COMPILED, /* state */
- "latin5", /* cs name */
- "latin5", /* name */
- "", /* comment */
- ctype_latin5,
- to_lower_latin5,
- to_upper_latin5,
- sort_order_latin5,
- tab_8859_9_uni, /* tab_to_uni */
- idx_uni_8859_9, /* tab_from_uni */
- 0, /* strxfrm_multiply */
- my_strnncoll_simple,/* strnncoll */
- my_strnxfrm_simple, /* strnxfrm */
- my_like_range_simple,/* like_range */
- my_wildcmp_8bit, /* wildcmp */
- 1, /* mbmaxlen */
- NULL, /* ismbchar */
- NULL, /* ismbhead */
- NULL, /* mbcharlen */
- my_mb_wc_8bit, /* mb_wc */
- my_wc_mb_8bit, /* wc_mb */
- my_caseup_str_8bit,
- my_casedn_str_8bit,
- my_caseup_8bit,
- my_casedn_8bit,
- my_tosort_8bit,
- my_strcasecmp_8bit,
- my_strncasecmp_8bit,
- my_hash_caseup_simple,
- my_hash_sort_simple,
- 0,
- my_snprintf_8bit,
- my_long10_to_str_8bit,
- my_longlong10_to_str_8bit,
- my_strntol_8bit,
- my_strntoul_8bit,
- my_strntoll_8bit,
- my_strntoull_8bit,
- my_strntod_8bit,
- my_scan_8bit
- },
-#endif
-
-
-#ifdef HAVE_CHARSET_swe7
- {
- 10, /* number */
- MY_CS_COMPILED, /* state */
- "swe7", /* cs name */
- "swe7", /* name */
- "", /* comment */
- ctype_swe7,
- to_lower_swe7,
- to_upper_swe7,
- sort_order_swe7,
- NULL, /* tab_to_uni */
- NULL, /* tab_from_uni */
- 0, /* strxfrm_multiply */
- my_strnncoll_simple,/* strnncoll */
- my_strnxfrm_simple, /* strnxfrm */
- my_like_range_simple,/* like_range */
- my_wildcmp_8bit, /* wildcmp */
- 1, /* mbmaxlen */
- NULL, /* ismbchar */
- NULL, /* ismbhead */
- NULL, /* mbcharlen */
- my_mb_wc_8bit, /* mb_wc */
- my_wc_mb_8bit, /* wc_mb */
- my_caseup_str_8bit,
- my_casedn_str_8bit,
- my_caseup_8bit,
- my_casedn_8bit,
- my_tosort_8bit,
- my_strcasecmp_8bit,
- my_strncasecmp_8bit,
- my_hash_caseup_simple,
- my_hash_sort_simple,
- 0,
- my_snprintf_8bit,
- my_long10_to_str_8bit,
- my_longlong10_to_str_8bit,
- my_strntol_8bit,
- my_strntoul_8bit,
- my_strntoll_8bit,
- my_strntoull_8bit,
- my_strntod_8bit,
- my_scan_8bit
- },
-#endif
-
-
-#ifdef HAVE_CHARSET_usa7
- {
- 11, /* number */
- MY_CS_COMPILED, /* state */
- "ascii", /* cs name */
- "ascii", /* name */
- "", /* comment */
- ctype_usa7,
- to_lower_usa7,
- to_upper_usa7,
- sort_order_usa7,
- tab_us_ascii_uni, /* tab_to_uni */
- idx_uni_us_ascii, /* tab_from_uni */
- 0, /* strxfrm_multiply */
- my_strnncoll_simple,/* strnncoll */
- my_strnxfrm_simple, /* strnxfrm */
- my_like_range_simple,/* like_range */
- my_wildcmp_8bit, /* wildcmp */
- 1, /* mbmaxlen */
- NULL, /* ismbchar */
- NULL, /* ismbhead */
- NULL, /* mbcharlen */
- my_mb_wc_8bit, /* mb_wc */
- my_wc_mb_8bit, /* wc_mb */
- my_caseup_str_8bit,
- my_casedn_str_8bit,
- my_caseup_8bit,
- my_casedn_8bit,
- my_tosort_8bit,
- my_strcasecmp_8bit,
- my_strncasecmp_8bit,
- my_hash_caseup_simple,
- my_hash_sort_simple,
- 0,
- my_snprintf_8bit,
- my_long10_to_str_8bit,
- my_longlong10_to_str_8bit,
- my_strntol_8bit,
- my_strntoul_8bit,
- my_strntoll_8bit,
- my_strntoull_8bit,
- my_strntod_8bit,
- my_scan_8bit
- },
-#endif
-
-#ifdef HAVE_CHARSET_win1250
- {
- 26, /* number */
- MY_CS_COMPILED, /* state */
- "cp1250", /* cs name */
- "cp1250", /* name */
- "", /* comment */
- ctype_win1250,
- to_lower_win1250,
- to_upper_win1250,
- sort_order_win1250,
- tab_cp1250_uni, /* tab_to_uni */
- idx_uni_cp1250, /* tab_from_uni */
- 0, /* strxfrm_multiply */
- my_strnncoll_simple,/* strnncoll */
- my_strnxfrm_simple, /* strnxfrm */
- my_like_range_simple,/* like_range */
- my_wildcmp_8bit, /* wildcmp */
- 1, /* mbmaxlen */
- NULL, /* ismbchar */
- NULL, /* ismbhead */
- NULL, /* mbcharlen */
- my_mb_wc_8bit, /* mb_wc */
- my_wc_mb_8bit, /* wc_mb */
- my_caseup_str_8bit,
- my_casedn_str_8bit,
- my_caseup_8bit,
- my_casedn_8bit,
- my_tosort_8bit,
- my_strcasecmp_8bit,
- my_strncasecmp_8bit,
- my_hash_caseup_simple,
- my_hash_sort_simple,
- 0,
- my_snprintf_8bit,
- my_long10_to_str_8bit,
- my_longlong10_to_str_8bit,
- my_strntol_8bit,
- my_strntoul_8bit,
- my_strntoll_8bit,
- my_strntoull_8bit,
- my_strntod_8bit,
- my_scan_8bit
- },
-#endif
-
-#ifdef HAVE_CHARSET_win1251ukr
- {
- 23, /* number */
- MY_CS_COMPILED, /* state */
- "cp1251", /* cs name */
- "win1251ukr", /* name */
- "", /* comment */
- ctype_win1251ukr,
- to_lower_win1251ukr,
- to_upper_win1251ukr,
- sort_order_win1251ukr,
- tab_cp1251_uni, /* tab_to_uni */
- idx_uni_cp1251, /* tab_from_uni */
- 0, /* strxfrm_multiply */
- my_strnncoll_simple,/* strnncoll */
- my_strnxfrm_simple, /* strnxfrm */
- my_like_range_simple,/* like_range */
- my_wildcmp_8bit, /* wildcmp */
- 1, /* mbmaxlen */
- NULL, /* ismbchar */
- NULL, /* ismbhead */
- NULL, /* mbcharlen */
- my_mb_wc_8bit, /* mb_wc */
- my_wc_mb_8bit, /* wc_mb */
- my_caseup_str_8bit,
- my_casedn_str_8bit,
- my_caseup_8bit,
- my_casedn_8bit,
- my_strcasecmp_8bit,
- my_tosort_8bit,
- my_strncasecmp_8bit,
- my_hash_caseup_simple,
- my_hash_sort_simple,
- 0,
- my_snprintf_8bit,
- my_long10_to_str_8bit,
- my_longlong10_to_str_8bit,
- my_strntol_8bit,
- my_strntoul_8bit,
- my_strntoll_8bit,
- my_strntoull_8bit,
- my_strntod_8bit,
- my_scan_8bit
- },
-#endif
-
-#ifdef HAVE_CHARSET_armscii8
- {
- 32, /* number */
- MY_CS_COMPILED, /* state */
- "armscii8", /* cs name */
- "armscii8", /* name */
- "", /* comment */
- ctype_armscii8,
- to_lower_armscii8,
- to_upper_armscii8,
- sort_order_armscii8,
- tab_armscii_8_uni, /* tab_to_uni */
- idx_uni_armscii_8, /* tab_from_uni */
- 0, /* strxfrm_multiply */
- my_strnncoll_simple,/* strnncoll */
- my_strnxfrm_simple, /* strnxfrm */
- my_like_range_simple,/* like_range */
- my_wildcmp_8bit, /* wildcmp */
- 1, /* mbmaxlen */
- NULL, /* ismbchar */
- NULL, /* ismbhead */
- NULL, /* mbcharlen */
- my_mb_wc_8bit, /* mb_wc */
- my_wc_mb_8bit, /* wc_mb */
- my_caseup_str_8bit,
- my_casedn_str_8bit,
- my_caseup_8bit,
- my_casedn_8bit,
- my_tosort_8bit,
- my_strcasecmp_8bit,
- my_strncasecmp_8bit,
- my_hash_caseup_simple,
- my_hash_sort_simple,
- 0,
- my_snprintf_8bit,
- my_long10_to_str_8bit,
- my_longlong10_to_str_8bit,
- my_strntol_8bit,
- my_strntoul_8bit,
- my_strntoll_8bit,
- my_strntoull_8bit,
- my_strntod_8bit,
- my_scan_8bit
- },
-#endif
-
-#ifdef HAVE_CHARSET_win1251
- {
- 17, /* number */
- MY_CS_COMPILED, /* state */
- "cp1251", /* cs name */
- "win1251", /* name */
- "", /* comment */
- ctype_win1251,
- to_lower_win1251,
- to_upper_win1251,
- sort_order_win1251,
- tab_cp1251_uni, /* tab_to_uni */
- idx_uni_cp1251, /* tab_from_uni */
- 0, /* strxfrm_multiply */
- my_strnncoll_simple,/* strnncoll */
- my_strnxfrm_simple, /* strnxfrm */
- my_like_range_simple,/* like_range */
- my_wildcmp_8bit, /* wildcmp */
- 1, /* mbmaxlen */
- NULL, /* ismbchar */
- NULL, /* ismbhead */
- NULL, /* mbcharlen */
- my_mb_wc_8bit, /* mb_wc */
- my_wc_mb_8bit, /* wc_mb */
- my_caseup_str_8bit,
- my_casedn_str_8bit,
- my_caseup_8bit,
- my_casedn_8bit,
- my_tosort_8bit,
- my_strcasecmp_8bit,
- my_strncasecmp_8bit,
- my_hash_caseup_simple,
- my_hash_sort_simple,
- 0,
- my_snprintf_8bit,
- my_long10_to_str_8bit,
- my_longlong10_to_str_8bit,
- my_strntol_8bit,
- my_strntoul_8bit,
- my_strntoll_8bit,
- my_strntoull_8bit,
- my_strntod_8bit,
- my_scan_8bit
- },
-#endif
-
- {
- 0, /* end-of-list marker */
- 0, /* state */
- NullS, /* cs name */
- NullS, /* name */
- NullS, /* comment */
- NULL,
- NULL,
- NULL,
- NULL,
- NULL, /* tab_to_uni */
- NULL, /* tab_from_uni */
- 0,
- NULL, /* strnncoll */
- NULL, /* strnxfrm */
- NULL, /* like_range */
- NULL, /* wildcmp */
- 0,
- NULL,
- NULL,
- NULL,
-
- NULL, /* mb_wc */
- NULL, /* wc_mb */
-
- NULL,
- NULL,
- NULL,
- NULL,
- NULL,
- NULL,
- NULL,
- NULL, /* hash_caseup */
- NULL, /* hash_sort */
- 0,
- NULL,
- NULL,
- NULL,
- NULL,
- NULL,
- NULL,
- NULL,
- NULL,
- NULL
- }
-};
static char *mstr(char *str,const char *src,uint l1,uint l2)
@@ -4007,7 +110,6 @@ typedef struct my_cs_file_info
static int fill_uchar(uchar *a,uint size,const char *str, uint len)
{
- int err=0;
uint i= 0;
const char *s, *b, *e=str+len;
@@ -4018,7 +120,7 @@ static int fill_uchar(uchar *a,uint size,const char *str, uint len)
for ( ; (s < e) && !strchr(" \t\r\n",s[0]); s++) ;
if (s == b || i > size)
break;
- a[i]= (uchar) my_strntoul(my_charset_latin1,b,s-b,16,NULL,&err);
+ a[i]= (uchar) strtoul(b,NULL,16);
}
return 0;
}
@@ -4026,7 +128,6 @@ static int fill_uchar(uchar *a,uint size,const char *str, uint len)
static int fill_uint16(uint16 *a,uint size,const char *str, uint len)
{
uint i= 0;
- int err;
const char *s, *b, *e=str+len;
for (s=str ; s < e ; i++)
@@ -4036,7 +137,7 @@ static int fill_uint16(uint16 *a,uint size,const char *str, uint len)
for ( ; (s < e) && !strchr(" \t\r\n",s[0]); s++) ;
if (s == b || i > size)
break;
- a[i]= (uint16) my_strntol(my_charset_latin1,b,s-b,16,NULL,&err);
+ a[i]= (uint16) strtol(b,NULL,16);
}
return 0;
}
@@ -4078,7 +179,6 @@ static int cs_value(MY_XML_PARSER *st,const char *attr, uint len)
struct my_cs_file_info *i= (struct my_cs_file_info *)st->user_data;
struct my_cs_file_section_st *s;
int state= (s=cs_file_sec(st->attr,strlen(st->attr))) ? s->state : 0;
- int err;
#ifndef DBUG_OFF
if(0){
@@ -4090,7 +190,7 @@ static int cs_value(MY_XML_PARSER *st,const char *attr, uint len)
switch (state) {
case _CS_ID:
- i->cs.number= my_strntoul(my_charset_latin1,attr,len,10,(char**)NULL,&err);
+ i->cs.number= strtol(attr,(char**)NULL,10);
break;
case _CS_COLNAME:
i->cs.name=mstr(i->name,attr,len,MY_CS_NAME_SIZE-1);
@@ -4145,88 +245,3 @@ my_bool my_parse_charset_xml(const char *buf, uint len,
return rc;
}
-
-CHARSET_INFO *my_charset_latin1 = &compiled_charsets[0];
-CHARSET_INFO *all_charsets[256];
-CHARSET_INFO *default_charset_info = &compiled_charsets[0];
-CHARSET_INFO *system_charset_info = &compiled_charsets[0];
-
-#define MY_ADD_CHARSET(x) all_charsets[(x)->number]=(x)
-
-
-extern CHARSET_INFO my_charset_big5;
-extern CHARSET_INFO my_charset_czech;
-extern CHARSET_INFO my_charset_euc_kr;
-extern CHARSET_INFO my_charset_gb2312;
-extern CHARSET_INFO my_charset_gbk;
-extern CHARSET_INFO my_charset_latin1_de;
-extern CHARSET_INFO my_charset_sjis;
-extern CHARSET_INFO my_charset_tis620;
-extern CHARSET_INFO my_charset_ucs2;
-extern CHARSET_INFO my_charset_ujis;
-extern CHARSET_INFO my_charset_utf8;
-extern CHARSET_INFO my_charset_win1250ch;
-
-
-my_bool init_compiled_charsets(myf flags __attribute__((unused)))
-{
- CHARSET_INFO *cs;
-
- MY_ADD_CHARSET(my_charset_bin);
-
-#ifdef HAVE_CHARSET_big5
- MY_ADD_CHARSET(&my_charset_big5);
-#endif
-
-#ifdef HAVE_CHARSET_czech
- MY_ADD_CHARSET(&my_charset_czech);
-#endif
-
-#ifdef HAVE_CHARSET_euc_kr
- MY_ADD_CHARSET(&my_charset_euc_kr);
-#endif
-
-#ifdef HAVE_CHARSET_gb2312
- MY_ADD_CHARSET(&my_charset_gb2312);
-#endif
-
-#ifdef HAVE_CHARSET_gbk
- MY_ADD_CHARSET(&my_charset_gbk);
-#endif
-
-#ifdef HAVE_CHARSET_latin1_de
- MY_ADD_CHARSET(&my_charset_latin1_de);
-#endif
-
-#ifdef HAVE_CHARSET_sjis
- MY_ADD_CHARSET(&my_charset_sjis);
-#endif
-
-#ifdef HAVE_CHARSET_tis620
- MY_ADD_CHARSET(&my_charset_tis620);
-#endif
-
-#ifdef HAVE_CHARSET_ucs2
- MY_ADD_CHARSET(&my_charset_ucs2);
-#endif
-
-#ifdef HAVE_CHARSET_ujis
- MY_ADD_CHARSET(&my_charset_ujis);
-#endif
-
-#ifdef HAVE_CHARSET_utf8
- MY_ADD_CHARSET(&my_charset_utf8);
-#endif
-
-#ifdef HAVE_CHARSET_win1250ch
- MY_ADD_CHARSET(&my_charset_win1250ch);
-#endif
-
- /* Copy compiled charsets */
- for (cs=compiled_charsets; cs->name; cs++)
- {
- all_charsets[cs->number]=cs;
- }
-
- return FALSE;
-}
diff --git a/strings/my_vsnprintf.c b/strings/my_vsnprintf.c
index a67523af7bc..dbfd2783a80 100644
--- a/strings/my_vsnprintf.c
+++ b/strings/my_vsnprintf.c
@@ -65,7 +65,7 @@ int my_vsnprintf(char *to, size_t n, const char* fmt, va_list ap)
length= num_state= pre_zero= 0;
for (;; fmt++)
{
- if (my_isdigit(system_charset_info,*fmt))
+ if (my_isdigit(&my_charset_latin1,*fmt))
{
if (!num_state)
{
diff --git a/strings/str2int.c b/strings/str2int.c
index d7e6bb9aabc..d328d64d899 100644
--- a/strings/str2int.c
+++ b/strings/str2int.c
@@ -98,7 +98,7 @@ char *str2int(register const char *src, register int radix, long int lower,
converted value (and the scale!) as *negative* numbers,
so the sign is the opposite of what you might expect.
*/
- while (my_isspace(system_charset_info,*src)) src++;
+ while (my_isspace(&my_charset_latin1,*src)) src++;
sign = -1;
if (*src == '+') src++; else
if (*src == '-') src++, sign = 1;
diff --git a/strings/strto.c b/strings/strto.c
index cd8dee53692..8b838fd00f9 100644
--- a/strings/strto.c
+++ b/strings/strto.c
@@ -95,7 +95,7 @@ function (const char *nptr,char **endptr,int base)
s = nptr;
/* Skip white space. */
- while (my_isspace (system_charset_info, *s))
+ while (my_isspace (my_charset_latin1, *s))
++s;
if (*s == '\0')
{
@@ -115,7 +115,7 @@ function (const char *nptr,char **endptr,int base)
}
- if (base == 16 && s[0] == '0' && my_toupper (system_charset_info, s[1]) == 'X')
+ if (base == 16 && s[0] == '0' && my_toupper (my_charset_latin1, s[1]) == 'X')
s += 2;
/* If BASE is zero, figure it out ourselves. */
@@ -123,7 +123,7 @@ function (const char *nptr,char **endptr,int base)
{
if (*s == '0')
{
- if (my_toupper (system_charset_info, s[1]) == 'X')
+ if (my_toupper (my_charset_latin1, s[1]) == 'X')
{
s += 2;
base = 16;
@@ -145,10 +145,10 @@ function (const char *nptr,char **endptr,int base)
i = 0;
for (c = *s; c != '\0'; c = *++s)
{
- if (my_isdigit (system_charset_info, c))
+ if (my_isdigit (my_charset_latin1, c))
c -= '0';
- else if (my_isalpha (system_charset_info, c))
- c = my_toupper (system_charset_info, c) - 'A' + 10;
+ else if (my_isalpha (my_charset_latin1, c))
+ c = my_toupper (my_charset_latin1, c) - 'A' + 10;
else
break;
if (c >= base)
diff --git a/tests/client_test.c b/tests/client_test.c
index 3342dcd0fc9..546c013cfea 100644
--- a/tests/client_test.c
+++ b/tests/client_test.c
@@ -5307,7 +5307,7 @@ int main(int argc, char **argv)
{
time_t start_time, end_time;
double total_time= 0;
-
+
MY_INIT(argv[0]);
get_options(argc,argv);