diff options
author | Oleksandr Byelkin <sanja@mariadb.com> | 2015-05-17 15:10:45 +0200 |
---|---|---|
committer | Oleksandr Byelkin <sanja@mariadb.com> | 2015-10-29 21:05:00 +0100 |
commit | 923827e2ccd8574b2741a55f3bef1a91ac48a074 (patch) | |
tree | 7c13d07ebe5e344010fe6c2da92d4ddeef7da324 | |
parent | fb4358f4324cfb9cec5c1f7c52ffa90839a2fe69 (diff) | |
download | mariadb-git-923827e2ccd8574b2741a55f3bef1a91ac48a074.tar.gz |
MDEV-7949: Item_field::used_tables() takes 0.29% in OLTP RO
Part 2: removed hack workaround for bug we do not have.
-rw-r--r-- | sql/item_strfunc.cc | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/sql/item_strfunc.cc b/sql/item_strfunc.cc index b61da4f679c..04ddbf2c0f9 100644 --- a/sql/item_strfunc.cc +++ b/sql/item_strfunc.cc @@ -626,8 +626,7 @@ String *Item_func_concat::val_str(String *str) if (!(res=args[0]->val_str(str))) goto null; use_as_buff= &tmp_value; - /* Item_subselect in --ps-protocol mode will state it as a non-const */ - is_const= args[0]->const_item() || !args[0]->used_tables(); + is_const= args[0]->const_item(); for (i=1 ; i < arg_count ; i++) { if (res->length() == 0) @@ -639,7 +638,7 @@ String *Item_func_concat::val_str(String *str) non-empty argument. Because of this we need is_const to be evaluated only for it. */ - is_const= args[i]->const_item() || !args[i]->used_tables(); + is_const= args[i]->const_item(); } else { @@ -986,7 +985,7 @@ String *Item_func_concat_ws::val_str(String *str) for (i=1; i < arg_count; i++) if ((res= args[i]->val_str(str))) { - is_const= args[i]->const_item() || !args[i]->used_tables(); + is_const= args[i]->const_item(); break; } |