summaryrefslogtreecommitdiff
path: root/sql/opt_range.cc
diff options
context:
space:
mode:
authorSergei Golubchik <serg@mariadb.org>2017-02-04 19:17:42 +0100
committerSergei Golubchik <serg@mariadb.org>2017-02-13 18:12:05 +0100
commitcff144a8ea47be2db8aace52cc282f4d2e0d7aaa (patch)
tree44be7925a4d4cd5703e8ba36c95976e7610ab60c /sql/opt_range.cc
parentdafb507e3ed09699230e3dd52fdc68c6094ee148 (diff)
downloadmariadb-git-cff144a8ea47be2db8aace52cc282f4d2e0d7aaa.tar.gz
cleanup: handler::key_read
* rename to "keyread" (to avoid conflicts with tokudb), * change from bool to uint and store the keyread index number there * provide a bool accessor to check if keyread is enabled
Diffstat (limited to 'sql/opt_range.cc')
-rw-r--r--sql/opt_range.cc6
1 files changed, 3 insertions, 3 deletions
diff --git a/sql/opt_range.cc b/sql/opt_range.cc
index f013f6ae254..61fe64c3930 100644
--- a/sql/opt_range.cc
+++ b/sql/opt_range.cc
@@ -10617,7 +10617,7 @@ QUICK_RANGE_SELECT *get_quick_select_for_ref(THD *thd, TABLE *table,
/* Call multi_range_read_info() to get the MRR flags and buffer size */
quick->mrr_flags= HA_MRR_NO_ASSOCIATION |
- (table->file->key_read ? HA_MRR_INDEX_ONLY : 0);
+ (table->file->keyread_enabled() ? HA_MRR_INDEX_ONLY : 0);
if (thd->lex->sql_command != SQLCOM_SELECT)
quick->mrr_flags |= HA_MRR_USE_DEFAULT_IMPL;
@@ -10670,7 +10670,7 @@ int read_keys_and_merge_scans(THD *thd,
DBUG_ENTER("read_keys_and_merge");
/* We're going to just read rowids. */
- head->file->ha_start_keyread();
+ head->file->ha_start_keyread(head->s->primary_key);
head->prepare_for_position();
cur_quick_it.rewind();
@@ -13649,7 +13649,7 @@ int QUICK_GROUP_MIN_MAX_SELECT::reset(void)
DBUG_ENTER("QUICK_GROUP_MIN_MAX_SELECT::reset");
seen_first_key= FALSE;
- head->file->ha_start_keyread(); /* We need only the key attributes */
+ head->file->ha_start_keyread(index); /* We need only the key attributes */
if ((result= file->ha_index_init(index,1)))
{