summaryrefslogtreecommitdiff
path: root/heap
diff options
context:
space:
mode:
authorSinisa@sinisa.nasamreza.org <>2002-03-06 14:39:16 +0200
committerSinisa@sinisa.nasamreza.org <>2002-03-06 14:39:16 +0200
commit5d83add47180a0b0603a233385add2c51e7b39ef (patch)
tree95419dbf4192c30905390c1d7874c512cebd3a96 /heap
parentea087c4fa12c735a756f10c75d559ecd5a9e2911 (diff)
downloadmariadb-git-5d83add47180a0b0603a233385add2c51e7b39ef.tar.gz
iA fix for small bug that returns wrong index instead of enf of file
Diffstat (limited to 'heap')
-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);