Hey guys. This one has bitten me one too many times. Given this
table:
CREATE TABLE foo (
foo_id INT,
bar VARCHAR(255)
);
This prepare() and execute() produces a very helpful warning:
my $sth = $dbh->prepare("INSERT INTO foo VALUES (?,?)");
$sth->execute(1, "test 1", "too many");'
Specifically:
DBD::mysql::st execute failed: called with 3 bind variables when 2 are
needed
However, this do() call doesn't:
$dbh->do("INSERT INTO foo VALUES (?,?)", undef,
1, "test 1", "too many");
Do you agree this is a bug? Any ideas about where I should look first
to fix it (DBI or DBD::mysql, for example)?
Thanks,
-sam
PS: DBI v1.46, DBD::mysql v2.90004. My appologies if this is fixed
already in a later version.