diff options
Diffstat (limited to 'storage/myisam/ft_parser.c')
-rw-r--r-- | storage/myisam/ft_parser.c | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/storage/myisam/ft_parser.c b/storage/myisam/ft_parser.c index b400990d934..4584dbd4b91 100644 --- a/storage/myisam/ft_parser.c +++ b/storage/myisam/ft_parser.c @@ -1,4 +1,5 @@ /* Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved. + Copyright (c) 2020, MariaDB Corporation. 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 @@ -122,7 +123,7 @@ uchar ft_get_word(CHARSET_INFO *cs, const uchar **start, const uchar *end, { for (; doc < end; doc+= (mbl > 0 ? mbl : (mbl < 0 ? -mbl : 1))) { - mbl= cs->cset->ctype(cs, &ctype, (uchar*)doc, (uchar*)end); + mbl= my_ci_ctype(cs, &ctype, (uchar*)doc, (uchar*)end); if (true_word_char(ctype, *doc)) break; if (*doc == FTB_RQUOT && param->quot) @@ -161,7 +162,7 @@ uchar ft_get_word(CHARSET_INFO *cs, const uchar **start, const uchar *end, for (word->pos= doc; doc < end; length++, doc+= (mbl > 0 ? mbl : (mbl < 0 ? -mbl : 1))) { - mbl= cs->cset->ctype(cs, &ctype, (uchar*)doc, (uchar*)end); + mbl= my_ci_ctype(cs, &ctype, (uchar*)doc, (uchar*)end); if (true_word_char(ctype, *doc)) mwc=0; else if (!misc_word_char(*doc) || mwc) @@ -214,7 +215,7 @@ uchar ft_simple_get_word(CHARSET_INFO *cs, uchar **start, const uchar *end, { if (doc >= end) DBUG_RETURN(0); - mbl= cs->cset->ctype(cs, &ctype, (uchar*)doc, (uchar*)end); + mbl= my_ci_ctype(cs, &ctype, (uchar*)doc, (uchar*)end); if (true_word_char(ctype, *doc)) break; } @@ -223,7 +224,7 @@ uchar ft_simple_get_word(CHARSET_INFO *cs, uchar **start, const uchar *end, for (word->pos= doc; doc < end; length++, doc+= (mbl > 0 ? mbl : (mbl < 0 ? -mbl : 1))) { - mbl= cs->cset->ctype(cs, &ctype, (uchar*)doc, (uchar*)end); + mbl= my_ci_ctype(cs, &ctype, (uchar*)doc, (uchar*)end); if (true_word_char(ctype, *doc)) mwc= 0; else if (!misc_word_char(*doc) || mwc) @@ -340,9 +341,10 @@ MYSQL_FTPARSER_PARAM* ftparser_alloc_param(MI_INFO *info) (ftb_check_phrase_internal, ftb_phrase_add_word). Thus MAX_PARAM_NR=2. */ info->ftparser_param= (MYSQL_FTPARSER_PARAM *) - my_malloc(MAX_PARAM_NR * sizeof(MYSQL_FTPARSER_PARAM) * - info->s->ftkeys, MYF(MY_WME | MY_ZEROFILL)); - init_alloc_root(&info->ft_memroot, "fulltext_parser", + my_malloc(mi_key_memory_FTPARSER_PARAM, + MAX_PARAM_NR * sizeof(MYSQL_FTPARSER_PARAM) * info->s->ftkeys, + MYF(MY_WME | MY_ZEROFILL)); + init_alloc_root(mi_key_memory_ft_memroot, &info->ft_memroot, FTPARSER_MEMROOT_ALLOC_SIZE, 0, MYF(0)); } return info->ftparser_param; |