summaryrefslogtreecommitdiff
path: root/myisam/ft_update.c
diff options
context:
space:
mode:
authorunknown <monty@donna.mysql.com>2000-09-29 00:58:16 +0300
committerunknown <monty@donna.mysql.com>2000-09-29 00:58:16 +0300
commitc33289a3a19431b833d7fe06cbfb7f57747cc9b6 (patch)
treeb7b27884a7a1c424b00084acf096abc9155bcb32 /myisam/ft_update.c
parent3a5ab655f175d86e9c7f4eab290933ffa622eeaf (diff)
downloadmariadb-git-c33289a3a19431b833d7fe06cbfb7f57747cc9b6.tar.gz
Fixed indention, removed compiler varnings and fixed a bug
in FULLTEXT indexes. Docs/manual.texi: Removed some @ifset nushere tags which crashed the manual when using emacs client/mysql-test.c: ***MISSING WEAVE*** heap/hp_test2.c: Removed compiler warnings isam/pack_isam.c: Removed compiler warnings isam/update.c: Removed compiler warnings myisam/ft_parser.c: cleanup myisam/ft_update.c: Fixed crash when inserting a blob which was NULL myisam/mi_check.c: -e continues checking of other keys on error myisam/mi_rkey.c: cleanup myisam/myisamchk.c: cleanup myisam/myisamlog.c: Added use of rnd to make things more predictable myisammrg/myrg_rkey.c: Removed compiler warnings mysys/mf_pack.c: cleanup mysys/my_fstream.c: cleanup sql/ha_berkeley.cc: cleanup sql/handler.cc: cleanup sql/item_func.cc: cleanup sql/item_func.h: cleanup sql/net_serv.cc: cleanup sql/slave.cc: cleanup sql/sql_class.cc: cleanup sql/sql_show.cc: cleanup
Diffstat (limited to 'myisam/ft_update.c')
-rw-r--r--myisam/ft_update.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/myisam/ft_update.c b/myisam/ft_update.c
index 1c16a77ab5b..7cfce1158fc 100644
--- a/myisam/ft_update.c
+++ b/myisam/ft_update.c
@@ -37,9 +37,8 @@ static FT_WORD * _mi_ft_parserecord(MI_INFO *info, uint keynr, byte *keybuf,
byte *pos;
uint i;
- i=info->s->keyinfo[keynr].keysegs-FT_SEGS;
keyseg=info->s->keyinfo[keynr].seg;
- while(i--)
+ for (i=info->s->keyinfo[keynr].keysegs-FT_SEGS ; i-- ; )
{
uint len;
@@ -61,10 +60,12 @@ static FT_WORD * _mi_ft_parserecord(MI_INFO *info, uint keynr, byte *keybuf,
}
else
len=keyseg->length;
-
- parsed=ft_parse(parsed, pos, len);
- if (parsed==NULL) return NULL;
+ if (!(parsed=ft_parse(parsed, pos, len)))
+ return NULL;
}
+ /* Handle the case where all columns are NULL */
+ if (!parsed && !(parsed=ft_parse(0, "", 0)))
+ return NULL;
return ft_linearize(info, keynr, keybuf, parsed);
}