diff options
author | Alexander Nozdrin <alik@sun.com> | 2010-03-02 17:34:50 +0300 |
---|---|---|
committer | Alexander Nozdrin <alik@sun.com> | 2010-03-02 17:34:50 +0300 |
commit | d3755291caa9c93f7aca42c09db9aeb1df0ef84f (patch) | |
tree | b41651212156dfd684f8a54791bdf3b7cfc85c25 /sql/opt_range.cc | |
parent | b184d466acee921247541fd0a42eb62d23b07dec (diff) | |
parent | 64b91b2698603d24e8ffde46fc9421a6d2442a35 (diff) | |
download | mariadb-git-d3755291caa9c93f7aca42c09db9aeb1df0ef84f.tar.gz |
Manual merge from mysql-next-mr.
Conflicts:
- sql/sql_base.cc
Diffstat (limited to 'sql/opt_range.cc')
-rw-r--r-- | sql/opt_range.cc | 15 |
1 files changed, 4 insertions, 11 deletions
diff --git a/sql/opt_range.cc b/sql/opt_range.cc index 68285563239..5483ed237db 100644 --- a/sql/opt_range.cc +++ b/sql/opt_range.cc @@ -1198,11 +1198,7 @@ QUICK_RANGE_SELECT::~QUICK_RANGE_SELECT() if (file) { range_end(); - if (head->key_read) - { - head->key_read= 0; - file->extra(HA_EXTRA_NO_KEYREAD); - } + head->set_keyread(FALSE); if (free_file) { DBUG_PRINT("info", ("Freeing separate handler 0x%lx (free: %d)", (long) file, @@ -1404,10 +1400,7 @@ end: head->file= file; /* We don't have to set 'head->keyread' here as the 'file' is unique */ if (!head->no_keyread) - { - head->key_read= 1; head->mark_columns_used_by_index(index); - } head->prepare_for_position(); head->file= org_file; bitmap_copy(&column_bitmap, head->read_set); @@ -8344,7 +8337,7 @@ int QUICK_INDEX_MERGE_SELECT::read_keys_and_merge() DBUG_ENTER("QUICK_INDEX_MERGE_SELECT::read_keys_and_merge"); /* We're going to just read rowids. */ - file->extra(HA_EXTRA_KEYREAD); + head->set_keyread(TRUE); head->prepare_for_position(); cur_quick_it.rewind(); @@ -8420,7 +8413,7 @@ int QUICK_INDEX_MERGE_SELECT::read_keys_and_merge() delete unique; doing_pk_scan= FALSE; /* index_merge currently doesn't support "using index" at all */ - file->extra(HA_EXTRA_NO_KEYREAD); + head->set_keyread(FALSE); init_read_record(&read_record, thd, head, (SQL_SELECT*) 0, 1 , 1, TRUE); DBUG_RETURN(result); } @@ -10838,7 +10831,7 @@ int QUICK_GROUP_MIN_MAX_SELECT::reset(void) int result; DBUG_ENTER("QUICK_GROUP_MIN_MAX_SELECT::reset"); - file->extra(HA_EXTRA_KEYREAD); /* We need only the key attributes */ + head->set_keyread(TRUE); /* We need only the key attributes */ if ((result= file->ha_index_init(index,1))) DBUG_RETURN(result); if (quick_prefix_select && quick_prefix_select->reset()) |