Subject: | Incorrect return value and segfault with large number of bound parameters |
Date: | Fri, 28 Sep 2007 20:07:18 -0700 |
To: | bug-DBD-mysql [...] rt.cpan.org |
From: | Kolbe Kegel <kolbe [...] mysql.com> |
Hi,
Here is a testcase:
use DBI;
my $count = shift or die "Must provide a count";
my $dbh = DBI->connect(
'dbi:mysql:test:localhost:;mysql_socket=/home/kolbe/MySQL/inst/5.0.44sp1/mysql.sock',
'root', '', { RaiseError => 1, AutoCommit => 1, PrintError => 0});
my $query = 'SELECT 1 FROM dual WHERE "x" IN ('.join(',',('?') x
$count).')';
my @bind = ('dummy') x $count;
my $recs = $dbh->selectall_arrayref($query, {Slice=> {}}, @bind);
print $recs, "\n";
$ perl test.pl 5000
DBI::db=HASH(0x853520)
Segmentation fault
$ perl test.pl 4000
ARRAY(0x933240)
This is perl, v5.8.8 built for x86_64-linux-thread-multi
DBD::mysql 4.005
DBI 1.58
Please let me know if you need further information or have any questions
related to this report.
Regards,
--
Kolbe Kegel, Support Engineer
MySQL Inc, Seattle, USA, www.mysql.com