diff options
author | Marko Mäkelä <marko.makela@mariadb.com> | 2021-10-13 12:33:56 +0300 |
---|---|---|
committer | Marko Mäkelä <marko.makela@mariadb.com> | 2021-10-13 12:33:56 +0300 |
commit | 99bb3fb656f4a2a06c808b7c5d50e18e4c44b73b (patch) | |
tree | 121d54271137b00d58b23505644be3bc3a819a9e /storage/myisam | |
parent | cda072bb4ba9e01d523d8deb995f28aa7a19fe11 (diff) | |
parent | a736a3174a4e7c0d92a38901ae61f563d4afede7 (diff) | |
download | mariadb-git-99bb3fb656f4a2a06c808b7c5d50e18e4c44b73b.tar.gz |
Merge 10.4 into 10.5
Diffstat (limited to 'storage/myisam')
-rw-r--r-- | storage/myisam/ft_parser.c | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/storage/myisam/ft_parser.c b/storage/myisam/ft_parser.c index 4584dbd4b91..61b1915d5e0 100644 --- a/storage/myisam/ft_parser.c +++ b/storage/myisam/ft_parser.c @@ -79,18 +79,25 @@ FT_WORD * ft_linearize(TREE *wtree, MEM_ROOT *mem_root) DBUG_RETURN(wlist); } -my_bool ft_boolean_check_syntax_string(const uchar *str) +my_bool ft_boolean_check_syntax_string(const uchar *str, size_t length, + CHARSET_INFO *cs) { uint i, j; + if (cs->mbminlen != 1) + { + DBUG_ASSERT(0); + return 1; + } + if (!str || - (strlen((char*) str)+1 != sizeof(DEFAULT_FTB_SYNTAX)) || + (length + 1 != sizeof(DEFAULT_FTB_SYNTAX)) || (str[0] != ' ' && str[1] != ' ')) return 1; for (i=0; i<sizeof(DEFAULT_FTB_SYNTAX); i++) { /* limiting to 7-bit ascii only */ - if ((unsigned char)(str[i]) > 127 || my_isalnum(default_charset_info, str[i])) + if ((unsigned char)(str[i]) > 127 || my_isalnum(cs, str[i])) return 1; for (j=0; j<i; j++) if (str[i] == str[j] && (i != 11 || j != 10)) |