From: jenkins-bot Date: Thu, 5 Apr 2018 21:33:26 +0000 (+0000) Subject: Merge "rdbms: Remove support for PostgreSQL < 9.2, and improve INSERT IGNORE for... X-Git-Tag: 1.31.0-rc.0~186 X-Git-Url: https://git.heureux-cyclage.org/?p=lhc%2Fweb%2Fwiklou.git;a=commitdiff_plain;h=0bcb82eb7d426102585ff57f5886fd1810fbbe96 Merge "rdbms: Remove support for PostgreSQL < 9.2, and improve INSERT IGNORE for 9.5" --- 0bcb82eb7d426102585ff57f5886fd1810fbbe96 diff --cc includes/libs/rdbms/database/Database.php index 53810da4a8,51d54661f8..2ef8822495 --- a/includes/libs/rdbms/database/Database.php +++ b/includes/libs/rdbms/database/Database.php @@@ -1145,19 -1145,12 +1145,14 @@@ abstract class Database implements IDat # 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 + # Nothing prior was there to lose from the transaction, + # so just roll it back. + $this->doRollback( __METHOD__ . " ($fname)" ); $this->trxStatus = self::STATUS_TRX_OK; } }