On Fri, 23 Jul 2004, Tim Bunce wrote: > Please try to isolate the problem further. A stack trace from the > core file would be a _big_ help. Try using > http://search.cpan.org/search%3fmodule=Devel::CoreStack > > Reproducing it without the DBI, if possible, would also help. >
The problem is even if select has only ASCII character:( ---------------------------------------- #!/bin/perl use encoding 'latin2'; use open ":std", IN => ":encoding(iso-8859-2)", OUT => ":encoding(iso-8859-2)"; require DBI; $SQL = DBI->connect("DBI:mysql:test"); my $sql = $SQL->prepare("select a"); $sql->execute; if ($DBI::errstr) { return 0; } --------------------------------------- $ DBI_TRACE=2 perl test.pl DBI 1.32-ithread dispatch trace level set to 2 -> DBI->connect(DBI:mysql:test, , ****) -> DBI->install_driver(mysql) for linux perl=5.008 pid=22073 ruid=0 euid=0 install_driver: DBD::mysql version 2.0419 loaded from /usr/lib/perl5/site_perl/5.8.0/i586-linux-thread-multi/DBD/mysql.pm <- install_driver= DBI::dr=HASH(0x82a4b48) -> default_user in DBD::_::dr for DBD::mysql::dr (DBI::dr=HASH(0x82a4b48)~0x8303da4 undef undef HASH(0x827be6c)) thr#815a058 <- default_user= ( undef undef ) [2 items] at DBI.pm line 510 -> connect for DBD::mysql::dr (DBI::dr=HASH(0x82a4b48)~0x8303da4 'test' undef **** HASH(0x827be6c)) thr#815a058 imp_dbh->connect: dsn = test, uid = , pwd = imp_dbh->MyLogin: dbname = test, uid = NULL, pwd = NULL,host = NULL, port = NULL imp_dbh->MyConnect: host = NULL, port = 0, uid = NULL, pwd = NULL imp_dbh->MyConnect: client_flags = 0 <- connect= DBI::db=HASH(0x8303d74) at DBI.pm line 513 -> STORE for DBD::mysql::db (DBI::db=HASH(0x8303d8c)~INNER 'PrintError' 1) thr#815a058 <- STORE= 1 at DBI.pm line 555 -> STORE for DBD::mysql::db (DBI::db=HASH(0x8303d8c)~INNER 'AutoCommit' 1) thr#815a058 <- STORE= 1 at DBI.pm line 555 <- connect= DBI::db=HASH(0x8303d74) -> prepare for DBD::mysql::db (DBI::db=HASH(0x8303d74)~0x8303d8c 'select a') thr#815a058 Setting mysql_use_result to 0 <- prepare= DBI::st=HASH(0x8303ec4) at test.pl line 11 -> execute for DBD::mysql::st (DBI::st=HASH(0x8303ec4)~0x8302420) thr#815a058 -> dbd_st_execute for 08303dc8 Segmentation fault (core dumped) $ perl -MDevel::CoreStack -e 'stack' Executing /usr/bin/gdb "/usr/bin/perl" "core" (bt)... GNU gdb 5.3 Copyright 2002 Free Software Foundation, Inc. GDB is free software, covered by the GNU General Public License, and you are welcome to change it and/or distribute copies of it under certain conditions. Type "show copying" to see the conditions. There is absolutely no warranty for GDB. Type "show warranty" for details. This GDB was configured as "i586-suse-linux"... Core was generated by `perl test.pl'. Program terminated with signal 11, Segmentation fault. Reading symbols from /lib/libnsl.so.1...done. Loaded symbols for /lib/libnsl.so.1 Reading symbols from /lib/libdl.so.2...done. Loaded symbols for /lib/libdl.so.2 Reading symbols from /lib/libm.so.6...done. Loaded symbols for /lib/libm.so.6 Reading symbols from /lib/libpthread.so.0...done. Loaded symbols for /lib/libpthread.so.0 Reading symbols from /lib/libc.so.6...done. Loaded symbols for /lib/libc.so.6 Reading symbols from /lib/libcrypt.so.1...done. Loaded symbols for /lib/libcrypt.so.1 Reading symbols from /lib/libutil.so.1...done. Loaded symbols for /lib/libutil.so.1 Reading symbols from /lib/ld-linux.so.2...done. Loaded symbols for /lib/ld-linux.so.2 Reading symbols from /usr/lib/perl5/5.8.0/i586-linux-thread-multi/auto/Encode/Encode.so...done. Loaded symbols for /usr/lib/perl5/5.8.0/i586-linux-thread-multi/auto/Encode/Encode.so Reading symbols from /usr/lib/perl5/5.8.0/i586-linux-thread-multi/auto/PerlIO/encoding/encoding.so...done. Loaded symbols for /usr/lib/perl5/5.8.0/i586-linux-thread-multi/auto/PerlIO/encoding/encoding.so Reading symbols from /usr/lib/perl5/5.8.0/i586-linux-thread-multi/auto/Encode/Byte/Byte.so...done. Loaded symbols for /usr/lib/perl5/5.8.0/i586-linux-thread-multi/auto/Encode/Byte/Byte.so Reading symbols from /usr/lib/perl5/site_perl/5.8.0/i586-linux-thread-multi/auto/DBI/DBI.so...done. Loaded symbols for /usr/lib/perl5/site_perl/5.8.0/i586-linux-thread-multi/auto/DBI/DBI.so Reading symbols from /usr/lib/perl5/site_perl/5.8.0/i586-linux-thread-multi/auto/DBD/mysql/mysql.so...done. Loaded symbols for /usr/lib/perl5/site_perl/5.8.0/i586-linux-thread-multi/auto/DBD/mysql/mysql.so Reading symbols from /usr/lib/mysql/libmysqlclient.so.10...done. Loaded symbols for /usr/lib/mysql/libmysqlclient.so.10 Reading symbols from /lib/libz.so.1...done. Loaded symbols for /lib/libz.so.1 Reading symbols from /lib/libnss_files.so.2...done. Loaded symbols for /lib/libnss_files.so.2 #0 0x08068b0e in Perl_gv_fetchmethod_autoload () (gdb) Hangup detected on fd 0 error detected on stdin -- Ondrej Koala Vacha