← Back to team overview

maria-developers team mailing list archive

Re: [Commits] 8b30c0f: MDEV-7949: Item_field::used_tables() takes 0.29% in OLTP RO

 

Hi Sanja,

There're 3 bug fixes and 4 revisions concerning these lines:
https://bugs.mysql.com/bug.php?id=16716
git: 1991a87d831bb48b31989c622e35acda11df7fef
git: ca22a81b1c84ce81e1e9ea2c3ace7be1848027d8 (source for all used_tables())

https://bugs.mysql.com/bug.php?id=36488
git: 66367aeea83a0cd7f583a0194651a235b63975a9

https://bugs.mysql.com/bug.php?id=46815
git: 10406ae65871de074e807e626f9ede686e9321d4

If we don't have these bugs, why not to revert all the code introduced by these
patches?

Or we're not affected by the need to use used_tables() as an indication of
prepared statement? If so, why?

Thanks,
Sergey

On Sun, May 17, 2015 at 03:10:48PM +0200, sanja@xxxxxxxxxxx wrote:
> revision-id: 8b30c0f26c7b35fc73429f85aa35eb3614d60bd8
> parent(s): b2db8e85422a455a10cd28ef7e44977182528f70
> committer: Oleksandr Byelkin
> branch nick: server
> timestamp: 2015-05-17 15:10:45 +0200
> message:
> 
> MDEV-7949: Item_field::used_tables() takes 0.29% in OLTP RO
> 
> Part 2: removed hack workaround for bug we do not have.
> 
> ---
>  sql/item_strfunc.cc | 7 +++----
>  1 file changed, 3 insertions(+), 4 deletions(-)
> 
> diff --git a/sql/item_strfunc.cc b/sql/item_strfunc.cc
> index 4bf8dd5..7b9169e 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
>      {
> @@ -975,7 +974,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;
>      }
>  
> _______________________________________________
> commits mailing list
> commits@xxxxxxxxxxx
> https://lists.askmonty.org/cgi-bin/mailman/listinfo/commits