X-Git-Url: http://git.cyclocoop.org//%22%22.str_replace%28%27%22%27%2C?a=blobdiff_plain;f=includes%2Flibs%2Frdbms%2Fdatabase%2FDatabase.php;h=2ef8822495adfba564ae4f77b065b34a2f3d8bf4;hb=0bcb82eb7d426102585ff57f5886fd1810fbbe96;hp=53810da4a878ffa346d3bb18705a7d53260d1c5a;hpb=ecc6d0bbb3718944e2c9e4cafd1ce5f0b1f613ec;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/libs/rdbms/database/Database.php b/includes/libs/rdbms/database/Database.php index 53810da4a8..2ef8822495 100644 --- a/includes/libs/rdbms/database/Database.php +++ b/includes/libs/rdbms/database/Database.php @@ -1145,15 +1145,10 @@ abstract class Database implements IDatabase, IMaintainableDatabase, LoggerAware # In the first case, the only options going forward are (a) ROLLBACK, or # (b) ROLLBACK TO SAVEPOINT (if one was set). If the later case, the only # option is ROLLBACK, since the snapshots would have been released. - if ( is_object( $tempIgnore ) ) { - // Ugly hack to know that savepoints are in use for postgres - // FIXME: remove this and make DatabasePostgres use ATOMIC_CANCELABLE - } else { - $this->trxStatus = self::STATUS_TRX_ERROR; - $this->trxStatusCause = - $this->makeQueryException( $lastError, $lastErrno, $sql, $fname ); - $tempIgnore = false; // cannot recover - } + $this->trxStatus = self::STATUS_TRX_ERROR; + $this->trxStatusCause = + $this->makeQueryException( $lastError, $lastErrno, $sql, $fname ); + $tempIgnore = false; // cannot recover } else { # Nothing prior was there to lose from the transaction, # so just roll it back. @@ -1320,7 +1315,7 @@ abstract class Database implements IDatabase, IMaintainableDatabase, LoggerAware private function handleSessionLoss() { // Clean up tracking of session-level things... // https://dev.mysql.com/doc/refman/5.7/en/implicit-commit.html - // https://www.postgresql.org/docs/9.1/static/sql-createtable.html (ignoring ON COMMIT) + // https://www.postgresql.org/docs/9.2/static/sql-createtable.html (ignoring ON COMMIT) $this->sessionTempTables = []; // https://dev.mysql.com/doc/refman/5.7/en/miscellaneous-functions.html#function_get-lock // https://www.postgresql.org/docs/9.4/static/functions-admin.html#FUNCTIONS-ADVISORY-LOCKS