diff options
author | Oleksandr Byelkin <sanja@mariadb.com> | 2015-05-13 16:17:22 +0200 |
---|---|---|
committer | Oleksandr Byelkin <sanja@mariadb.com> | 2015-10-29 21:05:00 +0100 |
commit | fb4358f4324cfb9cec5c1f7c52ffa90839a2fe69 (patch) | |
tree | 73c42861788e6bd154aa0fda14f088c3c20f1ad5 /sql/opt_sum.cc | |
parent | 937aa7ad774e0d73a2e97d46bfdaba006ff7fe1d (diff) | |
download | mariadb-git-fb4358f4324cfb9cec5c1f7c52ffa90839a2fe69.tar.gz |
MDEV-7949: Item_field::used_tables() takes 0.29% in OLTP RO
small sixes of used_tables() usage
Diffstat (limited to 'sql/opt_sum.cc')
-rw-r--r-- | sql/opt_sum.cc | 7 |
1 files changed, 4 insertions, 3 deletions
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()); |