From 29ed440d4457a3cc2ab8c22674eb5dc8f0ac0ce6 Mon Sep 17 00:00:00 2001 From: Sergei Golubchik Date: Sun, 22 Jan 2017 17:14:36 +0100 Subject: MDEV-11836 vcol.vcol_keys_myisam fails in buildbot and outside move TABLE::key_read into handler. Because in index merge and DS-MRR there can be many handlers per table, and some of them use key read while others don't. "keyread" is really per handler, not per TABLE property. --- sql/opt_sum.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'sql/opt_sum.cc') diff --git a/sql/opt_sum.cc b/sql/opt_sum.cc index ad3f5aed112..9d229f6aeef 100644 --- a/sql/opt_sum.cc +++ b/sql/opt_sum.cc @@ -406,7 +406,7 @@ int opt_sum_query(THD *thd, if (!error && reckey_in_range(is_max, &ref, item_field->field, conds, range_fl, prefix_len)) error= HA_ERR_KEY_NOT_FOUND; - table->set_keyread(false); + table->file->ha_end_keyread(); table->file->ha_index_end(); if (error) { @@ -968,7 +968,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->set_keyread(true); + table->file->ha_start_keyread(); DBUG_RETURN(TRUE); } } -- cgit v1.2.1