Commit 7c1e2757 authored by unknown's avatar unknown

ft-update bug fixed


myisam/ft_parser.c:
  cleanup
myisam/ft_update.c:
  bug fixed
mysql-test/mysql-test-run.sh:
  typo fixed
parent cb6c87f3
......@@ -68,6 +68,7 @@ FT_WORD * ft_linearize(MI_INFO *info, uint keynr, byte *keybuf, TREE *wtree)
{
FT_WORD *wlist,*p;
FT_DOCSTAT docstat;
DBUG_ENTER("ft_linearize");
if ((wlist=(FT_WORD *) my_malloc(sizeof(FT_WORD)*
(1+wtree->elements_in_tree),MYF(0))))
......@@ -85,7 +86,7 @@ FT_WORD * ft_linearize(MI_INFO *info, uint keynr, byte *keybuf, TREE *wtree)
}
delete_tree(wtree);
if (!wlist)
return NULL;
DBUG_RETURN(NULL);
docstat.list->pos=NULL;
......@@ -109,14 +110,14 @@ FT_WORD * ft_linearize(MI_INFO *info, uint keynr, byte *keybuf, TREE *wtree)
p->weight/=NORM_IN_USE;
}
return wlist;
DBUG_RETURN(wlist);
}
#define true_word_char(X) (isalnum(X) || (X)=='_')
#ifdef HYPHEN_IS_DELIM
#define misc_word_char(X) ((X)=='\'')
#define misc_word_char(X) ((X)=='\'')
#else
#define misc_word_char(X) ((X)=='\'' || (X)=='-')
#define misc_word_char(X) ((X)=='\'' || (X)=='-')
#endif
#define word_char(X) (true_word_char(X) || misc_word_char(X))
......
......@@ -177,14 +177,7 @@ int _mi_ft_update(MI_INFO *info, uint keynr, byte *keybuf,
(uchar*) old_word->pos,old_word->len,
(uchar*) new_word->pos,new_word->len,0);
if (cmp==0)
{
double p=(old_word->weight-new_word->weight)/
(old_word->weight+new_word->weight);
if (p<1e-5)
cmp=0;
else
cmp=sgn(p);
}
cmp=sgn(old_word->weight-new_word->weight);
else
cmp=sgn(cmp);
......
......@@ -160,7 +160,7 @@ while test $# -gt 0; do
SLEEP_TIME=`$ECHO "$1" | $SED -e "s;--sleep=;;"`
;;
--mysqld=*)
TMP=`$ECHO "$1" | $SED -e "s;--mysqld-=;"`
TMP=`$ECHO "$1" | $SED -e "s;--mysqld=;;"`
EXTRA_MYSQL_TEST_OPT="$EXTRA_MYSQL_TEST_OPT $TMP"
EXTRA_SLAVE_MYSQLD_OPT="$EXTRA_SLAVE_MYSQLD_OPT $TMP"
;;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment