Commit c0dec39d authored by Marko Mäkelä's avatar Marko Mäkelä

fts_is_charset_cjk(): Do not call strcmp()

Remove a bogus reference to gb18030_chinese_ci, which was introduced
in MySQL 5.7. It is roughly equivalent to utf8mb4_unicode_ci, just
using a different internal encoding, and different collation.
parent e54d521b
/***************************************************************************** /*****************************************************************************
Copyright (c) 2007, 2015, Oracle and/or its affiliates. All Rights Reserved. Copyright (c) 2007, 2015, Oracle and/or its affiliates. All Rights Reserved.
Copyright (c) 2017, MariaDB Corporation.
This program is free software; you can redistribute it and/or modify it under 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 the terms of the GNU General Public License as published by the Free Software
...@@ -115,19 +116,14 @@ bool ...@@ -115,19 +116,14 @@ bool
fts_is_charset_cjk( fts_is_charset_cjk(
const CHARSET_INFO* cs) const CHARSET_INFO* cs)
{ {
if (strcmp(cs->name, "gb2312_chinese_ci") == 0 return cs == &my_charset_gb2312_chinese_ci
|| strcmp(cs->name, "gbk_chinese_ci") == 0 || cs == &my_charset_gbk_chinese_ci
|| strcmp(cs->name, "big5_chinese_ci") == 0 || cs == &my_charset_big5_chinese_ci
|| strcmp(cs->name, "gb18030_chinese_ci") == 0 || cs == &my_charset_ujis_japanese_ci
|| strcmp(cs->name, "ujis_japanese_ci") == 0 || cs == &my_charset_sjis_japanese_ci
|| strcmp(cs->name, "sjis_japanese_ci") == 0 || cs == &my_charset_cp932_japanese_ci
|| strcmp(cs->name, "cp932_japanese_ci") == 0 || cs == &my_charset_eucjpms_japanese_ci
|| strcmp(cs->name, "eucjpms_japanese_ci") == 0 || cs == &my_charset_euckr_korean_ci;
|| strcmp(cs->name, "euckr_korean_ci") == 0) {
return(true);
} else {
return(false);
}
} }
/** Select the FTS auxiliary index for the given character by range. /** 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