Subject: | ENOMEM when binding references as DBI params |
DBD::SQLite 0.12 doesn't gracefully handle references passed as bound parameters:
#!/usr/bin/perl
use DBI;
my $ref = "foo";
my $dbh = DBI->connect("dbi:SQLite:dbname=/tmp/crashme.gdbm") || die;
$dbh->do('create table foo ( bar varchar(2) )');
my $sth = $dbh->prepare('insert into foo (bar) values (?)');
$sth->execute(\$ref) or die $dbh->errstr;
Yields:
% perl /tmp/oom.pl
Out of memory!
It would be useful to abort the statement and give some sort of explanatory error -- DBD::Pg (the only other DBD module I checked) does this.