diff options
Diffstat (limited to 'sql/records.cc')
-rw-r--r-- | sql/records.cc | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/sql/records.cc b/sql/records.cc index 14049449114..7c3bd1110bb 100644 --- a/sql/records.cc +++ b/sql/records.cc @@ -61,7 +61,7 @@ void init_read_record(READ_RECORD *info,THD *thd, TABLE *table, table->file->rnd_init(0); if (! (specialflag & SPECIAL_SAFE_MODE) && - thd->variables.record_rnd_cache_size && + thd->variables.read_rnd_buff_size && !table->file->fast_key_read() && (table->db_stat & HA_READ_ONLY || table->reginfo.lock_type <= TL_READ_NO_INSERT) && @@ -103,7 +103,8 @@ void init_read_record(READ_RECORD *info,THD *thd, TABLE *table, !(table->db_options_in_use & HA_OPTION_PACK_RECORD) || (use_record_cache < 0 && !(table->file->table_flags() & HA_NOT_DELETE_WITH_CACHE))) - VOID(table->file->extra(HA_EXTRA_CACHE)); // Cache reads + VOID(table->file->extra_opt(HA_EXTRA_CACHE, + thd->variables.read_buff_size)); } DBUG_VOID_RETURN; } /* init_read_record */ @@ -239,7 +240,7 @@ static int init_rr_cache(READ_RECORD *info) info->reclength=ALIGN_SIZE(info->struct_length); info->error_offset=info->table->reclength; - info->cache_records= thd->variables.record_rnd_cache_size / + info->cache_records= thd->variables.read_rnd_buff_size / (info->reclength+info->struct_length); rec_cache_size=info->cache_records*info->reclength; info->rec_cache_size=info->cache_records*info->ref_length; |