Hello!

I have a problem with perl and MySQL since my last cooker update though I'm 
not sure if it is really a cooker problem:

All my perl scripts that try to access data from a MySQL data base hang when 
they try to make their first request. So I wrote a small testscript:

#!/usr/bin/perl

use DBI;
use strict;

my $dbh = DBI->connect('DBI:mysql:SHOP', 'marco', 'xxxxx');

my $sth = $dbh->prepare('SELECT * FROM session');
$sth->execute();
while(my @data = $sth->fetchrow_array()){
        print "@data\n";
}
$dbh->disconnect();

and tried:
strace ./test_db_connect.pl

The last few lines of strace output are:
socket(PF_UNIX, SOCK_STREAM, 0)         = 3
fcntl64(3, F_GETFL)                     = 0x2 (flags O_RDWR)
connect(3, {sa_family=AF_UNIX, path="/var/lib/mysql/mysql.sock"}, 110) = 0
brk(0)                                  = 0x81a6000
brk(0x81a8000)                          = 0x81a8000
setsockopt(3, SOL_IP, IP_TOS, [8], 4)   = -1 EOPNOTSUPP (Operation not 
supported)
setsockopt(3, SOL_SOCKET, SO_KEEPALIVE, [1], 4) = 0
read(3, "\'\0\0\0", 4)                  = 4
read(3, "\n4.0.13\0\5\0\0\0*((/T8\\G\0, \10\2\0\0\0\0\0\0\0"..., 39) = 39
open("/usr/share/mysql/charsets/Index", O_RDONLY|O_LARGEFILE) = 4
fstat64(4, {st_mode=S_IFREG|0755, st_size=621, ...}) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 
0x40147000
read(4, "# sql/share/charsets/Index\n#\n# T"..., 4096) = 621
brk(0)                                  = 0x81a8000
brk(0x81a9000)                          = 0x81a9000
read(4, "", 4096)                       = 0
close(4)                                = 0
munmap(0x40147000, 4096)                = 0
write(3, "\27\0\0\1\215 \0\0\0root\0^ET]SBXW\0SHOP", 27) = 27
read(3, "\5\0\0\2", 4)                  = 4
read(3, "\0\0\0\2\0", 5)                = 5
fcntl64(3, F_SETFL, O_RDWR|O_NONBLOCK)  = 0
read(3, 0x81a5bc8, 8192)                = -1 EAGAIN (Resource temporarily 
unavailable)
fcntl64(3, F_SETFL, O_RDWR)             = 0
write(3, "\26\0\0\0\3SELECT * FROM session", 26) = 26
read(3, 

that's it. No more output. I could wait for an hour, but no more output. Seems 
that mysql didn't responed to the Select query.

I tried the original RPMs from MySQL but no difference. As far as I remember, 
I updated some perl packages AND MySQL (all MySQL packages now Version 
4.0.13-3mdk, perl-5.8.0-28mdk, perl-DBI-1.37-2mdk, perl-Mysql-1.22_19-7mdk, 
but same effect with MySQL-xxx-4.0.13-0 packages from MySQL).

Any hints? Did anyone else recognize such a problem?


Thanks!

Marco


Reply via email to