Index: trunk/phase3/includes/db/DatabaseMysql.php |
— | — | @@ -160,7 +160,9 @@ |
161 | 161 | if ( $this->trxLevel() ) { |
162 | 162 | $this->commit( __METHOD__ ); |
163 | 163 | } |
164 | | - return mysql_close( $this->mConn ); |
| 164 | + $ret = mysql_close( $this->mConn ); |
| 165 | + $this->mConn = false; |
| 166 | + return $ret; |
165 | 167 | } else { |
166 | 168 | return true; |
167 | 169 | } |
Index: trunk/phase3/includes/db/DatabaseOracle.php |
— | — | @@ -294,7 +294,9 @@ |
295 | 295 | if ( $this->mTrxLevel ) { |
296 | 296 | $this->commit( __METHOD__ ); |
297 | 297 | } |
298 | | - return oci_close( $this->mConn ); |
| 298 | + $ret = oci_close( $this->mConn ); |
| 299 | + $this->mConn = null; |
| 300 | + return null; |
299 | 301 | } else { |
300 | 302 | return true; |
301 | 303 | } |
Index: trunk/phase3/includes/db/DatabasePostgres.php |
— | — | @@ -243,7 +243,9 @@ |
244 | 244 | function close() { |
245 | 245 | $this->mOpened = false; |
246 | 246 | if ( $this->mConn ) { |
247 | | - return pg_close( $this->mConn ); |
| 247 | + $ret = pg_close( $this->mConn ); |
| 248 | + $this->mConn = null; |
| 249 | + return $ret; |
248 | 250 | } else { |
249 | 251 | return true; |
250 | 252 | } |
Index: trunk/phase3/includes/db/DatabaseIbm_db2.php |
— | — | @@ -563,7 +563,9 @@ |
564 | 564 | if ( $this->trxLevel() > 0 ) { |
565 | 565 | $this->commit( __METHOD__ ); |
566 | 566 | } |
567 | | - return db2_close( $this->mConn ); |
| 567 | + $ret = db2_close( $this->mConn ); |
| 568 | + $this->mConn = null; |
| 569 | + return $ret; |
568 | 570 | } else { |
569 | 571 | return true; |
570 | 572 | } |
Index: trunk/phase3/includes/db/DatabaseMssql.php |
— | — | @@ -113,7 +113,9 @@ |
114 | 114 | function close() { |
115 | 115 | $this->mOpened = false; |
116 | 116 | if ( $this->mConn ) { |
117 | | - return sqlsrv_close( $this->mConn ); |
| 117 | + $ret = sqlsrv_close( $this->mConn ); |
| 118 | + $this->mConn = null; |
| 119 | + return $ret; |
118 | 120 | } else { |
119 | 121 | return true; |
120 | 122 | } |
Index: trunk/phase3/RELEASE-NOTES-1.20 |
— | — | @@ -36,6 +36,7 @@ |
37 | 37 | history compression method. |
38 | 38 | * (bug 34702) Localised parentheses are now used in more special pages. |
39 | 39 | * (bug 34723) When editing a script page on a RTL wiki the textbox should be LTR. |
| 40 | +* (bug 34762) Calling close() on a DatabaseBase object now clears the connection. |
40 | 41 | |
41 | 42 | === API changes in 1.20 === |
42 | 43 | * (bug 34316) Add ability to retrieve maximum upload size from MediaWiki API. |