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
Merge "Clean up ar_usertext_timestamp index mess"
[lhc/web/wiklou.git]
/
includes
/
Storage
/
NameTableStore.php
diff --git
a/includes/Storage/NameTableStore.php
b/includes/Storage/NameTableStore.php
index
5ef0304
..
88f301a
100644
(file)
--- a/
includes/Storage/NameTableStore.php
+++ b/
includes/Storage/NameTableStore.php
@@
-111,7
+111,7
@@
class NameTableStore {
* @return IDatabase
*/
private function getDBConnection( $index, $flags = 0 ) {
* @return IDatabase
*/
private function getDBConnection( $index, $flags = 0 ) {
- return $this->loadBalancer->getConnection( $index, [], $this->domain, $flags );
+ return $this->loadBalancer->getConnection
Ref
( $index, [], $this->domain, $flags );
}
/**
}
/**
@@
-160,10
+160,7
@@
class NameTableStore {
if ( $id === null ) {
// RACE: $name was already in the db, probably just inserted, so load from master.
// Use DBO_TRX to avoid missing inserts due to other threads or REPEATABLE-READs.
if ( $id === null ) {
// RACE: $name was already in the db, probably just inserted, so load from master.
// Use DBO_TRX to avoid missing inserts due to other threads or REPEATABLE-READs.
- // ...but not during unit tests, because we need the fake DB tables of the default
- // connection.
- $connFlags = defined( 'MW_PHPUNIT_TEST' ) ? 0 : ILoadBalancer::CONN_TRX_AUTOCOMMIT;
- $table = $this->reloadMap( $connFlags );
+ $table = $this->reloadMap( ILoadBalancer::CONN_TRX_AUTOCOMMIT );
$searchResult = array_search( $name, $table, true );
if ( $searchResult === false ) {
$searchResult = array_search( $name, $table, true );
if ( $searchResult === false ) {