List:Commits« Previous MessageNext Message »
From:Luís Soares Date:October 22 2010 7:08am
Subject:Re: bzr commit into mysql-next-mr-bugfixing branch (zhenxing.he:3328)
Bug#47027
View as plain text  
Hi Zhenxing,

  I will approved the patch, but I still wonder what has caused
this. Perhaps, we will get more detailed information if it
happens again after this patch is in.

  See some suggestions inline.

On 10/21/2010 07:05 AM, He Zhenxing wrote:
> #At file:///media/sdb2/hezx/work/mysql/bzr/b47027/next-mr-bugfixing/ based on
> revid:anitha.gopi@stripped
> 
>  3328 He Zhenxing	2010-10-21
>       BUG#47027 delegates_init() failure is not user friendly (usability issue)
>       
>       Function delegetas_init() did not report proper error messages
>       when there is failures, which made it hard to know where the problem

"when there are failures" instead of "when there is failures"

>       occured.

typo: occured -> occurred.
>       
>       Fixed the problem by adding specific error message for every possible
>       place that can fail. And since these failures are supposed to never
>       happen, ask the user to report a bug if they happened.
> 
>     modified:
>       sql/mysqld.cc
>       sql/rpl_handler.cc
> === modified file 'sql/mysqld.cc'
> --- a/sql/mysqld.cc	2010-10-13 23:16:09 +0000
> +++ b/sql/mysqld.cc	2010-10-21 06:05:05 +0000
> @@ -3947,12 +3947,12 @@ static int init_server_components()
>      unireg_abort(1);
>    }
>  
> -  /* initialize delegates for extension observers */
> +  /*
> +    initialize delegates for extension observers, errors have already
> +    been reported in the function
> +  */
>    if (delegates_init())
> -  {
> -    sql_print_error("Initialize extension delegates failed");
>      unireg_abort(1);
> -  }
>  
>    /* need to configure logging before initializing storage engines */
>    if (opt_log_slave_updates && !opt_bin_log)
> 
> === modified file 'sql/rpl_handler.cc'
> --- a/sql/rpl_handler.cc	2010-07-16 21:00:50 +0000
> +++ b/sql/rpl_handler.cc	2010-10-21 06:05:05 +0000
> @@ -104,12 +104,20 @@ int delegates_init()
>    transaction_delegate= new (place_trans_mem) Trans_delegate;
>  
>    if (!transaction_delegate->is_inited())
> +  {
> +    sql_print_error("Initialize transaction delegates failed, "
> +                    "please report a bug.");
>      return 1;
> +  }

Suggestion:

"Initialization of transaction delegates failed. Please, report a bug."

>  
>    binlog_storage_delegate= new (place_storage_mem) Binlog_storage_delegate;
>  
>    if (!binlog_storage_delegate->is_inited())
> +  {
> +    sql_print_error("Initialize binlog storage delegates failed, "
> +                    "please report a bug.");
>      return 1;
> +  }

Suggestion:

"Initialization of binlog storage delegates failed. Please, report a bug."

>  #ifdef HAVE_REPLICATION
>    void *place_transmit_mem= transmit_mem.data;
> @@ -118,16 +126,29 @@ int delegates_init()
>    binlog_transmit_delegate= new (place_transmit_mem) Binlog_transmit_delegate;
>  
>    if (!binlog_transmit_delegate->is_inited())
> +  {
> +    sql_print_error("Initialize binlog transmit delegates failed, "
> +                    "please report a bug.");
>      return 1;
> +  }

Same.

>    binlog_relay_io_delegate= new (place_relay_io_mem) Binlog_relay_IO_delegate;
>  
>    if (!binlog_relay_io_delegate->is_inited())
> +  {
> +    sql_print_error("Initialize binlog relay IO delegates failed, "
> +                    "please report a bug.");
>      return 1;
> +  }

Same.

>  #endif
>  
>    if (pthread_key_create(&RPL_TRANS_BINLOG_INFO, NULL))
> +  {
> +    sql_print_error("Create pthread specific data key for replication failed, "
> +                    "please report a bug.");
>      return 1;
> +  }
> +

Suggestion:

"Error while creating pthread specific data key for replication. Please, report a bug."

>    return 0;
>  }
>  
> 
> 
> 
> 
> 

Regards,
Luís
Thread
bzr commit into mysql-next-mr-bugfixing branch (zhenxing.he:3328) Bug#47027He Zhenxing21 Oct
  • Re: bzr commit into mysql-next-mr-bugfixing branch (zhenxing.he:3328)Bug#47027Luís Soares22 Oct
    • Re: bzr commit into mysql-next-mr-bugfixing branch (zhenxing.he:3328)Bug#47027He Zhenxing25 Oct
      • Re: bzr commit into mysql-next-mr-bugfixing branch (zhenxing.he:3328)Bug#47027Luís Soares25 Oct