mysql command line client segfaults in latest 4.1

mysql command line client segfaults in latest 4.1

am 05.02.2003 10:00:32 von Georg Richter

Hi,

when I start the mysql command line client with a db (mysql -uroot test) or
send a "USE db" command it segfaults in function str_dup_root
(strmake_root(root, str, strlen(str)) str is empty).

Georg

filter: how-to-repeat

------------------------------------------------------------ ---------
Before posting, please check:
http://www.mysql.com/manual.php (the manual)
http://lists.mysql.com/ (the list archive)

To request this thread, e-mail bugs-thread13693@lists.mysql.com
To unsubscribe, e-mail

Re: mysql command line client segfaults in latest 4.1

am 06.02.2003 13:29:31 von Sinisa Milivojevic

Georg Richter writes:
> Hi,
>
> when I start the mysql command line client with a db (mysql -uroot test) or
> send a "USE db" command it segfaults in function str_dup_root
> (strmake_root(root, str, strlen(str)) str is empty).
>
> Georg
>
> filter: how-to-repeat
>

Hi!

It segfaulted on me too ...

I fixed it yesterday.

This is a patch:

===== libmysql/libmysql.c 1.142 vs 1.143 =====
*** /tmp/libmysql.c-1.142-22199 Tue Feb 4 03:19:17 2003
--- 1.143/libmysql/libmysql.c Wed Feb 5 22:13:03 2003
***************
*** 1173,1179 ****
if (INTERNAL_NUM_FIELD(field))
field->flags|= NUM_FLAG;
if (default_value && row->data[6])
! field->def=strdup_root(alloc,(char*) row->data[8]);
else
field->def=0;
field->max_length= 0;
--- 1173,1179 ----
if (INTERNAL_NUM_FIELD(field))
field->flags|= NUM_FLAG;
if (default_value && row->data[6])
! field->def=strdup_root(alloc,(char*) row->data[6]);
else
field->def=0;
field->max_length= 0;


--
__ ___ ___ ____ __
/ |/ /_ __/ __/ __ \/ / Mr. Sinisa Milivojevic
/ /|_/ / // /\ \/ /_/ / /__ MySQL AB, Fulltime Developer
/_/ /_/\_, /___/\___\_\___/ Larnaca, Cyprus
<___/ www.mysql.com

Join MySQL Users Conference and Expo:
http://www.mysql.com/events/uc2003/


------------------------------------------------------------ ---------
Before posting, please check:
http://www.mysql.com/manual.php (the manual)
http://lists.mysql.com/ (the list archive)

To request this thread, e-mail bugs-thread13701@lists.mysql.com
To unsubscribe, e-mail