From: Aaron Schulz Date: Sat, 29 Oct 2016 16:14:15 +0000 (-0700) Subject: Fix missing commit() flag in postgres savepoint class X-Git-Tag: 1.31.0-rc.0~5001^2 X-Git-Url: https://git.heureux-cyclage.org/index.php?a=commitdiff_plain;h=f27ba6383a82d74cf7df65697b5389fcff86a1f0;p=lhc%2Fweb%2Fwiklou.git Fix missing commit() flag in postgres savepoint class Previously, the transaction was left dangling, causing massive unit failure. Change-Id: I8fb6e69b44ff0ceb0cf7c4fb45f204e140472406 --- diff --git a/includes/libs/rdbms/database/utils/SavepointPostgres.php b/includes/libs/rdbms/database/utils/SavepointPostgres.php index ec4d09fa1a..8ae78e9371 100644 --- a/includes/libs/rdbms/database/utils/SavepointPostgres.php +++ b/includes/libs/rdbms/database/utils/SavepointPostgres.php @@ -47,7 +47,7 @@ class SavepointPostgres { $this->didbegin = false; /* If we are not in a transaction, we need to be for savepoint trickery */ if ( !$dbw->trxLevel() ) { - $dbw->begin( "FOR SAVEPOINT", DatabasePostgres::TRANSACTION_INTERNAL ); + $dbw->begin( __CLASS__, DatabasePostgres::TRANSACTION_INTERNAL ); $this->didbegin = true; } } @@ -61,7 +61,7 @@ class SavepointPostgres { public function commit() { if ( $this->didbegin ) { - $this->dbw->commit(); + $this->dbw->commit( __CLASS__, DatabasePostgres::FLUSHING_INTERNAL ); $this->didbegin = false; } }