summaryrefslogtreecommitdiff
path: root/heap/hp_rfirst.c
diff options
context:
space:
mode:
authorSinisa@sinisa.nasamreza.org <>2002-03-07 14:19:18 +0200
committerSinisa@sinisa.nasamreza.org <>2002-03-07 14:19:18 +0200
commitc276cc060a5e0ba9fe791408100498ce7b2b3166 (patch)
treeb95808d4593128f0cfab6b9badc9018bad8a2975 /heap/hp_rfirst.c
parent4d8d7f206166b107f6e79d24be6c9a3cfbf3d464 (diff)
downloadmariadb-git-c276cc060a5e0ba9fe791408100498ce7b2b3166.tar.gz
Same patches as for 4.0. See there for details
Diffstat (limited to 'heap/hp_rfirst.c')
-rw-r--r--heap/hp_rfirst.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/heap/hp_rfirst.c b/heap/hp_rfirst.c
index 9a1f09244a0..b20918ff3a7 100644
--- a/heap/hp_rfirst.c
+++ b/heap/hp_rfirst.c
@@ -21,6 +21,11 @@
int heap_rfirst(HP_INFO *info, byte *record)
{
DBUG_ENTER("heap_rfirst");
+ if (!(info->s->records))
+ {
+ my_errno=HA_ERR_END_OF_FILE;
+ DBUG_RETURN(my_errno);
+ }
info->current_record=0;
info->current_hash_ptr=0;
info->update=HA_STATE_PREV_FOUND;