Tested using Perl 5.13.4 and DBI 1.616 now - but I originally spotted the
problem in 2003 when the versions were a lot older...

Consider:

# Test that statement handles from disconnected connections fail!

use strict;
use warnings;
use DBI;

my $table = "dbd_tester";
my $dbh = DBI->connect('dbi:NullP:immaterial', '', '', {RaiseError=>1});
#connect_to_test_database({RaiseError => 1});
my $sth = $dbh->prepare(qq{INSERT INTO $table VALUES(?)});
$dbh->disconnect;
$sth->execute(1);
print "** Failed to FAIL!\n";


The print statement is executed, despite the fact that errors are supposed
to be raised.
I get the same result using DBD::Informix instead of NullP.

Is this a defect in DBI or in DBD::Informix (and NullP)?  Or is it WAD -
Working As Designed?

-- 
Jonathan Leffler <jonathan.leff...@gmail.com>  #include <disclaimer.h>
Guardian of DBD::Informix - v2008.0513 - http://dbi.perl.org
"Blessed are we who can laugh at ourselves, for we shall never cease to be
amused."

Reply via email to