MySQL Lists are EOL. Please join:

List:Commits« Previous MessageNext Message »
From:He Zhenxing Date:June 10 2009 9:31am
Subject:Re: bzr commit into mysql-6.0-bugteam branch (alfranio.correia:3346)
Bug#43533
View as plain text  
Hi Alfranio,

Nice work, approved!

Alfranio Correia wrote:
> #At
> file:///home/acorreia/workspace.sun/repository.mysql/bzrwork/bug-43533/mysql-6.0-bugteam/
> based on revid:gshchepa@stripped
> 
>  3346 Alfranio Correia	2009-06-09
>       BUG#43533 './mysqld -v -help' crashes
>       
>       "end_slave_start" was trying to destroy a mutex "LOCK_slave_start" which
>       was not intialized thus generating an error (i.e. abort()) in debug mode.
>       To fix this problem, we introduced a variable that indicates when the
>       mutex "LOCK_slave_start" was initialized by "init_slave_start" and can be
>       safely destroyed.
> 
>     modified:
>       sql/sql_repl.cc
> === modified file 'sql/sql_repl.cc'
> --- a/sql/sql_repl.cc	2009-05-25 10:10:18 +0000
> +++ b/sql/sql_repl.cc	2009-06-09 19:11:12 +0000
> @@ -30,6 +30,7 @@ my_bool opt_sporadic_binlog_dump_fail = 
>  static int binlog_dump_count = 0;
>  #endif
>  extern my_bool disable_slaves;
> +static bool slave_start_inited= FALSE;
>  
>  /*
>      fake_rotate_event() builds a fake (=which does not exist physically in any
> @@ -1015,6 +1016,7 @@ void init_slave_start()
>    reason_slave_blocked.length= 0;
>    reason_slave_blocked.str= (char *)"";
>    pthread_mutex_unlock(&LOCK_slave_start);
> +  slave_start_inited= TRUE;
>  }
>  
> 
> @@ -1024,7 +1026,11 @@ void init_slave_start()
>  
>  void end_slave_start()
>  {
> -  pthread_mutex_destroy(&LOCK_slave_start);
> +  if (slave_start_inited)
> +    /*
> +      Note that is safe to destroy an initialized mutex that is unlocked.
> +    */
> +    pthread_mutex_destroy(&LOCK_slave_start);
>  }
>  
> 
> 

Thread
bzr commit into mysql-6.0-bugteam branch (alfranio.correia:3346)Bug#43533Alfranio Correia9 Jun
  • Re: bzr commit into mysql-6.0-bugteam branch (alfranio.correia:3346)Bug#43533He Zhenxing10 Jun