Commit 91173f98 authored by Marko Mäkelä's avatar Marko Mäkelä

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.
parent e0aebf5c
......@@ -108,19 +108,21 @@ innobase_strnxfrm(
@param[in] cs charset
@retval true if the charset is cjk
@retval false if not. */
UNIV_INLINE
bool
fts_is_charset_cjk(
const CHARSET_INFO* cs)
inline bool fts_is_charset_cjk(const CHARSET_INFO* cs)
{
return cs == &my_charset_gb2312_chinese_ci
|| cs == &my_charset_gbk_chinese_ci
|| cs == &my_charset_big5_chinese_ci
|| cs == &my_charset_ujis_japanese_ci
|| cs == &my_charset_sjis_japanese_ci
|| cs == &my_charset_cp932_japanese_ci
|| cs == &my_charset_eucjpms_japanese_ci
|| cs == &my_charset_euckr_korean_ci;
switch (cs->number) {
case 24: /* my_charset_gb2312_chinese_ci */
case 28: /* my_charset_gbk_chinese_ci */
case 1: /* my_charset_big5_chinese_ci */
case 12: /* my_charset_ujis_japanese_ci */
case 13: /* my_charset_sjis_japanese_ci */
case 95: /* my_charset_cp932_japanese_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.
......
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