summaryrefslogtreecommitdiff
path: root/myisam
diff options
context:
space:
mode:
authorunknown <serg@serg.mylan>2004-02-16 18:53:00 +0100
committerunknown <serg@serg.mylan>2004-02-16 18:53:00 +0100
commit5a9ffa300aded1a8e5e3b00ed8334e5588653d6d (patch)
tree9f50a5286834ba27e3397680e3530b5bb72e2392 /myisam
parentcb6cd9affef3ea86d71a6f447d28fbaf520be098 (diff)
downloadmariadb-git-5a9ffa300aded1a8e5e3b00ed8334e5588653d6d.tar.gz
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
Diffstat (limited to 'myisam')
-rw-r--r--myisam/ft_parser.c20
-rw-r--r--myisam/ft_static.c2
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]={
{