mirror of
https://github.com/MariaDB/server.git
synced 2025-08-08 11:22:35 +03:00
MDEV-21581 Helper functions and methods for CHARSET_INFO
This commit is contained in:
@@ -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)
|
||||
|
Reference in New Issue
Block a user