>Description: Perl script segfaults when it tries to connect database if DSN string contains mysql_read_default_file=/path/to/my.cnf and /path/to/my.cnf contains section [client] with 'socket' parameter.
GDB stacktrace: #0 0x401c2810 in strcend () from /home/perl-5.6.1/cpan/build/DBD-mysql-2.1017/blib/arch/auto/DBD/mysql/mysql.so #1 0x401b914e in mysql_read_default_options () from /home/perl-5.6.1/cpan/build/DBD-mysql-2.1017/blib/arch/auto/DBD/mysql/mysql.so #2 0x401b99a8 in mysql_real_connect () from /home/perl-5.6.1/cpan/build/DBD-mysql-2.1017/blib/arch/auto/DBD/mysql/mysql.so #3 0x401b2a92 in mysql_dr_connect (sock=0x8131184, unixSocket=0x0, host=0x0, port=0x0, user=0x0, password=0x0, dbname=0x818b5d0 "test", imp_dbh=0x8131130) at dbdimp.c:713 #4 0x401b2e22 in _MyLogin (imp_dbh=0x8131130) at dbdimp.c:794 #5 0x401b2e9f in mysql_db_login (dbh=0x8132808, imp_dbh=0x8131130, dbname=0x8135210 "test;mysql_read_default_file=/home/ilya/my.cnf", user=0x8136b48 "", password=0x8134eb0 "") at dbdimp.c:830 #6 0x401b5a34 in XS_DBD__mysql__db__login (cv=0x817ed3c) at mysql.xsi:63 #7 0x808a11b in Perl_pp_entersub () #8 0x80b5dc0 in Perl_runops_standard () #9 0x8059aa9 in perl_call_sv () #10 0x401a02a6 in XS_DBI_dispatch () from /usr/lib/perl5/5.005/i386-linux/auto/DBI/DBI.so #11 0x808a11b in Perl_pp_entersub () #12 0x80b5dc0 in Perl_runops_standard () #13 0x80593c5 in perl_run () #14 0x805779d in main () #15 0x400a7a42 in __libc_start_main () from /lib/libc.so.6 >How-To-Repeat: Source code of Perl script: use DBI; $dbh = DBI->connect('dbi:mysql:test;mysql_read_default_file=/home/ilya/my.cnf'); Content of file /home/ilya/my.cnf: [client] socket = /any/path >Fix: N/A >Submitter-Id: <submitter ID> >Originator: Ilya Martynov >Organization: IPonWeb >MySQL support: none >Synopsis: Crash in mysql_read_default_options >Severity: serious >Priority: medium >Category: mysql >Class: sw-bug >Release: mysql-3.23.49a-max (Official MySQL Binary) >Server: ./mysqladmin Ver 8.23 Distrib 3.23.49a, for pc-linux-gnu on i686 Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB This software comes with ABSOLUTELY NO WARRANTY. This is free software, and you are welcome to modify and redistribute it under the GPL license Server version 3.23.49a-max Protocol version 10 Connection Localhost via UNIX socket UNIX socket /var/run/mysqld-3.23.49a/mysqld.sock Uptime: 2 hours 14 min 32 sec Threads: 3 Questions: 2350 Slow queries: 0 Opens: 179 Flush tables: 1 Open tables: 18 Queries per second avg: 0.291 >Environment: System: Linux ipondeb 2.2.17 #1 Sun Jun 25 09:24:41 EST 2000 i686 unknown Architecture: i686 Some paths: /usr/bin/perl /usr/bin/make /usr/bin/gcc /usr/bin/cc GCC: Reading specs from /usr/lib/gcc-lib/i386-linux/2.95.2/specs gcc version 2.95.2 20000220 (Debian GNU/Linux) Compilation info: CC='gcc' CFLAGS='-Wimplicit -Wreturn-type -Wid-clash-51 -Wswitch -Wtrigraphs -Wcomment -W -Wchar-subscripts -Wformat -Wimplicit-function-dec -Wimplicit-int -Wparentheses -Wsign-compare -Wwrite-strings -Wunused -mcpu=pentiumpro -O3 -fno-omit-frame-pointer' CXX='gcc' CXXFLAGS='-Wimplicit -Wreturn-type -Wid-clash-51 -Wswitch -Wtrigraphs -Wcomment -W -Wchar-subscripts -Wformat -Wimplicit-function-dec -Wimplicit-int -Wparentheses -Wsign-compare -Wwrite-strings -Woverloaded-virtual -Wextern-inline -Wsign-promo -Wreorder -Wctor-dtor-privacy -Wnon-virtual-dtor -felide-constructors -fno-exceptions -fno-rtti -mcpu=pentiumpro -O3 -fno-omit-frame-pointer' LDFLAGS='' LIBC: lrwxrwxrwx 1 root root 13 Mar 27 22:30 /lib/libc.so.6 -> libc-2.1.3.so -rwxr-xr-x 1 root root 888064 Jan 9 15:11 /lib/libc-2.1.3.so -rw-r--r-- 1 root root 2090000 Jan 9 15:11 /usr/lib/libc.a -rw-r--r-- 1 root root 178 Jan 9 15:11 /usr/lib/libc.so Configure command: ./configure --prefix=/usr/local/mysql --enable-assembler --with-extra-charsets=complex --enable-thread-safe-client --with-innodb --with-berkeley-db --enable-thread-safe-client --with-other-libc=/usr/local/mysql-glibc '--with-comment=Official MySQL Binary' --prefix=/usr/local/mysql --with-extra-charset=complex --enable-thread-safe-client --enable-local-infile --with-server-suffix=-max 'CFLAGS=-Wimplicit -Wreturn-type -Wid-clash-51 -Wswitch -Wtrigraphs -Wcomment -W -Wchar-subscripts -Wformat -Wimplicit-function-dec -Wimplicit-int -Wparentheses -Wsign-compare -Wwrite-strings -Wunused -mcpu=pentiumpro -O3 -fno-omit-frame-pointer' 'CXXFLAGS=-Wimplicit -Wreturn-type -Wid-clash-51 -Wswitch -Wtrigraphs -Wcomment -W -Wchar-subscripts -Wformat -Wimplicit-function-dec -Wimplicit-int -Wparentheses -Wsign-compare -Wwrite-strings -Woverloaded-virtual -Wextern-inline -Wsign-promo -Wreorder -Wctor-dtor-privacy -Wnon-virtual-dtor -felide-constructors -fno-exceptions -fno-rtti -mcpu=pentiumpro -O3 -fno-omit-frame-pointer' CXX=gcc Perl: This is perl, version 5.005_03 built for i386-linux --------------------------------------------------------------------- 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 <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php