summaryrefslogtreecommitdiff
path: root/myisam/ft_parser.c
diff options
context:
space:
mode:
authorunknown <svoj@mysql.com>2005-03-07 00:17:57 +0400
committerunknown <svoj@mysql.com>2005-03-07 00:17:57 +0400
commitde8b610d924d5a197c1718b6c866eb4fa0c1319b (patch)
tree8a7b496f3c17b0671ae17d5ae6e67e2b3d2b54e6 /myisam/ft_parser.c
parentc4a60db4a8d73d25ea50a53dcec6da5bdf586849 (diff)
downloadmariadb-git-de8b610d924d5a197c1718b6c866eb4fa0c1319b.tar.gz
BUG#8351 post-review improvements.
myisam/ft_boolean_search.c: quot, qend not needed anymore, removed. phrase initialization moved to ft_init_boolean_search. comments added. _ftb_strstr renamed to _ftb_check_phrase. myisam/ft_parser.c: style improvements.
Diffstat (limited to 'myisam/ft_parser.c')
-rw-r--r--myisam/ft_parser.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/myisam/ft_parser.c b/myisam/ft_parser.c
index a3bd33944aa..3184cc6644c 100644
--- a/myisam/ft_parser.c
+++ b/myisam/ft_parser.c
@@ -93,13 +93,14 @@ my_bool ft_boolean_check_syntax_string(const byte *str)
return 0;
}
-/* returns:
- * 0 - eof
- * 1 - word found
- * 2 - left bracket
- * 3 - right bracket
- * 4 - stopword found
- */
+/*
+ RETURN VALUE
+ 0 - eof
+ 1 - word found
+ 2 - left bracket
+ 3 - right bracket
+ 4 - stopword found
+*/
byte ft_get_word(CHARSET_INFO *cs, byte **start, byte *end,
FT_WORD *word, FTB_PARAM *param)
{
@@ -162,7 +163,7 @@ byte ft_get_word(CHARSET_INFO *cs, byte **start, byte *end,
*start=doc;
return 1;
}
- else if (length)
+ else if (length) /* make sure length > 0 (if start contains spaces only) */
{
*start= doc;
return 4;
@@ -207,8 +208,7 @@ byte ft_simple_get_word(CHARSET_INFO *cs, byte **start, const byte *end,
*start= doc;
DBUG_RETURN(1);
}
- }
- while (doc < end);
+ } while (doc < end);
DBUG_RETURN(0);
}