dépôts
/
lhc
/
web
/
wiklou.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
bug 44136: Don't rollback after successful commit
[lhc/web/wiklou.git]
/
includes
/
db
/
DatabasePostgres.php
diff --git
a/includes/db/DatabasePostgres.php
b/includes/db/DatabasePostgres.php
index
3504892
..
dcb96fb
100644
(file)
--- a/
includes/db/DatabasePostgres.php
+++ b/
includes/db/DatabasePostgres.php
@@
-232,12
+232,14
@@
class SavepointPostgres {
public function __destruct() {
if ( $this->didbegin ) {
$this->dbw->rollback();
public function __destruct() {
if ( $this->didbegin ) {
$this->dbw->rollback();
+ $this->didbegin = false;
}
}
public function commit() {
if ( $this->didbegin ) {
$this->dbw->commit();
}
}
public function commit() {
if ( $this->didbegin ) {
$this->dbw->commit();
+ $this->didbegin = false;
}
}
}
}
@@
-325,6
+327,11
@@
class DatabasePostgres extends DatabaseBase {
/**
* Usually aborts on failure
/**
* Usually aborts on failure
+ * @param string $server
+ * @param string $user
+ * @param string $password
+ * @param string $dbName
+ * @throws DBConnectionError
* @return DatabaseBase|null
*/
function open( $server, $user, $password, $dbName ) {
* @return DatabaseBase|null
*/
function open( $server, $user, $password, $dbName ) {
@@
-356,6
+363,10
@@
class DatabasePostgres extends DatabaseBase {
if ( $port != false && $port != '' ) {
$connectVars['port'] = $port;
}
if ( $port != false && $port != '' ) {
$connectVars['port'] = $port;
}
+ if ( $this->mFlags & DBO_SSL ) {
+ $connectVars['sslmode'] = 1;
+ }
+
$this->connectString = $this->makeConnectionString( $connectVars, PGSQL_CONNECT_FORCE_NEW );
$this->close();
$this->installErrorHandler();
$this->connectString = $this->makeConnectionString( $connectVars, PGSQL_CONNECT_FORCE_NEW );
$this->close();
$this->installErrorHandler();
@@
-1402,9
+1413,6
@@
SQL;
if ( isset( $noKeyOptions['FOR UPDATE'] ) ) {
$postLimitTail .= ' FOR UPDATE';
}
if ( isset( $noKeyOptions['FOR UPDATE'] ) ) {
$postLimitTail .= ' FOR UPDATE';
}
- if ( isset( $noKeyOptions['LOCK IN SHARE MODE'] ) ) {
- $postLimitTail .= ' LOCK IN SHARE MODE';
- }
if ( isset( $noKeyOptions['DISTINCT'] ) || isset( $noKeyOptions['DISTINCTROW'] ) ) {
$startOpts .= 'DISTINCT';
}
if ( isset( $noKeyOptions['DISTINCT'] ) || isset( $noKeyOptions['DISTINCTROW'] ) ) {
$startOpts .= 'DISTINCT';
}