From 0980b8744d41699406bc9fb7ca0a7e2366c69efb Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 6 Mar 2002 14:39:16 +0200 Subject: [PATCH] iA fix for small bug that returns wrong index instead of enf of file --- heap/hp_rnext.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/heap/hp_rnext.c b/heap/hp_rnext.c index 4e5cb7e37c2..7a6b6846169 100644 --- a/heap/hp_rnext.c +++ b/heap/hp_rnext.c @@ -23,6 +23,12 @@ int heap_rnext(HP_INFO *info, byte *record) byte *pos; HP_SHARE *share=info->s; DBUG_ENTER("heap_rnext"); + + if (!(info->s->records)) + { + my_errno=HA_ERR_END_OF_FILE; + DBUG_RETURN(my_errno); + } if (info->lastinx < 0) DBUG_RETURN(my_errno=HA_ERR_WRONG_INDEX);