On Fri, Apr 06, 2007 at 03:52:07AM +0200, Christian Hammers wrote:
> tags 417992 + unreproducible
> stop
> 
> Hello
> 
> On 2007-04-06 Mohammed Sameer wrote:
> > tatooine:~# mysql_upgrade -P
> > mysql_upgrade: option '-P' requires an argument
> > Segmentation fault
> 
> (etch)[EMAIL PROTECTED]:/# mysql_upgrade -P
> mysql_upgrade: option '-P' requires an argument
> 
> Works here on amd64 and inside an i386 chroot with 5.0.32-7etch1.
> Please check if your libmysqlclient15 is at the same version!
> Can you try on different Debian systems, too?
> 
> bye,
> 
> -christian-

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.

Good night!

-- 
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

Attachment: signature.asc
Description: Digital signature

Reply via email to