summaryrefslogtreecommitdiff
path: root/sql/records.cc
diff options
context:
space:
mode:
authormonty@mysql.com <>2004-07-07 11:29:39 +0300
committermonty@mysql.com <>2004-07-07 11:29:39 +0300
commit1e311999950833cd81ca0788cd3656585c46d9ae (patch)
treeca8974710746bb69b04a49bc64f938d0b1a8420a /sql/records.cc
parent24a8dc2337a717ff340bac228383ef04437a4666 (diff)
parent8462b8aeb83355fa6c5cb4f45ea0ed63ba9e0712 (diff)
downloadmariadb-git-1e311999950833cd81ca0788cd3656585c46d9ae.tar.gz
Merge with 4.1.3-beta
Diffstat (limited to 'sql/records.cc')
-rw-r--r--sql/records.cc10
1 files changed, 6 insertions, 4 deletions
diff --git a/sql/records.cc b/sql/records.cc
index 264f7fe1241..37fbc7570ed 100644
--- a/sql/records.cc
+++ b/sql/records.cc
@@ -70,7 +70,8 @@ void init_read_record(READ_RECORD *info,THD *thd, TABLE *table,
info->io_cache=tempfile;
reinit_io_cache(info->io_cache,READ_CACHE,0L,0,0);
info->ref_pos=table->file->ref;
- table->file->rnd_init(0);
+ if (!table->file->inited)
+ table->file->ha_rnd_init(0);
/*
table->sort.addon_field is checked because if we use addon fields,
@@ -105,7 +106,7 @@ void init_read_record(READ_RECORD *info,THD *thd, TABLE *table,
else if (table->sort.record_pointers)
{
DBUG_PRINT("info",("using record_pointers"));
- table->file->rnd_init(0);
+ table->file->ha_rnd_init(0);
info->cache_pos=table->sort.record_pointers;
info->cache_end=info->cache_pos+
table->sort.found_records*info->ref_length;
@@ -116,7 +117,7 @@ void init_read_record(READ_RECORD *info,THD *thd, TABLE *table,
{
DBUG_PRINT("info",("using rr_sequential"));
info->read_record=rr_sequential;
- table->file->rnd_init();
+ table->file->ha_rnd_init(1);
/* We can use record cache if we don't update dynamic length tables */
if (!table->no_cache &&
(use_record_cache > 0 ||
@@ -142,7 +143,8 @@ void end_read_record(READ_RECORD *info)
{
filesort_free_buffers(info->table);
(void) info->file->extra(HA_EXTRA_NO_CACHE);
- (void) info->file->rnd_end();
+ if (info->read_record != rr_quick) // otherwise quick_range does it
+ (void) info->file->ha_index_or_rnd_end();
info->table=0;
}
}