summaryrefslogtreecommitdiff
path: root/myisammrg/myrg_rrnd.c
diff options
context:
space:
mode:
Diffstat (limited to 'myisammrg/myrg_rrnd.c')
-rw-r--r--myisammrg/myrg_rrnd.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/myisammrg/myrg_rrnd.c b/myisammrg/myrg_rrnd.c
index de731e58d5b..d623ea8ea9c 100644
--- a/myisammrg/myrg_rrnd.c
+++ b/myisammrg/myrg_rrnd.c
@@ -19,12 +19,12 @@
get by myrg_info(). The next record can be read with pos= -1 */
-#include "mymrgdef.h"
+#include "myrg_def.h"
static MYRG_TABLE *find_table(MYRG_TABLE *start,MYRG_TABLE *end,ulonglong pos);
/*
- If filepos == HA_OFFSET_ERROR, read next
+ If filepos == HA_OFFSET_ERROR, read next
Returns same as mi_rrnd:
0 = Ok.
HA_ERR_RECORD_DELETED = Record is deleted.
@@ -48,7 +48,7 @@ int myrg_rrnd(MYRG_INFO *info,byte *buf,ulonglong filepos)
}
isam_info=(info->current_table=info->open_tables)->table;
if (info->cache_in_use)
- mi_extra(isam_info,HA_EXTRA_CACHE);
+ mi_extra(isam_info,HA_EXTRA_CACHE,(byte*) &info->cache_size);
filepos=isam_info->s->pack.header_length;
isam_info->lastinx= (uint) -1; /* Can't forward or backward */
}
@@ -66,13 +66,15 @@ int myrg_rrnd(MYRG_INFO *info,byte *buf,ulonglong filepos)
HA_ERR_END_OF_FILE)
DBUG_RETURN(error);
if (info->cache_in_use)
- mi_extra(info->current_table->table,HA_EXTRA_NO_CACHE);
+ mi_extra(info->current_table->table, HA_EXTRA_NO_CACHE,
+ (byte*) &info->cache_size);
if (info->current_table+1 == info->end_table)
DBUG_RETURN(HA_ERR_END_OF_FILE);
info->current_table++;
info->last_used_table=info->current_table;
if (info->cache_in_use)
- mi_extra(info->current_table->table,HA_EXTRA_CACHE);
+ mi_extra(info->current_table->table, HA_EXTRA_CACHE,
+ (byte*) &info->cache_size);
info->current_table->file_offset=
info->current_table[-1].file_offset+
info->current_table[-1].table->state->data_file_length;