summaryrefslogtreecommitdiff
path: root/myisam/ft_parser.c
diff options
context:
space:
mode:
authorunknown <serg@serg.mysql.com>2002-10-25 22:07:04 +0000
committerunknown <serg@serg.mysql.com>2002-10-25 22:07:04 +0000
commit7962de4cf303e71600f7ff2beebcb5900ef41f71 (patch)
treea265b1027bdd9f187cbc41ed6c5c709d6793109e /myisam/ft_parser.c
parentd51b72cac30e5d02fde6e9c98c3e91716b19ed04 (diff)
parentf5563ddad40e8ab84d457b0e9960ddfdc7faec99 (diff)
downloadmariadb-git-7962de4cf303e71600f7ff2beebcb5900ef41f71.tar.gz
merged
BitKeeper/etc/gone: auto-union BitKeeper/etc/logging_ok: auto-union BitKeeper/deleted/.del-skipkeys~888e38cf95239a33: 'Auto converge rename' Docs/manual.texi: Auto merged libmysqld/lib_sql.cc: Auto merged myisam/ft_boolean_search.c: Auto merged myisam/ft_nlq_search.c: Auto merged myisam/ft_parser.c: Auto merged myisam/ftdefs.h: Auto merged myisam/mi_create.c: Auto merged mysys/my_init.c: Auto merged sql/log.cc: Auto merged sql/log_event.h: Auto merged sql/sql_base.cc: Auto merged sql/sql_table.cc: Auto merged sql/sql_update.cc: Auto merged
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 583518089ba..29a48352cd6 100644
--- a/myisam/ft_parser.c
+++ b/myisam/ft_parser.c
@@ -190,6 +190,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)
{
@@ -211,32 +212,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, wtree->custom_arg))
goto err;
}
- return 0;
+ DBUG_RETURN(0);
err:
delete_tree(wtree);
- return 1;
+ DBUG_RETURN(1);
}