- Switch to a warning when find() is invoked with both a 'key'
argument and a NULL-containing condition to satisfy the named
constraint. Previously (starting with 0.08124) an exception was
- thrown.
+ thrown
+ - Switch to a warning when a commit is attempted with an out-of-sync
+ transaction_depth (someone issued a begin externally to DBIC).
+ Previously (starting with 0.08124) an exception was thrown
* Fixes
- Revert default selection to being lazy again (eagerness introduced
sub txn_commit {
my $self = shift;
- if ($self->{transaction_depth} == 1) {
+ if (! $self->_dbh) {
+ $self->throw_exception('cannot COMMIT on a disconnected handle');
+ }
+ elsif ($self->{transaction_depth} == 1) {
$self->debugobj->txn_commit()
if ($self->debug);
$self->_dbh_commit;
$self->svp_release
if $self->auto_savepoint;
}
+ elsif (! $self->_dbh->FETCH('AutoCommit') ) {
+
+ carp "Storage transaction_depth $self->{transaction_depth} does not match "
+ ."false AutoCommit of $self->{_dbh}, attempting COMMIT anyway";
+
+ $self->debugobj->txn_commit()
+ if ($self->debug);
+ $self->_dbh_commit;
+ $self->{transaction_depth} = 0
+ if $self->_dbh_autocommit;
+ }
else {
$self->throw_exception( 'Refusing to commit without a started transaction' );
}