List:Commits« Previous MessageNext Message »
From:Dmitry Lenev Date:June 1 2010 10:36am
Subject:Re: bzr commit into mysql-trunk-runtime branch (kostja:3035) Bug#51263
View as plain text  
Hello Kostja!

* Konstantin Osipov <kostja@stripped> [10/06/01 01:05]:
> #At file:///opt/local/work/trunk-runtime/ based on
> revid:kostja@stripped
> 
>  3035 Konstantin Osipov	2010-06-01
>       A follow up patch for the fix for Bug#51263 "Deadlock between
>       transactional SELECT and ALTER TABLE ...  REBUILD PARTITION".
>       
>       Make open flags part of Open_table_context.
>       This allows to simplify some code and (in future)
>       enforce some invariants.
>      @ sql/sql_base.cc
>         open_table() flags are part of Open_table_context.
>         Remove dead code that would check for OPEN_VIEW_NO_PARSE,
>         which is not an open table flag.
>      @ sql/sql_base.h
>         Move flags to Open_table_context. Reorder Open_table_context
>         members to compact the structure footprint.

...

> === modified file 'sql/sql_insert.cc'
> --- a/sql/sql_insert.cc	2010-05-14 05:28:51 +0000
> +++ b/sql/sql_insert.cc	2010-05-31 21:04:12 +0000
> @@ -3627,9 +3626,9 @@ static TABLE *create_table_from_items(TH
>        }
>        else
>        {
> -        Open_table_context ot_ctx_unused(thd, LONG_TIMEOUT);
> -        if (open_table(thd, create_table, thd->mem_root, &ot_ctx_unused,
> -                       MYSQL_OPEN_TEMPORARY_ONLY))
> +        Open_table_context ot_ctx(thd, (MYSQL_LOCK_IGNORE_TIMEOUT |
> +                                        MYSQL_OPEN_TEMPORARY_ONLY));
> +        if (open_table(thd, create_table, thd->mem_root, &ot_ctx))
>          {
>            /*
>              This shouldn't happen as creation of temporary table should make
> 

In the code above we open only temporary tables so ignoring timeouts
when waiting for MDL/TDC is not necessary. So may be it makes sense
not to use MYSQL_LOCK_IGNORE_TIMEOUT flag in this case.

Otherwise I think that it is OK to push your patch.

-- 
Dmitry Lenev, Software Developer
MySQL AB, www.mysql.com

Are you MySQL certified?  http://www.mysql.com/certification
Thread
bzr commit into mysql-trunk-runtime branch (kostja:3035) Bug#51263Konstantin Osipov31 May
  • Re: bzr commit into mysql-trunk-runtime branch (kostja:3035) Bug#51263Dmitry Lenev1 Jun