Index: branches/REL1_15/phase3/includes/BagOStuff.php |
— | — | @@ -437,10 +437,19 @@ |
438 | 438 | var $lb, $db; |
439 | 439 | |
440 | 440 | function _getDB(){ |
441 | | - if ( !isset( $this->lb ) ) { |
442 | | - $this->lb = wfGetLBFactory()->newMainLB(); |
443 | | - $this->db = $this->lb->getConnection( DB_MASTER ); |
444 | | - $this->db->clearFlag( DBO_TRX ); |
| 441 | + global $wgDBtype; |
| 442 | + if ( !isset( $this->db ) ) { |
| 443 | + /* We must keep a separate connection to MySQL in order to avoid deadlocks |
| 444 | + * However, SQLite has an opposite behaviour. |
| 445 | + * @todo Investigate behaviour for other databases |
| 446 | + */ |
| 447 | + if ( $wgDBtype == 'sqlite' ) { |
| 448 | + $this->db = wfGetDB( DB_MASTER ); |
| 449 | + } else { |
| 450 | + $this->lb = wfGetLBFactory()->newMainLB(); |
| 451 | + $this->db = $this->lb->getConnection( DB_MASTER ); |
| 452 | + $this->db->clearFlag( DBO_TRX ); |
| 453 | + } |
445 | 454 | } |
446 | 455 | return $this->db; |
447 | 456 | } |
Index: branches/REL1_15/phase3/RELEASE-NOTES |
— | — | @@ -20,6 +20,9 @@ |
21 | 21 | Those wishing to use the latest code instead of a branch release can obtain |
22 | 22 | it from source control: http://www.mediawiki.org/wiki/Download_from_SVN |
23 | 23 | |
| 24 | +=== Changes since 1.15.2 === |
| 25 | +* (bug 22828) Fixed deletion on SQLite. |
| 26 | + |
24 | 27 | === Changes since 1.15.1 === |
25 | 28 | |
26 | 29 | * The installer now includes a check for a data corruption issue with certain |