Renamed some charset related constant

New fields in CHARSET_INFO for more nice SHOW CHARACTER SET
Dynamic charsets are now handled in faster way
SHOW CHARACTER SET now displays not only compiled charsets but dynamic charsets too
parent c9cc3cce
...@@ -42,6 +42,14 @@ typedef struct unicase_info_st { ...@@ -42,6 +42,14 @@ typedef struct unicase_info_st {
#define MY_CS_TOOSMALL -1 #define MY_CS_TOOSMALL -1
#define MY_CS_TOOFEW(n) (-1-(n)) #define MY_CS_TOOFEW(n) (-1-(n))
/* My charsets_list flags */
#define MY_NO_SETS 0
#define MY_CS_COMPILED 1 /* compiled-in sets */
#define MY_CS_CONFIG 2 /* sets that have a *.conf file */
#define MY_CS_INDEX 4 /* sets listed in the Index file */
#define MY_CS_LOADED 8 /* sets that are currently loaded */
typedef struct my_uni_idx_st { typedef struct my_uni_idx_st {
uint16 from; uint16 from;
uint16 to; uint16 to;
...@@ -52,7 +60,9 @@ typedef struct my_uni_idx_st { ...@@ -52,7 +60,9 @@ typedef struct my_uni_idx_st {
typedef struct charset_info_st typedef struct charset_info_st
{ {
uint number; uint number;
uint state;
const char *name; const char *name;
const char *comment;
uchar *ctype; uchar *ctype;
uchar *to_lower; uchar *to_lower;
uchar *to_upper; uchar *to_upper;
...@@ -107,6 +117,7 @@ extern CHARSET_INFO *system_charset_info; ...@@ -107,6 +117,7 @@ extern CHARSET_INFO *system_charset_info;
extern CHARSET_INFO *find_compiled_charset(uint cs_number); extern CHARSET_INFO *find_compiled_charset(uint cs_number);
extern CHARSET_INFO *find_compiled_charset_by_name(const char *name); extern CHARSET_INFO *find_compiled_charset_by_name(const char *name);
extern CHARSET_INFO compiled_charsets[]; extern CHARSET_INFO compiled_charsets[];
extern CHARSET_INFO all_charsets[256];
extern uint compiled_charset_number(const char *name); extern uint compiled_charset_number(const char *name);
extern const char *compiled_charset_name(uint charset_number); extern const char *compiled_charset_name(uint charset_number);
......
...@@ -105,13 +105,6 @@ extern int NEAR my_errno; /* Last error in mysys */ ...@@ -105,13 +105,6 @@ extern int NEAR my_errno; /* Last error in mysys */
#define MY_SEEK_CUR 1 #define MY_SEEK_CUR 1
#define MY_SEEK_END 2 #define MY_SEEK_END 2
/* My charsets_list flags */
#define MY_NO_SETS 0
#define MY_COMPILED_SETS 1 /* show compiled-in sets */
#define MY_CONFIG_SETS 2 /* sets that have a *.conf file */
#define MY_INDEX_SETS 4 /* all sets listed in the Index file */
#define MY_LOADED_SETS 8 /* the sets that are currently loaded */
/* Some constants */ /* Some constants */
#define MY_WAIT_FOR_USER_TO_FIX_PANIC 60 /* in seconds */ #define MY_WAIT_FOR_USER_TO_FIX_PANIC 60 /* in seconds */
#define MY_WAIT_GIVE_USER_A_MESSAGE 10 /* Every 10 times of prev */ #define MY_WAIT_GIVE_USER_A_MESSAGE 10 /* Every 10 times of prev */
......
...@@ -413,7 +413,7 @@ int STDCALL mysql_server_init(int argc, char **argv, char **groups) ...@@ -413,7 +413,7 @@ int STDCALL mysql_server_init(int argc, char **argv, char **groups)
mysql_server_end(); mysql_server_end();
return 1; return 1;
} }
charsets_list = list_charsets(MYF(MY_COMPILED_SETS|MY_CONFIG_SETS)); charsets_list = list_charsets(MYF(MY_CS_COMPILED|MY_CS_CONFIG));
/* Parameter for threads created for connections */ /* Parameter for threads created for connections */
(void) pthread_attr_init(&connection_attrib); (void) pthread_attr_init(&connection_attrib);
......
...@@ -26,9 +26,8 @@ typedef struct cs_id_st { ...@@ -26,9 +26,8 @@ typedef struct cs_id_st {
} CS_ID; } CS_ID;
const char *charsets_dir = NULL; const char *charsets_dir = NULL;
static DYNAMIC_ARRAY cs_info_table;
static CS_ID **available_charsets;
static int charset_initialized=0; static int charset_initialized=0;
CHARSET_INFO all_charsets[256];
#define MAX_LINE 1024 #define MAX_LINE 1024
...@@ -44,24 +43,6 @@ struct simpleconfig_buf_st { ...@@ -44,24 +43,6 @@ struct simpleconfig_buf_st {
char *p; char *p;
}; };
static uint num_from_csname(CS_ID **cs, const char *name)
{
CS_ID **c;
for (c = cs; *c; ++c)
if (!strcmp((*c)->name, name))
return (*c)->number;
return 0; /* this mimics find_type() */
}
static char *name_from_csnum(CS_ID **cs, uint number)
{
CS_ID **c;
if(cs)
for (c = cs; *c; ++c)
if ((*c)->number == number)
return (*c)->name;
return (char*) "?"; /* this mimics find_type() */
}
static my_bool get_word(struct simpleconfig_buf_st *fb, char *buf) static my_bool get_word(struct simpleconfig_buf_st *fb, char *buf)
{ {
...@@ -109,12 +90,10 @@ char *get_charsets_dir(char *buf) ...@@ -109,12 +90,10 @@ char *get_charsets_dir(char *buf)
} }
static my_bool read_charset_index(CS_ID ***charsets, myf myflags) static my_bool read_charset_index(myf myflags)
{ {
struct simpleconfig_buf_st fb; struct simpleconfig_buf_st fb;
char buf[MAX_LINE], num_buf[MAX_LINE]; char buf[MAX_LINE], num_buf[MAX_LINE];
DYNAMIC_ARRAY cs;
CS_ID *csid;
strmov(get_charsets_dir(buf), "Index"); strmov(get_charsets_dir(buf), "Index");
...@@ -123,13 +102,12 @@ static my_bool read_charset_index(CS_ID ***charsets, myf myflags) ...@@ -123,13 +102,12 @@ static my_bool read_charset_index(CS_ID ***charsets, myf myflags)
fb.buf[0] = '\0'; fb.buf[0] = '\0';
fb.p = fb.buf; fb.p = fb.buf;
if (my_init_dynamic_array(&cs, sizeof(CS_ID *), 32, 32))
return TRUE;
while (!get_word(&fb, buf) && !get_word(&fb, num_buf)) while (!get_word(&fb, buf) && !get_word(&fb, num_buf))
{ {
uint csnum; uint csnum;
uint length; uint length;
CHARSET_INFO *cs;
if (!(csnum = atoi(num_buf))) if (!(csnum = atoi(num_buf)))
{ {
...@@ -138,64 +116,56 @@ static my_bool read_charset_index(CS_ID ***charsets, myf myflags) ...@@ -138,64 +116,56 @@ static my_bool read_charset_index(CS_ID ***charsets, myf myflags)
return TRUE; return TRUE;
} }
if (!(csid = (CS_ID*) my_once_alloc(sizeof(CS_ID), myflags)) || cs=&all_charsets[csnum];
!(csid->name=
if (!(cs->name=
(char*) my_once_alloc(length= (uint) strlen(buf)+1, myflags))) (char*) my_once_alloc(length= (uint) strlen(buf)+1, myflags)))
{ {
my_fclose(fb.f,myflags); my_fclose(fb.f,myflags);
return TRUE; return TRUE;
} }
memcpy(csid->name,buf,length); memcpy((char*)cs->name,buf,length);
csid->number = csnum; cs->number=csnum;
insert_dynamic(&cs, (gptr) &csid);
} }
my_fclose(fb.f,myflags); my_fclose(fb.f,myflags);
if (!(*charsets =
(CS_ID **) my_once_alloc((cs.elements + 1) * sizeof(CS_ID *), myflags)))
return TRUE;
/* unwarranted chumminess with dynamic_array implementation? */
memcpy((byte *) *charsets, cs.buffer, cs.elements * sizeof(CS_ID *));
(*charsets)[cs.elements] = NULL;
delete_dynamic(&cs);
return FALSE; return FALSE;
} }
static my_bool init_available_charsets(myf myflags) static my_bool init_available_charsets(myf myflags)
{ {
my_bool error=0; my_bool error=FALSE;
/* /*
We have to use charset_initialized to not lock on THR_LOCK_charset We have to use charset_initialized to not lock on THR_LOCK_charset
inside get_internal_charset... inside get_internal_charset...
*/ */
if (!charset_initialized) if (!charset_initialized)
{ {
CHARSET_INFO *cs;
/* /*
To make things thread safe we are not allowing other threads to interfere To make things thread safe we are not allowing other threads to interfere
while we may changing the cs_info_table while we may changing the cs_info_table
*/ */
pthread_mutex_lock(&THR_LOCK_charset); pthread_mutex_lock(&THR_LOCK_charset);
if (!cs_info_table.buffer) /* If not initialized */
{ bzero(&all_charsets,sizeof(all_charsets));
my_init_dynamic_array(&cs_info_table, sizeof(CHARSET_INFO*), 16, 8);
error = read_charset_index(&available_charsets, myflags); /* Copy compiled charsets */
}
for (cs=compiled_charsets; cs->name; cs++)
all_charsets[cs->number]=cs[0];
error = read_charset_index(myflags);
charset_initialized=1; charset_initialized=1;
pthread_mutex_unlock(&THR_LOCK_charset); pthread_mutex_unlock(&THR_LOCK_charset);
} }
if(!available_charsets || !available_charsets[0])
error = TRUE;
return error; return error;
} }
void free_charsets(void) void free_charsets(void)
{ {
delete_dynamic(&cs_info_table);
charset_initialized=0; charset_initialized=0;
} }
...@@ -231,10 +201,9 @@ static my_bool fill_uint16_array(uint16 *array, int sz, struct simpleconfig_buf_ ...@@ -231,10 +201,9 @@ static my_bool fill_uint16_array(uint16 *array, int sz, struct simpleconfig_buf_
} }
static void get_charset_conf_name(uint cs_number, char *buf) static void get_charset_conf_name(const char *cs_name, char *buf)
{ {
strxmov(get_charsets_dir(buf), strxmov(get_charsets_dir(buf), cs_name, ".conf", NullS);
name_from_csnum(available_charsets, cs_number), ".conf", NullS);
} }
typedef struct { typedef struct {
...@@ -323,19 +292,16 @@ static my_bool create_fromuni(CHARSET_INFO *cs){ ...@@ -323,19 +292,16 @@ static my_bool create_fromuni(CHARSET_INFO *cs){
} }
static my_bool read_charset_file(uint cs_number, CHARSET_INFO *set, static my_bool read_charset_file(const char *cs_name, CHARSET_INFO *set,
myf myflags) myf myflags)
{ {
struct simpleconfig_buf_st fb; struct simpleconfig_buf_st fb;
char buf[FN_REFLEN]; char buf[FN_REFLEN];
my_bool result; my_bool result;
DBUG_ENTER("read_charset_file"); DBUG_ENTER("read_charset_file");
DBUG_PRINT("enter",("cs_number: %d", cs_number)); DBUG_PRINT("enter",("cs_name: %s", cs_name));
if (cs_number <= 0)
DBUG_RETURN(TRUE);
get_charset_conf_name(cs_number, buf); get_charset_conf_name(cs_name, buf);
DBUG_PRINT("info",("file name: %s", buf)); DBUG_PRINT("info",("file name: %s", buf));
if ((fb.f = my_fopen(buf, O_RDONLY, myflags)) == NULL) if ((fb.f = my_fopen(buf, O_RDONLY, myflags)) == NULL)
...@@ -358,70 +324,26 @@ static my_bool read_charset_file(uint cs_number, CHARSET_INFO *set, ...@@ -358,70 +324,26 @@ static my_bool read_charset_file(uint cs_number, CHARSET_INFO *set,
} }
uint get_charset_number(const char *charset_name)
{
uint number=compiled_charset_number(charset_name);
if (number)
return number;
if (init_available_charsets(MYF(0))) /* If it isn't initialized */
return 0;
return num_from_csname(available_charsets, charset_name);
}
const char *get_charset_name(uint charset_number)
{
const char *name=compiled_charset_name(charset_number);
if (*name != '?')
return name;
if (init_available_charsets(MYF(0))) /* If it isn't initialized */
return "?";
return name_from_csnum(available_charsets, charset_number);
}
static CHARSET_INFO *find_charset(CHARSET_INFO **table, uint cs_number,
size_t tablesz)
{
uint i;
for (i = 0; i < tablesz; ++i)
if (table[i]->number == cs_number)
return table[i];
return NULL;
}
static CHARSET_INFO *find_charset_by_name(CHARSET_INFO **table,
const char *name, size_t tablesz)
{
uint i;
for (i = 0; i < tablesz; ++i)
if (!strcmp(table[i]->name,name))
return table[i];
return NULL;
}
static CHARSET_INFO *add_charset(uint cs_number, const char *cs_name, myf flags) static CHARSET_INFO *add_charset(uint cs_number, const char *cs_name, myf flags)
{ {
CHARSET_INFO tmp_cs,*cs; CHARSET_INFO *cs;
uchar tmp_ctype[CTYPE_TABLE_SIZE]; uchar tmp_ctype[CTYPE_TABLE_SIZE];
uchar tmp_to_lower[TO_LOWER_TABLE_SIZE]; uchar tmp_to_lower[TO_LOWER_TABLE_SIZE];
uchar tmp_to_upper[TO_UPPER_TABLE_SIZE]; uchar tmp_to_upper[TO_UPPER_TABLE_SIZE];
uchar tmp_sort_order[SORT_ORDER_TABLE_SIZE]; uchar tmp_sort_order[SORT_ORDER_TABLE_SIZE];
uint16 tmp_to_uni[TO_UNI_TABLE_SIZE]; uint16 tmp_to_uni[TO_UNI_TABLE_SIZE];
/* Don't allocate memory if we are not sure we can find the char set */ cs=&all_charsets[cs_number];
cs= &tmp_cs;
bzero((char*) cs, sizeof(*cs)); bzero((char*) cs, sizeof(*cs));
cs->ctype=tmp_ctype; cs->ctype=tmp_ctype;
cs->to_lower=tmp_to_lower; cs->to_lower=tmp_to_lower;
cs->to_upper=tmp_to_upper; cs->to_upper=tmp_to_upper;
cs->sort_order=tmp_sort_order; cs->sort_order=tmp_sort_order;
cs->tab_to_uni=tmp_to_uni; cs->tab_to_uni=tmp_to_uni;
if (read_charset_file(cs_number, cs, flags)) if (read_charset_file(cs_name, cs, flags))
return NULL; return NULL;
cs = (CHARSET_INFO*) my_once_alloc(sizeof(CHARSET_INFO), /* FIXME: double allocation */
MYF(MY_WME));
*cs=tmp_cs;
cs->name = (char *) my_once_alloc((uint) strlen(cs_name)+1, MYF(MY_WME)); cs->name = (char *) my_once_alloc((uint) strlen(cs_name)+1, MYF(MY_WME));
cs->ctype = (uchar*) my_once_alloc(CTYPE_TABLE_SIZE, MYF(MY_WME)); cs->ctype = (uchar*) my_once_alloc(CTYPE_TABLE_SIZE, MYF(MY_WME));
cs->to_lower = (uchar*) my_once_alloc(TO_LOWER_TABLE_SIZE, MYF(MY_WME)); cs->to_lower = (uchar*) my_once_alloc(TO_LOWER_TABLE_SIZE, MYF(MY_WME));
...@@ -446,10 +368,38 @@ static CHARSET_INFO *add_charset(uint cs_number, const char *cs_name, myf flags) ...@@ -446,10 +368,38 @@ static CHARSET_INFO *add_charset(uint cs_number, const char *cs_name, myf flags)
cs->mb_wc = my_mb_wc_8bit; cs->mb_wc = my_mb_wc_8bit;
cs->wc_mb = my_wc_mb_8bit; cs->wc_mb = my_wc_mb_8bit;
insert_dynamic(&cs_info_table, (gptr) &cs);
return cs; return cs;
} }
uint get_charset_number(const char *charset_name)
{
CHARSET_INFO *cs;
if (init_available_charsets(MYF(0))) /* If it isn't initialized */
return 0;
for (cs = all_charsets; cs < all_charsets+255; ++cs)
if ( cs->name && !strcmp(cs->name, charset_name))
return cs->number;
return 0; /* this mimics find_type() */
}
const char *get_charset_name(uint charset_number)
{
CHARSET_INFO *cs;
if (init_available_charsets(MYF(0))) /* If it isn't initialized */
return "?";
for (cs = all_charsets; cs < all_charsets+255; ++cs)
if (cs->number == charset_number)
return (char*) cs->name;
return (char*) "?"; /* this mimics find_type() */
}
static CHARSET_INFO *get_internal_charset(uint cs_number, myf flags) static CHARSET_INFO *get_internal_charset(uint cs_number, myf flags)
{ {
CHARSET_INFO *cs; CHARSET_INFO *cs;
...@@ -458,10 +408,10 @@ static CHARSET_INFO *get_internal_charset(uint cs_number, myf flags) ...@@ -458,10 +408,10 @@ static CHARSET_INFO *get_internal_charset(uint cs_number, myf flags)
while we may changing the cs_info_table while we may changing the cs_info_table
*/ */
pthread_mutex_lock(&THR_LOCK_charset); pthread_mutex_lock(&THR_LOCK_charset);
if (!(cs = find_charset((CHARSET_INFO**) cs_info_table.buffer, cs_number,
cs_info_table.elements)))
if (!(cs = find_compiled_charset(cs_number))) if (!(cs = find_compiled_charset(cs_number)))
cs=add_charset(cs_number, get_charset_name(cs_number), flags); cs=add_charset(cs_number, get_charset_name(cs_number), flags);
pthread_mutex_unlock(&THR_LOCK_charset); pthread_mutex_unlock(&THR_LOCK_charset);
return cs; return cs;
} }
...@@ -475,10 +425,10 @@ static CHARSET_INFO *get_internal_charset_by_name(const char *name, myf flags) ...@@ -475,10 +425,10 @@ static CHARSET_INFO *get_internal_charset_by_name(const char *name, myf flags)
while we may changing the cs_info_table while we may changing the cs_info_table
*/ */
pthread_mutex_lock(&THR_LOCK_charset); pthread_mutex_lock(&THR_LOCK_charset);
if (!(cs = find_charset_by_name((CHARSET_INFO**) cs_info_table.buffer, name,
cs_info_table.elements)))
if (!(cs = find_compiled_charset_by_name(name))) if (!(cs = find_compiled_charset_by_name(name)))
cs=add_charset(get_charset_number(name), name, flags); cs=add_charset(get_charset_number(name), name, flags);
pthread_mutex_unlock(&THR_LOCK_charset); pthread_mutex_unlock(&THR_LOCK_charset);
return cs; return cs;
} }
...@@ -585,7 +535,7 @@ char * list_charsets(myf want_flags) ...@@ -585,7 +535,7 @@ char * list_charsets(myf want_flags)
(void)init_available_charsets(MYF(0)); (void)init_available_charsets(MYF(0));
init_dynamic_string(&s, NullS, 256, 1024); init_dynamic_string(&s, NullS, 256, 1024);
if (want_flags & MY_COMPILED_SETS) if (want_flags & MY_CS_COMPILED)
{ {
CHARSET_INFO *cs; CHARSET_INFO *cs;
for (cs = compiled_charsets; cs->number > 0; cs++) for (cs = compiled_charsets; cs->number > 0; cs++)
...@@ -595,39 +545,43 @@ char * list_charsets(myf want_flags) ...@@ -595,39 +545,43 @@ char * list_charsets(myf want_flags)
} }
} }
if (want_flags & MY_CONFIG_SETS) if (want_flags & MY_CS_CONFIG)
{ {
CS_ID **c; CHARSET_INFO *cs;
char buf[FN_REFLEN]; char buf[FN_REFLEN];
MY_STAT status; MY_STAT status;
if((c=available_charsets)) for (cs=all_charsets; cs < all_charsets+255; cs++)
for (; *c; ++c)
{ {
if (charset_in_string((*c)->name, &s)) if (!cs->name || charset_in_string(cs->name, &s))
continue; continue;
get_charset_conf_name((*c)->number, buf); get_charset_conf_name(cs->name, buf);
if (!my_stat(buf, &status, MYF(0))) if (!my_stat(buf, &status, MYF(0)))
continue; /* conf file doesn't exist */ continue; /* conf file doesn't exist */
dynstr_append(&s, (*c)->name); dynstr_append(&s, cs->name);
dynstr_append(&s, " "); dynstr_append(&s, " ");
} }
} }
if (want_flags & MY_INDEX_SETS) if (want_flags & MY_CS_INDEX)
{ {
CS_ID **c; CHARSET_INFO *cs;
for (c = available_charsets; *c; ++c) for (cs = all_charsets; cs < all_charsets + 255; cs++)
charset_append(&s, (*c)->name); if (cs->name)
charset_append(&s, cs->name);
} }
#if 0
if (want_flags & MY_LOADED_SETS) if (want_flags & MY_LOADED_SETS)
{ {
uint i; CHARSET_INFO *cs;
for (i = 0; i < cs_info_table.elements; i++) /* FIXME */
charset_append(&s, for (cs = all_charsets; cs < all_charsets + 255; cs++)
dynamic_element(&cs_info_table, i, CHARSET_INFO *)->name); if (cs->name)
charset_append(&s, cs->name);
} }
#endif
s.str[s.length - 1] = '\0'; /* chop trailing space */ s.str[s.length - 1] = '\0'; /* chop trailing space */
p = my_strdup(s.str, MYF(MY_WME)); p = my_strdup(s.str, MYF(MY_WME));
dynstr_free(&s); dynstr_free(&s);
......
...@@ -77,11 +77,11 @@ int main(int argc, char **argv) { ...@@ -77,11 +77,11 @@ int main(int argc, char **argv) {
_print_csinfo(default_charset_info); _print_csinfo(default_charset_info);
fflush(stdout); fflush(stdout);
cs_list = list_charsets(MYF(MY_COMPILED_SETS | MY_CONFIG_SETS)); cs_list = list_charsets(MYF(MY_CS_COMPILED | MY_CS_CONFIG));
printf("LIST OF CHARSETS (compiled + *.conf):\n%s\n", cs_list); printf("LIST OF CHARSETS (compiled + *.conf):\n%s\n", cs_list);
my_free(cs_list,MYF(0)); my_free(cs_list,MYF(0));
cs_list = list_charsets(MYF(MY_INDEX_SETS | MY_LOADED_SETS)); cs_list = list_charsets(MYF(MY_CS_INDEX | MY_CS_LOADED));
printf("LIST OF CHARSETS (index + loaded):\n%s\n", cs_list); printf("LIST OF CHARSETS (index + loaded):\n%s\n", cs_list);
my_free(cs_list,MYF(0)); my_free(cs_list,MYF(0));
......
...@@ -1840,7 +1840,7 @@ int main(int argc, char **argv) ...@@ -1840,7 +1840,7 @@ int main(int argc, char **argv)
if (set_default_charset_by_name(default_charset, MYF(MY_WME))) if (set_default_charset_by_name(default_charset, MYF(MY_WME)))
exit( 1 ); exit( 1 );
charsets_list = list_charsets(MYF(MY_COMPILED_SETS|MY_CONFIG_SETS)); charsets_list = list_charsets(MYF(MY_CS_COMPILED|MY_CS_CONFIG));
#ifdef HAVE_OPENSSL #ifdef HAVE_OPENSSL
if (opt_use_ssl) if (opt_use_ssl)
......
...@@ -1381,8 +1381,10 @@ int mysqld_show_charsets(THD *thd, const char *wild) ...@@ -1381,8 +1381,10 @@ int mysqld_show_charsets(THD *thd, const char *wild)
if (send_fields(thd,field_list,1)) if (send_fields(thd,field_list,1))
DBUG_RETURN(1); DBUG_RETURN(1);
for (cs=compiled_charsets ; cs->name ; cs++ ) for (cs=all_charsets ; cs < all_charsets+255 ; cs++ )
{ {
if (!cs->name)
continue;
if (!(wild && wild[0] && wild_case_compare(system_charset_info,cs->name,wild))) if (!(wild && wild[0] && wild_case_compare(system_charset_info,cs->name,wild)))
{ {
packet2.length(0); packet2.length(0);
......
...@@ -2806,7 +2806,9 @@ CHARSET_INFO compiled_charsets[] = { ...@@ -2806,7 +2806,9 @@ CHARSET_INFO compiled_charsets[] = {
#ifdef HAVE_CHARSET_latin1 #ifdef HAVE_CHARSET_latin1
{ {
8, /* number */ 8, /* number */
MY_CS_COMPILED, /* state */
"latin1", /* name */ "latin1", /* name */
"", /* comment */
ctype_latin1, ctype_latin1,
to_lower_latin1, to_lower_latin1,
to_upper_latin1, to_upper_latin1,
...@@ -2838,7 +2840,9 @@ CHARSET_INFO compiled_charsets[] = { ...@@ -2838,7 +2840,9 @@ CHARSET_INFO compiled_charsets[] = {
#ifdef HAVE_CHARSET_big5 #ifdef HAVE_CHARSET_big5
{ {
1, /* number */ 1, /* number */
MY_CS_COMPILED, /* state */
"big5", /* name */ "big5", /* name */
"", /* comment */
ctype_big5, ctype_big5,
to_lower_big5, to_lower_big5,
to_upper_big5, to_upper_big5,
...@@ -2870,7 +2874,9 @@ CHARSET_INFO compiled_charsets[] = { ...@@ -2870,7 +2874,9 @@ CHARSET_INFO compiled_charsets[] = {
#ifdef HAVE_CHARSET_cp1251 #ifdef HAVE_CHARSET_cp1251
{ {
14, /* number */ 14, /* number */
MY_CS_COMPILED, /* state */
"cp1251", /* name */ "cp1251", /* name */
"", /* comment */
ctype_cp1251, ctype_cp1251,
to_lower_cp1251, to_lower_cp1251,
to_upper_cp1251, to_upper_cp1251,
...@@ -2902,7 +2908,9 @@ CHARSET_INFO compiled_charsets[] = { ...@@ -2902,7 +2908,9 @@ CHARSET_INFO compiled_charsets[] = {
#ifdef HAVE_CHARSET_cp1257 #ifdef HAVE_CHARSET_cp1257
{ {
29, /* number */ 29, /* number */
MY_CS_COMPILED, /* state */
"cp1257", /* name */ "cp1257", /* name */
"", /* comment */
ctype_cp1257, ctype_cp1257,
to_lower_cp1257, to_lower_cp1257,
to_upper_cp1257, to_upper_cp1257,
...@@ -2934,7 +2942,9 @@ CHARSET_INFO compiled_charsets[] = { ...@@ -2934,7 +2942,9 @@ CHARSET_INFO compiled_charsets[] = {
#ifdef HAVE_CHARSET_croat #ifdef HAVE_CHARSET_croat
{ {
27, /* number */ 27, /* number */
MY_CS_COMPILED, /* state */
"croat", /* name */ "croat", /* name */
"", /* comment */
ctype_croat, ctype_croat,
to_lower_croat, to_lower_croat,
to_upper_croat, to_upper_croat,
...@@ -2966,7 +2976,9 @@ CHARSET_INFO compiled_charsets[] = { ...@@ -2966,7 +2976,9 @@ CHARSET_INFO compiled_charsets[] = {
#ifdef HAVE_CHARSET_czech #ifdef HAVE_CHARSET_czech
{ {
2, /* number */ 2, /* number */
MY_CS_COMPILED, /* state */
"czech", /* name */ "czech", /* name */
"", /* comment */
ctype_czech, ctype_czech,
to_lower_czech, to_lower_czech,
to_upper_czech, to_upper_czech,
...@@ -2998,7 +3010,9 @@ CHARSET_INFO compiled_charsets[] = { ...@@ -2998,7 +3010,9 @@ CHARSET_INFO compiled_charsets[] = {
#ifdef HAVE_CHARSET_danish #ifdef HAVE_CHARSET_danish
{ {
15, /* number */ 15, /* number */
MY_CS_COMPILED, /* state */
"danish", /* name */ "danish", /* name */
"", /* comment */
ctype_danish, ctype_danish,
to_lower_danish, to_lower_danish,
to_upper_danish, to_upper_danish,
...@@ -3030,7 +3044,9 @@ CHARSET_INFO compiled_charsets[] = { ...@@ -3030,7 +3044,9 @@ CHARSET_INFO compiled_charsets[] = {
#ifdef HAVE_CHARSET_dec8 #ifdef HAVE_CHARSET_dec8
{ {
3, /* number */ 3, /* number */
MY_CS_COMPILED, /* state */
"dec8", /* name */ "dec8", /* name */
"", /* comment */
ctype_dec8, ctype_dec8,
to_lower_dec8, to_lower_dec8,
to_upper_dec8, to_upper_dec8,
...@@ -3062,7 +3078,9 @@ CHARSET_INFO compiled_charsets[] = { ...@@ -3062,7 +3078,9 @@ CHARSET_INFO compiled_charsets[] = {
#ifdef HAVE_CHARSET_dos #ifdef HAVE_CHARSET_dos
{ {
4, /* number */ 4, /* number */
MY_CS_COMPILED, /* state */
"dos", /* name */ "dos", /* name */
"", /* comment */
ctype_dos, ctype_dos,
to_lower_dos, to_lower_dos,
to_upper_dos, to_upper_dos,
...@@ -3094,7 +3112,9 @@ CHARSET_INFO compiled_charsets[] = { ...@@ -3094,7 +3112,9 @@ CHARSET_INFO compiled_charsets[] = {
#ifdef HAVE_CHARSET_estonia #ifdef HAVE_CHARSET_estonia
{ {
20, /* number */ 20, /* number */
MY_CS_COMPILED, /* state */
"estonia", /* name */ "estonia", /* name */
"", /* comment */
ctype_estonia, ctype_estonia,
to_lower_estonia, to_lower_estonia,
to_upper_estonia, to_upper_estonia,
...@@ -3126,7 +3146,9 @@ CHARSET_INFO compiled_charsets[] = { ...@@ -3126,7 +3146,9 @@ CHARSET_INFO compiled_charsets[] = {
#ifdef HAVE_CHARSET_euc_kr #ifdef HAVE_CHARSET_euc_kr
{ {
19, /* number */ 19, /* number */
MY_CS_COMPILED, /* state */
"euc_kr", /* name */ "euc_kr", /* name */
"", /* comment */
ctype_euc_kr, ctype_euc_kr,
to_lower_euc_kr, to_lower_euc_kr,
to_upper_euc_kr, to_upper_euc_kr,
...@@ -3158,7 +3180,9 @@ CHARSET_INFO compiled_charsets[] = { ...@@ -3158,7 +3180,9 @@ CHARSET_INFO compiled_charsets[] = {
#ifdef HAVE_CHARSET_gb2312 #ifdef HAVE_CHARSET_gb2312
{ {
24, /* number */ 24, /* number */
MY_CS_COMPILED, /* state */
"gb2312", /* name */ "gb2312", /* name */
"", /* comment */
ctype_gb2312, ctype_gb2312,
to_lower_gb2312, to_lower_gb2312,
to_upper_gb2312, to_upper_gb2312,
...@@ -3190,7 +3214,9 @@ CHARSET_INFO compiled_charsets[] = { ...@@ -3190,7 +3214,9 @@ CHARSET_INFO compiled_charsets[] = {
#ifdef HAVE_CHARSET_gbk #ifdef HAVE_CHARSET_gbk
{ {
28, /* number */ 28, /* number */
MY_CS_COMPILED, /* state */
"gbk", /* name */ "gbk", /* name */
"", /* comment */
ctype_gbk, ctype_gbk,
to_lower_gbk, to_lower_gbk,
to_upper_gbk, to_upper_gbk,
...@@ -3222,7 +3248,9 @@ CHARSET_INFO compiled_charsets[] = { ...@@ -3222,7 +3248,9 @@ CHARSET_INFO compiled_charsets[] = {
#ifdef HAVE_CHARSET_german1 #ifdef HAVE_CHARSET_german1
{ {
5, /* number */ 5, /* number */
MY_CS_COMPILED, /* state */
"german1", /* name */ "german1", /* name */
"", /* comment */
ctype_german1, ctype_german1,
to_lower_german1, to_lower_german1,
to_upper_german1, to_upper_german1,
...@@ -3254,7 +3282,9 @@ CHARSET_INFO compiled_charsets[] = { ...@@ -3254,7 +3282,9 @@ CHARSET_INFO compiled_charsets[] = {
#ifdef HAVE_CHARSET_greek #ifdef HAVE_CHARSET_greek
{ {
25, /* number */ 25, /* number */
MY_CS_COMPILED, /* state */
"greek", /* name */ "greek", /* name */
"", /* comment */
ctype_greek, ctype_greek,
to_lower_greek, to_lower_greek,
to_upper_greek, to_upper_greek,
...@@ -3286,7 +3316,9 @@ CHARSET_INFO compiled_charsets[] = { ...@@ -3286,7 +3316,9 @@ CHARSET_INFO compiled_charsets[] = {
#ifdef HAVE_CHARSET_hebrew #ifdef HAVE_CHARSET_hebrew
{ {
16, /* number */ 16, /* number */
MY_CS_COMPILED, /* state */
"hebrew", /* name */ "hebrew", /* name */
"", /* comment */
ctype_hebrew, ctype_hebrew,
to_lower_hebrew, to_lower_hebrew,
to_upper_hebrew, to_upper_hebrew,
...@@ -3318,7 +3350,9 @@ CHARSET_INFO compiled_charsets[] = { ...@@ -3318,7 +3350,9 @@ CHARSET_INFO compiled_charsets[] = {
#ifdef HAVE_CHARSET_hp8 #ifdef HAVE_CHARSET_hp8
{ {
6, /* number */ 6, /* number */
MY_CS_COMPILED, /* state */
"hp8", /* name */ "hp8", /* name */
"", /* comment */
ctype_hp8, ctype_hp8,
to_lower_hp8, to_lower_hp8,
to_upper_hp8, to_upper_hp8,
...@@ -3350,7 +3384,9 @@ CHARSET_INFO compiled_charsets[] = { ...@@ -3350,7 +3384,9 @@ CHARSET_INFO compiled_charsets[] = {
#ifdef HAVE_CHARSET_hungarian #ifdef HAVE_CHARSET_hungarian
{ {
21, /* number */ 21, /* number */
MY_CS_COMPILED, /* state */
"hungarian", /* name */ "hungarian", /* name */
"", /* comment */
ctype_hungarian, ctype_hungarian,
to_lower_hungarian, to_lower_hungarian,
to_upper_hungarian, to_upper_hungarian,
...@@ -3382,7 +3418,9 @@ CHARSET_INFO compiled_charsets[] = { ...@@ -3382,7 +3418,9 @@ CHARSET_INFO compiled_charsets[] = {
#ifdef HAVE_CHARSET_koi8_ru #ifdef HAVE_CHARSET_koi8_ru
{ {
7, /* number */ 7, /* number */
MY_CS_COMPILED, /* state */
"koi8_ru", /* name */ "koi8_ru", /* name */
"", /* comment */
ctype_koi8_ru, ctype_koi8_ru,
to_lower_koi8_ru, to_lower_koi8_ru,
to_upper_koi8_ru, to_upper_koi8_ru,
...@@ -3414,7 +3452,9 @@ CHARSET_INFO compiled_charsets[] = { ...@@ -3414,7 +3452,9 @@ CHARSET_INFO compiled_charsets[] = {
#ifdef HAVE_CHARSET_koi8_ukr #ifdef HAVE_CHARSET_koi8_ukr
{ {
22, /* number */ 22, /* number */
MY_CS_COMPILED, /* state */
"koi8_ukr", /* name */ "koi8_ukr", /* name */
"", /* comment */
ctype_koi8_ukr, ctype_koi8_ukr,
to_lower_koi8_ukr, to_lower_koi8_ukr,
to_upper_koi8_ukr, to_upper_koi8_ukr,
...@@ -3446,7 +3486,9 @@ CHARSET_INFO compiled_charsets[] = { ...@@ -3446,7 +3486,9 @@ CHARSET_INFO compiled_charsets[] = {
#ifdef HAVE_CHARSET_latin1_de #ifdef HAVE_CHARSET_latin1_de
{ {
31, /* number */ 31, /* number */
MY_CS_COMPILED, /* state */
"latin1_de", /* name */ "latin1_de", /* name */
"", /* comment */
ctype_latin1_de, ctype_latin1_de,
to_lower_latin1_de, to_lower_latin1_de,
to_upper_latin1_de, to_upper_latin1_de,
...@@ -3478,7 +3520,9 @@ CHARSET_INFO compiled_charsets[] = { ...@@ -3478,7 +3520,9 @@ CHARSET_INFO compiled_charsets[] = {
#ifdef HAVE_CHARSET_latin2 #ifdef HAVE_CHARSET_latin2
{ {
9, /* number */ 9, /* number */
MY_CS_COMPILED, /* state */
"latin2", /* name */ "latin2", /* name */
"", /* comment */
ctype_latin2, ctype_latin2,
to_lower_latin2, to_lower_latin2,
to_upper_latin2, to_upper_latin2,
...@@ -3510,7 +3554,9 @@ CHARSET_INFO compiled_charsets[] = { ...@@ -3510,7 +3554,9 @@ CHARSET_INFO compiled_charsets[] = {
#ifdef HAVE_CHARSET_latin5 #ifdef HAVE_CHARSET_latin5
{ {
30, /* number */ 30, /* number */
MY_CS_COMPILED, /* state */
"latin5", /* name */ "latin5", /* name */
"", /* comment */
ctype_latin5, ctype_latin5,
to_lower_latin5, to_lower_latin5,
to_upper_latin5, to_upper_latin5,
...@@ -3542,7 +3588,9 @@ CHARSET_INFO compiled_charsets[] = { ...@@ -3542,7 +3588,9 @@ CHARSET_INFO compiled_charsets[] = {
#ifdef HAVE_CHARSET_sjis #ifdef HAVE_CHARSET_sjis
{ {
13, /* number */ 13, /* number */
MY_CS_COMPILED, /* state */
"sjis", /* name */ "sjis", /* name */
"", /* comment */
ctype_sjis, ctype_sjis,
to_lower_sjis, to_lower_sjis,
to_upper_sjis, to_upper_sjis,
...@@ -3574,7 +3622,9 @@ CHARSET_INFO compiled_charsets[] = { ...@@ -3574,7 +3622,9 @@ CHARSET_INFO compiled_charsets[] = {
#ifdef HAVE_CHARSET_swe7 #ifdef HAVE_CHARSET_swe7
{ {
10, /* number */ 10, /* number */
MY_CS_COMPILED, /* state */
"swe7", /* name */ "swe7", /* name */
"", /* comment */
ctype_swe7, ctype_swe7,
to_lower_swe7, to_lower_swe7,
to_upper_swe7, to_upper_swe7,
...@@ -3606,7 +3656,9 @@ CHARSET_INFO compiled_charsets[] = { ...@@ -3606,7 +3656,9 @@ CHARSET_INFO compiled_charsets[] = {
#ifdef HAVE_CHARSET_tis620 #ifdef HAVE_CHARSET_tis620
{ {
18, /* number */ 18, /* number */
MY_CS_COMPILED, /* state */
"tis620", /* name */ "tis620", /* name */
"", /* comment */
ctype_tis620, ctype_tis620,
to_lower_tis620, to_lower_tis620,
to_upper_tis620, to_upper_tis620,
...@@ -3638,7 +3690,9 @@ CHARSET_INFO compiled_charsets[] = { ...@@ -3638,7 +3690,9 @@ CHARSET_INFO compiled_charsets[] = {
#ifdef HAVE_CHARSET_ucs2 #ifdef HAVE_CHARSET_ucs2
{ {
35, /* number */ 35, /* number */
MY_CS_COMPILED, /* state */
"ucs2", /* name */ "ucs2", /* name */
"", /* comment */
ctype_ucs2, /* ctype */ ctype_ucs2, /* ctype */
to_lower_ucs2, /* to_lower */ to_lower_ucs2, /* to_lower */
to_upper_ucs2, /* to_upper */ to_upper_ucs2, /* to_upper */
...@@ -3671,7 +3725,9 @@ CHARSET_INFO compiled_charsets[] = { ...@@ -3671,7 +3725,9 @@ CHARSET_INFO compiled_charsets[] = {
#ifdef HAVE_CHARSET_ujis #ifdef HAVE_CHARSET_ujis
{ {
12, /* number */ 12, /* number */
MY_CS_COMPILED, /* state */
"ujis", /* name */ "ujis", /* name */
"", /* comment */
ctype_ujis, ctype_ujis,
to_lower_ujis, to_lower_ujis,
to_upper_ujis, to_upper_ujis,
...@@ -3703,7 +3759,9 @@ CHARSET_INFO compiled_charsets[] = { ...@@ -3703,7 +3759,9 @@ CHARSET_INFO compiled_charsets[] = {
#ifdef HAVE_CHARSET_utf8 #ifdef HAVE_CHARSET_utf8
{ {
33, /* number */ 33, /* number */
MY_CS_COMPILED, /* state */
"utf8", /* name */ "utf8", /* name */
"", /* comment */
ctype_utf8, /* ctype */ ctype_utf8, /* ctype */
to_lower_utf8, /* to_lower */ to_lower_utf8, /* to_lower */
to_upper_utf8, /* to_upper */ to_upper_utf8, /* to_upper */
...@@ -3735,7 +3793,9 @@ CHARSET_INFO compiled_charsets[] = { ...@@ -3735,7 +3793,9 @@ CHARSET_INFO compiled_charsets[] = {
#ifdef HAVE_CHARSET_usa7 #ifdef HAVE_CHARSET_usa7
{ {
11, /* number */ 11, /* number */
MY_CS_COMPILED, /* state */
"usa7", /* name */ "usa7", /* name */
"", /* comment */
ctype_usa7, ctype_usa7,
to_lower_usa7, to_lower_usa7,
to_upper_usa7, to_upper_usa7,
...@@ -3767,7 +3827,9 @@ CHARSET_INFO compiled_charsets[] = { ...@@ -3767,7 +3827,9 @@ CHARSET_INFO compiled_charsets[] = {
#ifdef HAVE_CHARSET_win1250 #ifdef HAVE_CHARSET_win1250
{ {
26, /* number */ 26, /* number */
MY_CS_COMPILED, /* state */
"win1250", /* name */ "win1250", /* name */
"", /* comment */
ctype_win1250, ctype_win1250,
to_lower_win1250, to_lower_win1250,
to_upper_win1250, to_upper_win1250,
...@@ -3799,7 +3861,9 @@ CHARSET_INFO compiled_charsets[] = { ...@@ -3799,7 +3861,9 @@ CHARSET_INFO compiled_charsets[] = {
#ifdef HAVE_CHARSET_win1251ukr #ifdef HAVE_CHARSET_win1251ukr
{ {
23, /* number */ 23, /* number */
MY_CS_COMPILED, /* state */
"win1251ukr", /* name */ "win1251ukr", /* name */
"", /* comment */
ctype_win1251ukr, ctype_win1251ukr,
to_lower_win1251ukr, to_lower_win1251ukr,
to_upper_win1251ukr, to_upper_win1251ukr,
...@@ -3831,7 +3895,9 @@ CHARSET_INFO compiled_charsets[] = { ...@@ -3831,7 +3895,9 @@ CHARSET_INFO compiled_charsets[] = {
#ifdef HAVE_CHARSET_armscii8 #ifdef HAVE_CHARSET_armscii8
{ {
32, /* number */ 32, /* number */
MY_CS_COMPILED, /* state */
"armscii8", /* name */ "armscii8", /* name */
"", /* comment */
ctype_armscii8, ctype_armscii8,
to_lower_armscii8, to_lower_armscii8,
to_upper_armscii8, to_upper_armscii8,
...@@ -3863,7 +3929,9 @@ CHARSET_INFO compiled_charsets[] = { ...@@ -3863,7 +3929,9 @@ CHARSET_INFO compiled_charsets[] = {
#ifdef HAVE_CHARSET_win1251 #ifdef HAVE_CHARSET_win1251
{ {
17, /* number */ 17, /* number */
MY_CS_COMPILED, /* state */
"win1251", /* name */ "win1251", /* name */
"", /* comment */
ctype_win1251, ctype_win1251,
to_lower_win1251, to_lower_win1251,
to_upper_win1251, to_upper_win1251,
...@@ -3895,7 +3963,9 @@ CHARSET_INFO compiled_charsets[] = { ...@@ -3895,7 +3963,9 @@ CHARSET_INFO compiled_charsets[] = {
#ifdef HAVE_CHARSET_win1250ch #ifdef HAVE_CHARSET_win1250ch
{ {
34, /* number */ 34, /* number */
MY_CS_COMPILED, /* state */
"win1250ch", /* name */ "win1250ch", /* name */
"", /* comment */
ctype_win1250ch, ctype_win1250ch,
to_lower_win1250ch, to_lower_win1250ch,
to_upper_win1250ch, to_upper_win1250ch,
...@@ -3926,7 +3996,9 @@ CHARSET_INFO compiled_charsets[] = { ...@@ -3926,7 +3996,9 @@ CHARSET_INFO compiled_charsets[] = {
{ {
0, /* end-of-list marker */ 0, /* end-of-list marker */
NullS, 0, /* state */
NullS, /* name */
NullS, /* comment */
NULL, NULL,
NULL, NULL,
NULL, NULL,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment