[Dbix-class] Refusing to commit without a started transaction
Nick Wellnhofer
wellnhofer at aevum.de
Mon Nov 29 15:59:17 GMT 2010
The following commit added a check to txn_commit that throws an
exception with the message "Refusing to commit without a started
transaction" if txn_commit is called and a transaction hasn't been started.
http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=dbsrgits/DBIx-Class.git;a=commitdiff;h=7d216b101775c472b012b257d848f50d78b193c8
This happens to break my code. I use AutoCommit => 0, connect to the
database and sometimes call txn_commit without any previous statements
sent to the DB. So with DBIx::Class 0.08124 an exception is thrown that
hasn't been thrown before. I'd expect txn_commit to simply do nothing.
I wonder what the rationale behind that change is. If it is intentional
how am I supposed to find out whether it's OK to call txn_commit? Simply
check transaction_depth? Is that part of the official API?
Nick
--
aevum gmbh
rumfordstr. 4
80469 münchen
germany
tel: +49 89 3838 0653
http://aevum.de/
More information about the DBIx-Class
mailing list