Hi, Dmitry!
On Feb 25, Dmitry Lenev wrote:
> #At file:///home/dlenev/src/bzr/mysql-6.0-bg39674/
>
> 2728 Dmitry Lenev 2009-02-25
> Fix for bug #39674 "On shutdown mdl_destroy() called before
> plugin_shutdown()".
>
> === modified file 'sql/sql_base.cc'
> --- a/sql/sql_base.cc 2009-02-05 12:49:39 +0000
> +++ b/sql/sql_base.cc 2009-02-25 11:37:09 +0000
> @@ -633,7 +657,8 @@ void release_table_share(TABLE_SHARE *sh
>
> if (!--share->ref_count)
> {
> - if (share->version != refresh_version)
> + if (share->version != refresh_version ||
> + table_def_shutdown_in_progress)
> to_be_deleted=1;
> else
> {
> @@ -1493,7 +1518,8 @@ bool close_thread_table(THD *thd, TABLE
>
> table->mdl_lock_data= 0;
> if (table->needs_reopen() ||
> - thd->version != refresh_version || !table->db_stat)
> + thd->version != refresh_version || !table->db_stat ||
> + table_def_shutdown_in_progress)
> {
> free_cache_entry(table);
> found_old_table=1;
I wonder whether you could ensure that "thd->version != refresh_version"
is always true during the shutdown instead of adding another check to
the condition.
Although I couldn't find a way to achieve that :)
I'd prefer to have table_def_shutdown_in_progress marked unlikely:
unlikely(table_def_shutdown_in_progress)
but anyway,
ok to push
Regards / Mit vielen Grüßen,
Sergei
--
__ ___ ___ ____ __
/ |/ /_ __/ __/ __ \/ / Sergei Golubchik <serg@stripped>
/ /|_/ / // /\ \/ /_/ / /__ Principal Software Engineer/Server Architect
/_/ /_/\_, /___/\___\_\___/ Sun Microsystems GmbH, HRB München 161028
<___/ Sonnenallee 1, 85551 Kirchheim-Heimstetten
Geschäftsführer: Thomas Schroeder, Wolfgang Engels, Dr. Roland Boemer
Vorsitzender des Aufsichtsrates: Martin Häring