in reply to Re: Re: DBI error and $@
in thread DBI error and $@

Hmmm ... using mysql v3.23.36, Perl 5.6.0, and DBI v1.20:
# connect with RaiseError set to true eval { $dbh->do('UPDATE a SET x = y'); $dbh->commit(); }; if ($@) { warn "flurg!: $@"; warn "flurg!: ", $dbh->errstr(); }
yielded:
DBD::mysql::db do failed: Table 'mysql.a' doesn't exist at ./test_db_e +val.pl line 20. flurg!: DBD::mysql::db do failed: Table 'mysql.a' doesn't exist at ./t +est_db_eval.pl line 20. flurg!: Table 'mysql.a' doesn't exist at ./test_db_eval.pl line 25.

jeffa

L-LL-L--L-LL-L--L-LL-L--
-R--R-RR-R--R-RR-R--R-RR
F--F--F--F--F--F--F--F--
(the triplet paradiddle)

Replies are listed 'Best First'.
Re: (jeffa) Re: DBI error and $@
by runrig (Abbot) on Dec 06, 2001 at 23:39 UTC
    That first warning is due to not turning PrintError off when turning RaiseError on (which many, including me, often neglect to do).