summaryrefslogtreecommitdiff
path: root/sql/opt_sum.cc
diff options
context:
space:
mode:
authorAlexey Kopytov <Alexey.Kopytov@Sun.com>2010-02-22 00:33:11 +0300
committerAlexey Kopytov <Alexey.Kopytov@Sun.com>2010-02-22 00:33:11 +0300
commit8c31c4d16cfe9c3bbafcb30d0cd70210f6f230d3 (patch)
tree94830ebea81e944773f55fcb501055d762e3db1d /sql/opt_sum.cc
parentb3e01b6da86dca93764ea67673c8d34f63e94cd2 (diff)
parentae12a723605f5059d73ee9284fd78ecc7583fac2 (diff)
downloadmariadb-git-8c31c4d16cfe9c3bbafcb30d0cd70210f6f230d3.tar.gz
Manual merge of mysql-5.1-bugteam to mysql-trunk-merge.
Diffstat (limited to 'sql/opt_sum.cc')
-rw-r--r--sql/opt_sum.cc17
1 files changed, 3 insertions, 14 deletions
diff --git a/sql/opt_sum.cc b/sql/opt_sum.cc
index 13b10ac2e8f..1bd137836e8 100644
--- a/sql/opt_sum.cc
+++ b/sql/opt_sum.cc
@@ -326,11 +326,7 @@ int opt_sum_query(TABLE_LIST *tables, List<Item> &all_fields,COND *conds)
if (!error && reckey_in_range(0, &ref, item_field->field,
conds, range_fl, prefix_len))
error= HA_ERR_KEY_NOT_FOUND;
- if (table->key_read)
- {
- table->key_read= 0;
- table->file->extra(HA_EXTRA_NO_KEYREAD);
- }
+ table->set_keyread(FALSE);
table->file->ha_index_end();
if (error)
{
@@ -416,11 +412,7 @@ int opt_sum_query(TABLE_LIST *tables, List<Item> &all_fields,COND *conds)
if (!error && reckey_in_range(1, &ref, item_field->field,
conds, range_fl, prefix_len))
error= HA_ERR_KEY_NOT_FOUND;
- if (table->key_read)
- {
- table->key_read=0;
- table->file->extra(HA_EXTRA_NO_KEYREAD);
- }
+ table->set_keyread(FALSE);
table->file->ha_index_end();
if (error)
{
@@ -882,10 +874,7 @@ static bool find_key_for_maxmin(bool max_fl, TABLE_REF *ref,
converted (for example to upper case)
*/
if (field->part_of_key.is_set(idx))
- {
- table->key_read= 1;
- table->file->extra(HA_EXTRA_KEYREAD);
- }
+ table->set_keyread(TRUE);
return 1;
}
}