diff options
author | Alexander Barkov <bar@mariadb.com> | 2021-10-08 20:44:38 +0400 |
---|---|---|
committer | Alexander Barkov <bar@mariadb.com> | 2021-10-11 17:43:23 +0400 |
commit | eadd87880887e6ca73e6f292c9d856df7e56c3c0 (patch) | |
tree | d27bb701a9015bba0494e1ff042ead5258bae2a9 /include | |
parent | 9300b6657752e566a3c72da7ca6eaa8ee052e4e1 (diff) | |
download | mariadb-git-eadd87880887e6ca73e6f292c9d856df7e56c3c0.tar.gz |
MDEV-23269 SIGSEGV in ft_boolean_check_syntax_string on setting ft_boolean_syntaxbb-10.2-bar-MDEV-23269
The crash happened because my_isalnum() does not support character
sets with mbminlen>1.
The value of "ft_boolean_syntax" is converted to utf8 in do_string_check().
So calling my_isalnum() is combination with "default_charset_info" was wrong.
Adding new parameters (size_t length, CHARSET_INFO *cs) to
ft_boolean_check_syntax_string() and passing self->charset(thd)
as the character set.
Diffstat (limited to 'include')
-rw-r--r-- | include/ft_global.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/include/ft_global.h b/include/ft_global.h index 725363c3aa8..9f2d52610ba 100644 --- a/include/ft_global.h +++ b/include/ft_global.h @@ -90,7 +90,8 @@ void ft_free_stopwords(void); FT_INFO *ft_init_search(uint,void *, uint, uchar *, size_t, CHARSET_INFO *, uchar *); -my_bool ft_boolean_check_syntax_string(const uchar *); +my_bool ft_boolean_check_syntax_string(const uchar *, size_t length, + CHARSET_INFO *cs); /* Internal symbols for fulltext between maria and MyISAM */ |