From fb4358f4324cfb9cec5c1f7c52ffa90839a2fe69 Mon Sep 17 00:00:00 2001 From: Oleksandr Byelkin Date: Wed, 13 May 2015 16:17:22 +0200 Subject: MDEV-7949: Item_field::used_tables() takes 0.29% in OLTP RO small sixes of used_tables() usage --- sql/opt_sum.cc | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'sql/opt_sum.cc') diff --git a/sql/opt_sum.cc b/sql/opt_sum.cc index 7a6685914a9..e8cff9e69ab 100644 --- a/sql/opt_sum.cc +++ b/sql/opt_sum.cc @@ -654,12 +654,13 @@ static bool matching_cond(bool max_fl, TABLE_REF *ref, KEY *keyinfo, if (!cond) DBUG_RETURN(TRUE); Field *field= field_part->field; - if (cond->used_tables() & OUTER_REF_TABLE_BIT) + table_map cond_used_tables= cond->used_tables(); + if (cond_used_tables & OUTER_REF_TABLE_BIT) { DBUG_RETURN(FALSE); } - if (!(cond->used_tables() & field->table->map) && - MY_TEST(cond->used_tables() & ~PSEUDO_TABLE_BITS)) + if (!(cond_used_tables & field->table->map) && + MY_TEST(cond_used_tables & ~PSEUDO_TABLE_BITS)) { /* Condition doesn't restrict the used table */ DBUG_RETURN(!cond->const_item()); -- cgit v1.2.1