myisam/ft_* bugfix
This commit is contained in:
parent
9c1ecff8ec
commit
b2760c0a80
@ -96,7 +96,7 @@ int main(int argc,char *argv[])
|
|||||||
w=ft_get_relevance(result);
|
w=ft_get_relevance(result);
|
||||||
printf("%d %.*s %f\n",i,t,read_record+2,w);
|
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);
|
printf("ft_read_next %d failed with errno %3d\n",j,my_errno);
|
||||||
goto err;
|
goto err;
|
||||||
}
|
}
|
||||||
|
@ -210,7 +210,10 @@ int ft_read_next(FT_DOCLIST *handler, char *record)
|
|||||||
MI_INFO *info=handler->info;
|
MI_INFO *info=handler->info;
|
||||||
|
|
||||||
if (++handler->curdoc >= handler->ndocs)
|
if (++handler->curdoc >= handler->ndocs)
|
||||||
|
{
|
||||||
|
--handler->curdoc;
|
||||||
return HA_ERR_END_OF_FILE;
|
return HA_ERR_END_OF_FILE;
|
||||||
|
}
|
||||||
|
|
||||||
info->update&= (HA_STATE_CHANGED | HA_STATE_ROW_CHANGED);
|
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);
|
i,query[i],result->ndocs);
|
||||||
for(j=0;j<5;j++) { double w; int err;
|
for(j=0;j<5;j++) { double w; int err;
|
||||||
err=ft_read_next(result, read_record);
|
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");
|
printf("No more matches!\n");
|
||||||
break;
|
break;
|
||||||
} else if (err) {
|
} else if (err) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user