diff options
author | serg@serg.mylan <> | 2004-02-17 17:07:14 +0100 |
---|---|---|
committer | serg@serg.mylan <> | 2004-02-17 17:07:14 +0100 |
commit | 6af8a9305213299f0150848c1686aaf49934ace7 (patch) | |
tree | 6ebf0969524ee8c2567a33c286ae057b66a556ae /myisam | |
parent | 0c68e806097842e96439824977349f5ee4ec74fa (diff) | |
parent | b8e161be4b6758ed89c46a639c08e1dc5debd9f0 (diff) | |
download | mariadb-git-6af8a9305213299f0150848c1686aaf49934ace7.tar.gz |
Merge bk-internal:/home/bk/mysql-4.1/
into serg.mylan:/usr/home/serg/Abk/mysql-4.1
Diffstat (limited to 'myisam')
-rw-r--r-- | myisam/ft_parser.c | 20 | ||||
-rw-r--r-- | myisam/ft_static.c | 2 |
2 files changed, 21 insertions, 1 deletions
diff --git a/myisam/ft_parser.c b/myisam/ft_parser.c index f68bf3f030c..250e92566b7 100644 --- a/myisam/ft_parser.c +++ b/myisam/ft_parser.c @@ -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 diff --git a/myisam/ft_static.c b/myisam/ft_static.c index 0dcea5bec0c..7168406d027 100644 --- a/myisam/ft_static.c +++ b/myisam/ft_static.c @@ -21,7 +21,7 @@ ulong ft_min_word_len=4; ulong ft_max_word_len=HA_FT_MAXCHARLEN; ulong ft_query_expansion_limit=5; -const char *ft_boolean_syntax="+ -><()~*:\"\"&|"; +char ft_boolean_syntax[]="+ -><()~*:\"\"&|"; const HA_KEYSEG ft_keysegs[FT_SEGS]={ { |