summaryrefslogtreecommitdiff
path: root/myisam/ft_parser.c
diff options
context:
space:
mode:
authorunknown <serg@serg.mysql.com>2001-11-06 16:17:31 +0100
committerunknown <serg@serg.mysql.com>2001-11-06 16:17:31 +0100
commit9e29bb4e012b9f27a6716d03bb67358cbab0459f (patch)
tree88269f9b0f218945be5522352a0d0c855ac2fcc1 /myisam/ft_parser.c
parent36a4cc178fc574dd9996c620eca609fe456d8c58 (diff)
downloadmariadb-git-9e29bb4e012b9f27a6716d03bb67358cbab0459f.tar.gz
ft boolean search by table scan; queue_fix()
include/queues.h: queue_fix() introduced myisam/ft_boolean_search.c: ft boolean search by table scan myisam/ft_parser.c: ft boolean search by table scan myisam/ft_update.c: ft boolean search by table scan myisam/ftdefs.h: ft boolean search by table scan mysql-test/r/fulltext_cache.result: ft boolean search by table scan mysql-test/t/fulltext_cache.test: ft boolean search by table scan mysys/queues.c: queue_fix() introduced
Diffstat (limited to 'myisam/ft_parser.c')
-rw-r--r--myisam/ft_parser.c34
1 files changed, 11 insertions, 23 deletions
diff --git a/myisam/ft_parser.c b/myisam/ft_parser.c
index 466f1dfe021..def49d17b74 100644
--- a/myisam/ft_parser.c
+++ b/myisam/ft_parser.c
@@ -33,17 +33,16 @@ typedef struct st_ft_docstat {
double max, nsum, nsum2;
#endif /* EVAL_RUN */
- MI_INFO *info;
- uint keynr;
- byte *keybuf;
+// MI_INFO *info;
+// uint keynr;
+// byte *keybuf;
} FT_DOCSTAT;
-static int FT_WORD_cmp(void* cmp_arg __attribute__((unused)),
- FT_WORD *w1, FT_WORD *w2)
+static int FT_WORD_cmp(void* cmp_arg, FT_WORD *w1, FT_WORD *w2)
{
return _mi_compare_text(default_charset_info,
(uchar*) w1->pos,w1->len,
- (uchar*) w2->pos, w2->len,0);
+ (uchar*) w2->pos, w2->len,(my_bool)cmp_arg);
}
static int walk_and_copy(FT_WORD *word,uint32 count,FT_DOCSTAT *docstat)
@@ -64,7 +63,9 @@ static int walk_and_copy(FT_WORD *word,uint32 count,FT_DOCSTAT *docstat)
/* transforms tree of words into the array, applying normalization */
-FT_WORD * ft_linearize(MI_INFO *info, uint keynr, byte *keybuf, TREE *wtree)
+FT_WORD * ft_linearize(//MI_INFO *info, uint keynr,
+ //byte *keybuf,
+ TREE *wtree)
{
FT_WORD *wlist,*p;
FT_DOCSTAT docstat;
@@ -73,9 +74,9 @@ FT_WORD * ft_linearize(MI_INFO *info, uint keynr, byte *keybuf, TREE *wtree)
if ((wlist=(FT_WORD *) my_malloc(sizeof(FT_WORD)*
(1+wtree->elements_in_tree),MYF(0))))
{
- docstat.info=info;
- docstat.keynr=keynr;
- docstat.keybuf=keybuf;
+// docstat.info=info;
+// docstat.keynr=keynr;
+// docstat.keybuf=keybuf;
docstat.list=wlist;
docstat.uniq=wtree->elements_in_tree;
#ifdef EVAL_RUN
@@ -207,19 +208,6 @@ byte ft_simple_get_word(byte **start, byte *end, FT_WORD *word)
return 0;
}
-int is_boolean(byte *q, uint len)
-{
- if (!len) return 0;
- if (*q == FTB_YES || *q == FTB_NO) return 1;
-
- for (++q; --len; ++q)
- {
- if ((*q == FTB_YES || *q == FTB_NO) && q[-1] == ' ' && true_word_char(q[1]))
- return 1;
- }
- return 0;
-}
-
TREE * ft_parse(TREE *wtree, byte *doc, int doclen)
{
byte *end=doc+doclen;