summaryrefslogtreecommitdiff
path: root/heap
diff options
context:
space:
mode:
authorunknown <Sinisa@sinisa.nasamreza.org>2002-03-06 14:39:16 +0200
committerunknown <Sinisa@sinisa.nasamreza.org>2002-03-06 14:39:16 +0200
commita59ae03dc6acd080604bd8248a819c582b5be1f3 (patch)
tree95419dbf4192c30905390c1d7874c512cebd3a96 /heap
parent1b16ce5b37ef51014130de15c3ea5878c96efb94 (diff)
downloadmariadb-git-a59ae03dc6acd080604bd8248a819c582b5be1f3.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);