Commit f088ccfb authored by Dries's avatar Dries

- Patch #301049 by Josh Waihi, Damien Tournoud, et al: fixed bug with...

- Patch #301049 by Josh Waihi, Damien Tournoud, et al: fixed bug with transaction support (on PostgreSQL).
parent 7b5392b9
......@@ -851,7 +851,7 @@ public function pushTransaction() {
if ($this->transactionLayers == 1) {
if ($this->supportsTransactions()) {
parent::startTransaction();
parent::beginTransaction();
}
// Reset any scheduled rollback
......
......@@ -690,8 +690,7 @@ public function execute() {
$this->connection->insert($this->table, $this->queryOptions)->fields($insert_fields)->execute();
}
// Commit the transaction.
$transaction->commit();
// Transaction commits here where $transaction looses scope.
}
public function __toString() {
......
......@@ -2255,8 +2255,8 @@ class DatabaseTransactionTestCase extends DatabaseTestCase {
// on a database that does not actually support transactions, and
// the current database does claim to NOT support transactions.
$txn = db_transaction(TRUE);
$this->fail('No transaction failure registered.');
}
$this->fail('No transaction failure registered.');
}
catch (TransactionsNotSupportedException $e) {
$this->pass('Exception thrown for unsupported transactions.');
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment