X-Git-Url: https://git.heureux-cyclage.org/?p=lhc%2Fweb%2Fwiklou.git;a=blobdiff_plain;f=includes%2Fobjectcache%2FSqlBagOStuff.php;h=70795eccd951a0b126117776b471f187d04e2d73;hp=a4a6ba845ae30e9919a2845f78087868905c8b47;hb=89ba3571215d685acd853b85d25b5e2e39c5d858;hpb=d42d6bd868fd5b579080639995e6a7e23851fcf3 diff --git a/includes/objectcache/SqlBagOStuff.php b/includes/objectcache/SqlBagOStuff.php index a4a6ba845a..70795eccd9 100644 --- a/includes/objectcache/SqlBagOStuff.php +++ b/includes/objectcache/SqlBagOStuff.php @@ -148,7 +148,7 @@ class SqlBagOStuff extends BagOStuff { protected function getSeparateMainLB() { global $wgDBtype; - if ( $wgDBtype === 'mysql' && $this->usesMainDB() ) { + if ( $this->usesMainDB() && $wgDBtype !== 'sqlite' ) { if ( !$this->separateMainLB ) { // We must keep a separate connection to MySQL in order to avoid deadlocks $lbFactory = MediaWikiServices::getInstance()->getDBLoadBalancerFactory(); @@ -156,8 +156,7 @@ class SqlBagOStuff extends BagOStuff { } return $this->separateMainLB; } else { - // However, SQLite has an opposite behavior. And PostgreSQL needs to know - // if we are in transaction or not (@TODO: find some PostgreSQL work-around). + // However, SQLite has an opposite behavior due to DB-level locking return null; } } @@ -588,7 +587,7 @@ class SqlBagOStuff extends BagOStuff { while ( true ) { $conds = $baseConds; if ( $maxExpTime !== false ) { - $conds[] = 'exptime > ' . $db->addQuotes( $maxExpTime ); + $conds[] = 'exptime >= ' . $db->addQuotes( $maxExpTime ); } $rows = $db->select( $this->getTableNameByShard( $i ),