On Fri, Feb 13, 2004 at 05:38:59PM -0800, Dean Arnold wrote: > > > > Here's what I've added to DBI 1.41: > > > > =item C<Executed> (boolean) > > > > The C<Executed> attribute is true if the handle object has been "executed". > > Currently only the $dbh do() method and the $sth execute(), execute_array(), > > and execute_for_fetch() methods set the C<Executed> attribute. > > > > When it's set on a handle it is also set on the parent handle at the > > same time. So calling execute() on a $sth also sets the C<Executed> > > attribute on the parent $dbh. > > > > The C<Executed> attribute for a $dbh is cleared by the commit() and > > rollback() methods. The C<Executed> attribute of a statement handle > > is not cleared by the DBI under any circumstances and so acts as a > > permenant record of whether the statement handle was ever used. > > > > =cut > > > > The "Issuing rollback()" is suppressed if Executed is false > > (as it would be after a commit). > > > > Anyone who wants more is welcome to send a patch :) > > > > Tim. > > 1. Is this instantiated by the DBD or the DBI ?
The DBI > 2. If set by the DBI, can I assume that it would only > be set to true when Autocommit is turned off ? The Executed attribute is independant of AutoCommit. But the "Issuing rollback()" warning is now only generated if AutoCommit is turned off and Executed is true. Tim.
