summaryrefslogtreecommitdiff
path: root/heap/hp_rnext.c
diff options
context:
space:
mode:
Diffstat (limited to 'heap/hp_rnext.c')
-rw-r--r--heap/hp_rnext.c6
1 files changed, 6 insertions, 0 deletions
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);