mirror of
https://github.com/MariaDB/server.git
synced 2026-04-26 02:05:31 +02:00
ft_boolean_syntax made changeable
BitKeeper/deleted/.del-gstream.cc~e7a4fae849aff6c8: Delete: libmysqld/gstream.cc BitKeeper/deleted/.del-item_subselect.cc~80564bbdb47e8160: Delete: libmysqld/item_subselect.cc BitKeeper/deleted/.del-spatial.cc~604df7172b141762: Delete: libmysqld/spatial.cc BitKeeper/deleted/.del-sql_derived.cc~548b125128871c7a: Delete: libmysqld/sql_derived.cc BitKeeper/etc/ignore: Added libmysqld/item_subselect.cc libmysqld/sql_derived.cc to the ignore list
This commit is contained in:
parent
cb6cd9affe
commit
5a9ffa300a
10 changed files with 163 additions and 33 deletions
|
|
@ -73,6 +73,26 @@ FT_WORD * ft_linearize(TREE *wtree)
|
|||
DBUG_RETURN(wlist);
|
||||
}
|
||||
|
||||
my_bool ft_boolean_check_syntax_string(const byte *str)
|
||||
{
|
||||
uint i, j;
|
||||
|
||||
if (!str ||
|
||||
(strlen(str)+1 != sizeof(ft_boolean_syntax)) ||
|
||||
(str[0] != ' ' && str[1] != ' '))
|
||||
return 1;
|
||||
for (i=0; i<sizeof(ft_boolean_syntax); i++)
|
||||
{
|
||||
/* limiting to 7-bit ascii only */
|
||||
if ((unsigned char)(str[i]) > 127 || my_isalnum(default_charset_info, str[i]))
|
||||
return 1;
|
||||
for (j=0; j<i; j++)
|
||||
if (str[i] == str[j] && (i != 11 || j != 10))
|
||||
return 1;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* returns:
|
||||
* 0 - eof
|
||||
* 1 - word found
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue