myisam/ft_* bugfix

parent 9c1ecff8
......@@ -96,7 +96,7 @@ int main(int argc,char *argv[])
w=ft_get_relevance(result);
printf("%d %.*s %f\n",i,t,read_record+2,w);
}
if(err != HA_ERR_KEY_NOT_FOUND) {
if(err != HA_ERR_END_OF_FILE) {
printf("ft_read_next %d failed with errno %3d\n",j,my_errno);
goto err;
}
......
......@@ -210,7 +210,10 @@ int ft_read_next(FT_DOCLIST *handler, char *record)
MI_INFO *info=handler->info;
if (++handler->curdoc >= handler->ndocs)
{
--handler->curdoc;
return HA_ERR_END_OF_FILE;
}
info->update&= (HA_STATE_CHANGED | HA_STATE_ROW_CHANGED);
......
......@@ -147,7 +147,7 @@ static int run_test(const char *filename)
i,query[i],result->ndocs);
for(j=0;j<5;j++) { double w; int err;
err=ft_read_next(result, read_record);
if(err==HA_ERR_KEY_NOT_FOUND) {
if(err==HA_ERR_END_OF_FILE) {
printf("No more matches!\n");
break;
} else if (err) {
......
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