← Back to team overview

maria-developers team mailing list archive

Re: 3323b013c13: Removed redundant SE lock for tmp tables

 

Hi, Sergey!

On Mar 13, Sergey Vojtovich wrote:
> revision-id: 3323b013c13 (mariadb-10.4.1-134-g3323b013c13)
> parent(s): 4b3656a44d6
> author: Sergey Vojtovich <svoj@xxxxxxxxxxx>
> committer: Sergey Vojtovich <svoj@xxxxxxxxxxx>
> timestamp: 2019-02-06 13:56:28 +0400
> message:
> 
> Removed redundant SE lock for tmp tables
> 
> CREATE TEMPORARY TABLE locks SE plugin 6 times. 5 of these locks are
> released by the end of the statement. And only 1 acquired by
> init_from_binary_frm_image() / plugin_lock() remains.
> 
> The lock removed in this patch was clearly redundant.
> 
> Part of MDEV-17805 - Remove InnoDB cache for temporary tables.
> 
> diff --git a/sql/temporary_tables.cc b/sql/temporary_tables.cc
> index 917a85e6c3b..438b670b5f5 100644
> --- a/sql/temporary_tables.cc
> +++ b/sql/temporary_tables.cc
> @@ -951,8 +947,6 @@ TMP_TABLE_SHARE *THD::create_temporary_table(handlerton *hton,
>    init_tmp_table_share(this, share, saved_key_cache, key_length,
>                         strend(saved_key_cache) + 1, tmp_path);
>  
> -  share->db_plugin= ha_lock_engine(this, hton);
> -

I suppose, share->db_plugin will be set in the following
share->init_from_binary_frm_image ?

Ok to push.

Regards,
Sergei
Chief Architect MariaDB
and security@xxxxxxxxxxx