Brandon Black wrote: > On 10/3/06, Steven Mackenzie <[EMAIL PROTECTED]> wrote: > >> I'm running a script to patch an error in my database. It loops over >> each bad row and fixes it, and works fine, except that it requires me to >> have >> $data->storage->disconnect(); >> at the end of it, otherwise I get this message: >> Issuing rollback() for database handle being DESTROY'd without explicit >> disconnect(). > > Try setting AutoCommit => 1 instead of 0, I think your code will work > correctly and it might get rid of that message. IIRC DBIC's transaction > support doesn't depend on the state of AutoCommit, and AutoCommit => 1 > will > generally give you more "expected" behavior. > > -- Brandon
Yes, AutoCommit=>1 lets my script work without the $data->storage->disconnect(), and the txn_begin/txn_commit work as intended, thanks. AutoCommit=>0 exits with a rollback whether or not I use the txn_* methods. Thanks! Steven _______________________________________________ List: http://lists.rawmode.org/cgi-bin/mailman/listinfo/dbix-class Wiki: http://dbix-class.shadowcatsystems.co.uk/ IRC: irc.perl.org#dbix-class SVN: http://dev.catalyst.perl.org/repos/bast/trunk/DBIx-Class/ Searchable Archive: http://www.mail-archive.com/[email protected]/
