summaryrefslogtreecommitdiff
path: root/myisam/ft_parser.c
diff options
context:
space:
mode:
authorunknown <serg@serg.mysql.com>2002-10-18 14:53:46 +0000
committerunknown <serg@serg.mysql.com>2002-10-18 14:53:46 +0000
commit5ab1dbf5679c74814dd8ba61e9b946e4af920f1e (patch)
treed7b0288c090522f988411ef11d574f27b9b249b4 /myisam/ft_parser.c
parent320d4912f4e6318d7ac080692ed780b6f1557e54 (diff)
downloadmariadb-git-5ab1dbf5679c74814dd8ba61e9b946e4af920f1e.tar.gz
some DBUG_ENTER/RETURN macro added
safer GWS_PROB, avoid log(0) myisam/ft_nlq_search.c: some DBUG_ENTER/RETURN macro added myisam/ft_parser.c: some DBUG_ENTER/RETURN macro added myisam/ftdefs.h: safer GWS_PROB, avoid log(0). sql/item_func.cc: some DBUG_ENTER/RETURN macro added
Diffstat (limited to 'myisam/ft_parser.c')
-rw-r--r--myisam/ft_parser.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/myisam/ft_parser.c b/myisam/ft_parser.c
index 283216762e1..c25ed6022a0 100644
--- a/myisam/ft_parser.c
+++ b/myisam/ft_parser.c
@@ -186,6 +186,7 @@ byte ft_simple_get_word(byte **start, byte *end, FT_WORD *word)
{
byte *doc=*start;
int mwc;
+ DBUG_ENTER("ft_simple_get_word");
while (doc<end)
{
@@ -207,32 +208,35 @@ byte ft_simple_get_word(byte **start, byte *end, FT_WORD *word)
!is_stopword(word->pos, word->len))
{
*start=doc;
- return 1;
+ DBUG_RETURN(1);
}
}
- return 0;
+ DBUG_RETURN(0);
}
void ft_parse_init(TREE *wtree, CHARSET_INFO *cs)
{
+ DBUG_ENTER("ft_parse_init");
if (!is_tree_inited(wtree))
init_tree(wtree,0,0,sizeof(FT_WORD),(qsort_cmp2)&FT_WORD_cmp,0,NULL, cs);
+ DBUG_VOID_RETURN;
}
int ft_parse(TREE *wtree, byte *doc, int doclen)
{
byte *end=doc+doclen;
FT_WORD w;
+ DBUG_ENTER("ft_parse");
while (ft_simple_get_word(&doc,end,&w))
{
if (!tree_insert(wtree, &w, 0))
goto err;
}
- return 0;
+ DBUG_RETURN(0);
err:
delete_tree(wtree);
- return 1;
+ DBUG_RETURN(1);
}