mirror of
https://github.com/MariaDB/server.git
synced 2026-05-16 03:47:17 +02:00
CHARSET_INFO structure reorganization for easier maintainance
This commit is contained in:
parent
2eccde258d
commit
8192d169a2
27 changed files with 611 additions and 535 deletions
|
|
@ -174,6 +174,30 @@ int my_wc_mb_latin1(CHARSET_INFO *cs __attribute__((unused)),
|
|||
return ((wc < 256) && ((str[0]=uni_latin1[wc]) || (!wc))) ? 1 : MY_CS_ILUNI;
|
||||
}
|
||||
|
||||
static MY_CHARSET_HANDLER my_charset_handler=
|
||||
{
|
||||
NULL,
|
||||
NULL,
|
||||
my_numchars_8bit,
|
||||
my_charpos_8bit,
|
||||
my_mb_wc_latin1,
|
||||
my_wc_mb_latin1,
|
||||
my_caseup_str_8bit,
|
||||
my_casedn_str_8bit,
|
||||
my_caseup_8bit,
|
||||
my_casedn_8bit,
|
||||
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
|
||||
};
|
||||
|
||||
|
||||
CHARSET_INFO my_charset_latin1 =
|
||||
{
|
||||
|
|
@ -190,35 +214,10 @@ CHARSET_INFO my_charset_latin1 =
|
|||
NULL, /* tab_from_uni */
|
||||
"","",
|
||||
0, /* strxfrm_multiply */
|
||||
my_strnncoll_simple,
|
||||
my_strnncollsp_simple,
|
||||
my_strnxfrm_simple,
|
||||
my_like_range_simple,
|
||||
my_wildcmp_8bit, /* wildcmp */
|
||||
1, /* mbmaxlen */
|
||||
NULL, /* ismbchar */
|
||||
NULL, /* mbcharlen */
|
||||
my_numchars_8bit,
|
||||
my_charpos_8bit,
|
||||
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,
|
||||
my_strcasecmp_8bit,
|
||||
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
|
||||
&my_charset_handler,
|
||||
&my_collation_8bit_simple_ci_handler
|
||||
};
|
||||
|
||||
|
||||
|
|
@ -428,6 +427,19 @@ static int my_strnxfrm_latin1_de(CHARSET_INFO *cs __attribute__((unused)),
|
|||
return dest - dest_orig;
|
||||
}
|
||||
|
||||
|
||||
static MY_COLLATION_HANDLER my_collation_german2_ci_handler =
|
||||
{
|
||||
my_strnncoll_latin1_de,
|
||||
my_strnncollsp_latin1_de,
|
||||
my_strnxfrm_latin1_de,
|
||||
my_like_range_simple,
|
||||
my_wildcmp_8bit,
|
||||
my_strcasecmp_8bit,
|
||||
my_hash_sort_simple
|
||||
};
|
||||
|
||||
|
||||
CHARSET_INFO my_charset_latin1_german2_ci =
|
||||
{
|
||||
31,0,0, /* number */
|
||||
|
|
@ -443,34 +455,9 @@ CHARSET_INFO my_charset_latin1_german2_ci =
|
|||
NULL, /* tab_from_uni */
|
||||
"","",
|
||||
2, /* strxfrm_multiply */
|
||||
my_strnncoll_latin1_de,
|
||||
my_strnncollsp_latin1_de,
|
||||
my_strnxfrm_latin1_de,
|
||||
my_like_range_simple,
|
||||
my_wildcmp_8bit, /* wildcmp */
|
||||
1, /* mbmaxlen */
|
||||
NULL, /* ismbchar */
|
||||
NULL, /* mbcharlen */
|
||||
my_numchars_8bit,
|
||||
my_charpos_8bit,
|
||||
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,
|
||||
my_strcasecmp_8bit,
|
||||
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
|
||||
&my_charset_handler,
|
||||
&my_collation_german2_ci_handler
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue