List:Commits« Previous MessageNext Message »
From:Dmitri Lenev Date:November 22 2007 9:46am
Subject:Re: bk commit into 5.0 tree (davi:1.2563) BUG#32528
View as plain text  
Hi Davi!

* Davi Arnaut <davi@stripped> [07/11/21 03:33]:
> ChangeSet@stripped, 2007-11-20 22:31:03-02:00, davi@stripped +3 -0
>   Bug#32528 Global read lock with a low priority write lock causes a server crash
>   
>   FLUSH TABLES WITH READ LOCK fails to properly detect write locked
>   tables when running under low priority updates.

...

> diff -Nrup a/sql/sql_parse.cc b/sql/sql_parse.cc
> --- a/sql/sql_parse.cc	2007-10-23 11:48:56 -02:00
> +++ b/sql/sql_parse.cc	2007-11-20 22:31:02 -02:00
> @@ -7054,7 +7054,7 @@ bool reload_acl_and_cache(THD *thd, ulon
>  
>          for (; lock_p < end_p; lock_p++)
>          {
> -          if ((*lock_p)->type == TL_WRITE)
> +          if ((*lock_p)->type >= TL_WRITE_LOW_PRIORITY)
>            {
>              my_error(ER_LOCK_OR_ACTIVE_TRANSACTION, MYF(0));
>              return 1;

May be it makes sense to use TL_WRITE_ALLOW_WRITE here to emphasize
that we should fail in case of any write lock? From practical POV it
should not matter as under LOCK TABLES we don't have 
TL_WRITE_ALLOW_WRITE/READ.

I think it is OK to push this patch after considering above point.

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

Are you MySQL certified?  http://www.mysql.com/certification
Thread
bk commit into 5.0 tree (davi:1.2563) BUG#32528Davi Arnaut21 Nov
  • Re: bk commit into 5.0 tree (davi:1.2563) BUG#32528Dmitri Lenev22 Nov