List:Commits« Previous MessageNext Message »
From:Alexey Botchkov Date:November 13 2007 9:19am
Subject:Re: bk commit into 5.1 tree (holyfoot:1.2625) BUG#31868
View as plain text  
See the new patch for this bug.

----- Original Message ----- 
From: "Sergei Golubchik" <serg@stripped>
To: <holyfoot@stripped>
Cc: <commits@stripped>
Sent: Monday, November 12, 2007 10:01 PM
Subject: Re: bk commit into 5.1 tree (holyfoot:1.2625) BUG#31868


> Hi!
>
> On Nov 09, holyfoot@stripped wrote:
>> ChangeSet@stripped, 2007-11-09 11:47:51+04:00, holyfoot@stripped +2 -0
>>   Bug #31868 mysql_server_init crash when language path is not correctly 
>> set.
>>
>>   When mysql_server_init() interrupts on some error (wrong errmsg file
>>   for example) in the middle of it's execution, it doesn't call
>>   execute_ddl_log_recovery() so LOCK_gdl mutex isn't init-ed.
>>   In this case we shouldn't call release_ddl_log during cleanup
>>   as it uses that mutex inside.
>>
>>   libmysqld/lib_sql.cc@stripped, 2007-11-09 11:47:49+04:00, 
>> holyfoot@stripped +7 -1
>>     Bug #31868 mysql_server_init crash when language path is not 
>> correctly set.
>>
>>     do not release ddl log if it wasn't initialized
>>
>> diff -Nrup a/libmysqld/lib_sql.cc b/libmysqld/lib_sql.cc
>> --- a/libmysqld/lib_sql.cc 2007-10-10 05:12:09 +05:00
>> +++ b/libmysqld/lib_sql.cc 2007-11-09 11:47:49 +04:00
>> @@ -38,6 +38,7 @@ C_MODE_START
>>  #include <sql_common.h>
>>  #include "embedded_priv.h"
>>
>> +static int do_release_ddl_log= 0;
>>  static my_bool emb_read_query_result(MYSQL *mysql);
>>
>>
>> @@ -544,6 +545,7 @@ int init_embedded_server(int argc, char
>>    }
>>
>>    execute_ddl_log_recovery();
>> +  do_release_ddl_log= 1;
>>    return 0;
>>  }
>>
>> @@ -551,7 +553,11 @@ void end_embedded_server()
>>  {
>>    my_free((char*) copy_arguments_ptr, MYF(MY_ALLOW_ZERO_PTR));
>>    copy_arguments_ptr=0;
>> -  release_ddl_log();
>> +  if (do_release_ddl_log)
>> +  {
>> +    release_ddl_log();
>> +    do_release_ddl_log= 0;
>> +  }
>>    clean_up(0);
>>  }
>
> I'd rather have ddl log to take care of itself. That is,
> release_ddl_log() could check whether a mutex was initialized, e.g. by
> looking at fields in global_ddl_log (which would need static
> initialization). In this case it could also be moved to clean_up().
>
> Regards / Mit vielen Grüssen,
> Sergei
>
> -- 
>   __  ___     ___ ____  __
>  /  |/  /_ __/ __/ __ \/ /   Sergei Golubchik <serg@stripped>
> / /|_/ / // /\ \/ /_/ / /__  Principal Software Developer
> /_/  /_/\_, /___/\___\_\___/  MySQL GmbH, Dachauer Str. 37, D-80335 
> München
>       <___/                  Geschäftsführer: Kaj Arnö - HRB
> München 
> 162140
>
> -- 
> MySQL Code Commits Mailing List
> For list archives: http://lists.mysql.com/commits
> To unsubscribe:    http://lists.mysql.com/commits?unsub=1
> 

Thread
bk commit into 5.1 tree (holyfoot:1.2625) BUG#31868holyfoot9 Nov
  • Re: bk commit into 5.1 tree (holyfoot:1.2625) BUG#31868Sergei Golubchik12 Nov
  • Re: bk commit into 5.1 tree (holyfoot:1.2625) BUG#31868Alexey Botchkov13 Nov