Author: timbo
Date: Mon Jun 8 03:07:26 2009
New Revision: 12816
Modified:
dbi/trunk/Changes
dbi/trunk/Driver.xst
Log:
Added ImplementorClass and Name info to the "Issuing rollback() due to
DESTROY without explicit disconnect" warning to identify the handle.
Modified: dbi/trunk/Changes
==============================================================================
--- dbi/trunk/Changes (original)
+++ dbi/trunk/Changes Mon Jun 8 03:07:26 2009
@@ -6,7 +6,7 @@
=cut
-=head2 Changes in DBI 1.609 (svn r12814) 8th June 2009
+=head2 Changes in DBI 1.609 (svn r12816) 8th June 2009
Fixes to DBD::File (H.Merijn Brand)
added f_schema attribute
@@ -14,6 +14,9 @@
workaround a bug in SQL::Statement (temporary fix) related
to the "You passed x parameters where y required" error
+ Added ImplementorClass and Name info to the "Issuing rollback() due to
+ DESTROY without explicit disconnect" warning to identify the handle.
+ Applies to compiled drivers when they are recompiled.
Added DBI->visit_handles($coderef) method.
Added $h->visit_child_handles($coderef) method.
Added docs for column_info()'s COLUMN_DEF value.
Modified: dbi/trunk/Driver.xst
==============================================================================
--- dbi/trunk/Driver.xst (original)
+++ dbi/trunk/Driver.xst Mon Jun 8 03:07:26 2009
@@ -366,16 +366,16 @@
This will be harmless if the application has issued a
commit,
XXX Could add an attribute flag to indicate that the driver
doesn't have this problem. Patches welcome.
- XXX or could just move the DBIc_is(imp_dbh,
DBIcf_Executed) test
- to cover the rollback as well. That just needs sanity
checking
- that DBIcf_Executed is set by any/all possible way to
execute a
- statement that might start a transaction.
*/
if (DBIc_WARN(imp_dbh)
&& DBIc_is(imp_dbh, DBIcf_Executed) /* has not just called
commit/rollback */
&& (!dirty || DBIc_DBISTATE(imp_dbh)->debug >= 3)
- )
- warn("Issuing rollback() for database handle being
DESTROY'd without explicit disconnect()");
+ ) {
+ warn("Issuing rollback() due to DESTROY without explicit
disconnect() of %s handle %s",
+ SvPV_nolen(*hv_fetch((HV*)SvRV(dbh),
"ImplementorClass", 16, 1)),
+ SvPV_nolen(*hv_fetch((HV*)SvRV(dbh), "Name", 4, 1))
+ );
+ }
dbd_db_rollback(dbh, imp_dbh); /* ROLLBACK! */
}
dbd_db_disconnect(dbh, imp_dbh);