X-Git-Url: http://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2Flibs%2Frdbms%2Fdatabase%2Futils%2FSavepointPostgres.php;h=edbcdfe141e9e47ac291544c62b5259839da2d5c;hb=e2f61aa44095d56af0d4b25a59e25b55a6c297bc;hp=ec4d09fa1aa600ddfb301571667bf10b4f37995c;hpb=a6c5f1a81599bc24005554f330f56d7a1b054d4b;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/libs/rdbms/database/utils/SavepointPostgres.php b/includes/libs/rdbms/database/utils/SavepointPostgres.php index ec4d09fa1a..edbcdfe141 100644 --- a/includes/libs/rdbms/database/utils/SavepointPostgres.php +++ b/includes/libs/rdbms/database/utils/SavepointPostgres.php @@ -18,12 +18,16 @@ * @file * @ingroup Database */ + +namespace Wikimedia\Rdbms; + use Psr\Log\LoggerInterface; /** * Manage savepoints within a transaction * @ingroup Database * @since 1.19 + * @deprecated since 1.31, use IDatabase::startAtomic() and such instead. */ class SavepointPostgres { /** @var DatabasePostgres Establish a savepoint within a transaction */ @@ -47,7 +51,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 +65,7 @@ class SavepointPostgres { public function commit() { if ( $this->didbegin ) { - $this->dbw->commit(); + $this->dbw->commit( __CLASS__, DatabasePostgres::FLUSHING_INTERNAL ); $this->didbegin = false; } }