For PostgreSQL only:
SavepointPostgres tries to rollback already committed/rolled
back transactions, so after it got committed, don't try
to rollback it again in SavepointPostgres::__destroy.
This happens only when trying to INSERT IGNORE something
without having a transaction open first (e.g. during
unit testing).
Thanks to: OverlordQ <overlordq@gmail.com>
Change-Id: I40ff757a7e2c6ff21f73e1ecd35754e1981f1941
public function __destruct() {
if ( $this->didbegin ) {
$this->dbw->rollback();
+ $this->didbegin = false;
}
}
public function commit() {
if ( $this->didbegin ) {
$this->dbw->commit();
+ $this->didbegin = false;
}
}