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_range.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_range.cc')
-rw-r--r-- | sql/opt_range.cc | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/sql/opt_range.cc b/sql/opt_range.cc index 64d476c1327..860426c013a 100644 --- a/sql/opt_range.cc +++ b/sql/opt_range.cc @@ -7585,8 +7585,10 @@ Item_bool_func::get_mm_parts(RANGE_OPT_PARAM *param, Field *field, KEY_PART *key_part = param->key_parts; KEY_PART *end = param->key_parts_end; SEL_TREE *tree=0; + table_map value_used_tables= 0; if (value && - value->used_tables() & ~(param->prev_tables | param->read_tables)) + (value_used_tables= value->used_tables()) & + ~(param->prev_tables | param->read_tables)) DBUG_RETURN(0); for (; key_part != end ; key_part++) { @@ -7595,7 +7597,7 @@ Item_bool_func::get_mm_parts(RANGE_OPT_PARAM *param, Field *field, SEL_ARG *sel_arg=0; if (!tree && !(tree=new (param->thd->mem_root) SEL_TREE())) DBUG_RETURN(0); // OOM - if (!value || !(value->used_tables() & ~param->read_tables)) + if (!value || !(value_used_tables & ~param->read_tables)) { /* We need to restore the runtime mem_root of the thread in this |