[Dbix-class] ->storage->disconnect() Required After Using SQLite?

Brandon Black blblack at gmail.com
Wed Oct 4 01:45:40 CEST 2006


On 10/3/06, Steven Mackenzie <dbix at aptile.co.uk> wrote:
>
> Hello,
>
> DBD::SQLite::VERSION 1.12
> DBIx::Class::VERSION 0.07001
>
> 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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.rawmode.org/pipermail/dbix-class/attachments/20061003/74e8db3a/attachment.htm 


More information about the Dbix-class mailing list