Subject: | bug in Net::MySQL and in dbi:mysqlPP |
Date: | Wed, 11 Jun 2008 15:53:08 +0200 |
To: | bug-DBD-mysqlPP [...] rt.cpan.org, bug-Net-MySQL [...] rt.cpan.org |
From: | Baptiste Marcel <baptiste.marcel [...] eservglobal.com> |
Greetings
I have to report a bug
When the table has an index, a search with a where clause on that column
hangs.
I use:
Net-MySQL-0.09 <http://search.cpan.org/%7Eoyama/Net-MySQL-0.09/>
This is perl, v5.10.0 built for sun4-solaris-thread-multi-64
Binary build 1002 [283697] provided by ActiveState
http://www.ActiveState.com
Built Jan 9 2008 23:49:05
uname -a
SunOS sebastopol 5.10 Generic_120011-14 sun4u sparc SUNW,Ultra-4
Here is a script that reproduces the bug:
#!/bin/perl
use strict ;
use warnings ;
use DBI;
use Net::MySQL;
use Config::INI;
use Config::INI::Reader ;
# this is to retrieve my PWD
my $pwdhash =
Config::INI::Reader->read_file('/export/home/chernaya/scripts/sevcat/.mysql_passwd');
my $strDbPasswd=$pwdhash->{'sevdb2'}->{passwd};
my $dbh = DBI->connect("dbi:mysqlPP:database=sevdb2;host=localhost",
"chernaya", "$strDbPasswd",
{'RaiseError' => 1});
$dbh->do("CREATE TABLE demo2 ( id INTEGER , value VARCHAR(20) , KEY
(id) )");
$dbh->do("INSERT INTO demo2 VALUES (?, ?)", undef, 1, "a");
$dbh->do("INSERT INTO demo2 VALUES (?, ?)", undef, 2, "b");
my $sth = $dbh->prepare("SELECT id, value FROM demo2 where id=1");
print "Ready for executed \n";
$sth->execute();
# hangs -> never returns ...
print "executed \n";
Note that the same without the where clause, or without the index is OK
Note that its buggy whatever the index, being primary or not.
Note that it also fails with DBI::mysqlPP
Best regards
--
Baptiste Marcel