fts_is_charset_cjk(): Avoid referencing global symbols
References to global symbols prevent InnoDB from being built as a dynamic plugin on Windows. Refer to CHARSET_INFO::number, because that is what InnoDB is already persistently storing in its data dictionary.
This commit is contained in:
parent
e0aebf5cf1
commit
91173f9863
@ -108,19 +108,21 @@ innobase_strnxfrm(
|
|||||||
@param[in] cs charset
|
@param[in] cs charset
|
||||||
@retval true if the charset is cjk
|
@retval true if the charset is cjk
|
||||||
@retval false if not. */
|
@retval false if not. */
|
||||||
UNIV_INLINE
|
inline bool fts_is_charset_cjk(const CHARSET_INFO* cs)
|
||||||
bool
|
|
||||||
fts_is_charset_cjk(
|
|
||||||
const CHARSET_INFO* cs)
|
|
||||||
{
|
{
|
||||||
return cs == &my_charset_gb2312_chinese_ci
|
switch (cs->number) {
|
||||||
|| cs == &my_charset_gbk_chinese_ci
|
case 24: /* my_charset_gb2312_chinese_ci */
|
||||||
|| cs == &my_charset_big5_chinese_ci
|
case 28: /* my_charset_gbk_chinese_ci */
|
||||||
|| cs == &my_charset_ujis_japanese_ci
|
case 1: /* my_charset_big5_chinese_ci */
|
||||||
|| cs == &my_charset_sjis_japanese_ci
|
case 12: /* my_charset_ujis_japanese_ci */
|
||||||
|| cs == &my_charset_cp932_japanese_ci
|
case 13: /* my_charset_sjis_japanese_ci */
|
||||||
|| cs == &my_charset_eucjpms_japanese_ci
|
case 95: /* my_charset_cp932_japanese_ci */
|
||||||
|| cs == &my_charset_euckr_korean_ci;
|
case 97: /* my_charset_eucjpms_japanese_ci */
|
||||||
|
case 19: /* my_charset_euckr_korean_ci */
|
||||||
|
return true;
|
||||||
|
default:
|
||||||
|
return false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Select the FTS auxiliary index for the given character by range.
|
/** Select the FTS auxiliary index for the given character by range.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user