On Fri, Apr 06, 2007 at 09:07:56PM +0200, Christian Hammers wrote: > tags 417992 + upstream > stop > > Hi > > On 2007-04-06 Mohammed Sameer wrote: > > More details: > > in mysql_upgrade.c > > it seems that handle_options() is failing thus goto error; gets executed. > > > > in error: > > Line 645 it's trying to free the string using dynstr_free(). The problem > > is that the string has not been initialized yet using > > init_dynamic_string() in line 482 because handle_options() gets called > > before init_dynamic_string() > > > > We can either move init_dynamic_string() above handle_options() so > > dynstr_free() will free a string that has been initialized or adding > > cmdline.str = NULL; below DYNAMIC_STRING cmdline; > > > > Honestly, I don't know how will this affect the execution of mysql_upgrade > > but adding cmdline.str = NULL; indeed solved the problem for me. No more > > crashes. > > Could you open a bug report on bugs.mysql.com? If you got so far with > debugging it would be nice the patch incorporated into the upstream source. > > But first check if 5.0.38 which I uploaded yesterday to unstable still > crashes on your system and maybe give them a gdb backtrace of the crashing > version, too. > > Mail me the mysql bug number so I can add it to this bug report. >
I can confirm that it has been fixed upstream.
I also had a look at the source and found the fix:
/*
Must init_dynamic_string before handle_options because string is freed
at error label.
*/
if (init_dynamic_string(&cmdline, NULL, 2 * FN_REFLEN + 128, FN_REFLEN) ||
handle_options(&argc, &argv, my_long_options, get_one_option))
{
ret= 1;
goto error;
}
I guess we can close this one ?
Shouldn't it be backported to etch ?
Cheers,
--
GNU/Linux registered user #224950
Proud Egyptian GNU/Linux User Group <www.eglug.org> Member.
Life powered by Debian, Homepage: www.foolab.org
--
Don't send me any attachment in Micro$oft (.DOC, .PPT) format please
Read http://www.gnu.org/philosophy/no-word-attachments.html
Preferable attachments: .PDF, .HTML, .TXT
Thanx for adding this text to Your signature
signature.asc
Description: Digital signature

