Add some missing __METHOD__ parameters to database calls
Plus fix a typo Change-Id: I8ca326990559ea80254ce0cef2ed204590716679
This commit is contained in:
parent
4bd96ff4a5
commit
a84ad7bd40
8 changed files with 17 additions and 10 deletions
|
|
@ -915,17 +915,19 @@ class ChangeTags {
|
|||
// tags for each revision. This does not work with temporary tables
|
||||
// on some versions of MySQL, which causes phpunit tests to fail.
|
||||
// As a hacky workaround, we copy the temporary table, and join
|
||||
// against the copy. It is acknowledge that this is quite horrific.
|
||||
// against the copy. It is acknowledged that this is quite horrific.
|
||||
// Discuss at T256006.
|
||||
|
||||
$tagTable = 'change_tag_for_display_query';
|
||||
$db->query(
|
||||
'CREATE TEMPORARY TABLE IF NOT EXISTS ' . $db->tableName( $tagTable )
|
||||
. ' LIKE ' . $db->tableName( 'change_tag' )
|
||||
. ' LIKE ' . $db->tableName( 'change_tag' ),
|
||||
__METHOD__
|
||||
);
|
||||
$db->query(
|
||||
'INSERT IGNORE INTO ' . $db->tableName( $tagTable )
|
||||
. ' SELECT * FROM ' . $db->tableName( 'change_tag' )
|
||||
. ' SELECT * FROM ' . $db->tableName( 'change_tag' ),
|
||||
__METHOD__
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1851,7 +1851,7 @@ class LocalFile extends File {
|
|||
}
|
||||
|
||||
JobQueueGroup::singleton()->lazyPush( $cacheUpdateJob );
|
||||
} );
|
||||
}, __METHOD__ );
|
||||
|
||||
return Status::newGood();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -689,7 +689,7 @@ class PostgresInstaller extends DatabaseInstaller {
|
|||
__METHOD__ );
|
||||
if ( $exists ) {
|
||||
try {
|
||||
$conn->query( 'CREATE LANGUAGE plpgsql' );
|
||||
$conn->query( 'CREATE LANGUAGE plpgsql', __METHOD__ );
|
||||
} catch ( DBQueryError $e ) {
|
||||
return Status::newFatal( 'config-pg-no-plpgsql', $this->getVar( 'wgDBname' ) );
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1129,7 +1129,8 @@ END;
|
|||
"JOIN pg_attribute a ON a.attrelid = i.indrelid " .
|
||||
"AND a.attnum = ANY(i.indkey) " .
|
||||
"WHERE i.indrelid = '\"$table\"'::regclass " .
|
||||
"AND i.indisprimary"
|
||||
"AND i.indisprimary",
|
||||
__METHOD__
|
||||
);
|
||||
$currentColumns = [];
|
||||
foreach ( $result as $row ) {
|
||||
|
|
|
|||
|
|
@ -43,7 +43,8 @@ SQL;
|
|||
$db->addQuotes( $schema ),
|
||||
$db->addQuotes( $table ),
|
||||
$db->addQuotes( $field )
|
||||
)
|
||||
),
|
||||
__METHOD__
|
||||
);
|
||||
$row = $db->fetchObject( $res );
|
||||
if ( !$row ) {
|
||||
|
|
|
|||
|
|
@ -665,7 +665,9 @@ class ActorStore implements UserIdentityLookup, ActorNormalization {
|
|||
$this->cache->remove( $cachedActor );
|
||||
$this->detachActorId( $originalActor );
|
||||
}
|
||||
} );
|
||||
},
|
||||
__METHOD__
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -448,7 +448,8 @@ class NameTableStoreTest extends MediaWikiIntegrationTestCase {
|
|||
$this->db->onTransactionResolution(
|
||||
static function () use ( $store1, &$quuxId ) {
|
||||
$quuxId = $store1->acquireId( 'quux' );
|
||||
}
|
||||
},
|
||||
__METHOD__
|
||||
);
|
||||
|
||||
$store1->acquireId( 'foo' );
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@ class DBFileJournalIntegrationTest extends MediaWikiIntegrationTestCase {
|
|||
if ( $db->getType() !== 'mysql' ) {
|
||||
return;
|
||||
}
|
||||
if ( !$db->tableExists( 'filejournal' ) ) {
|
||||
if ( !$db->tableExists( 'filejournal', __METHOD__ ) ) {
|
||||
$db->sourceFile( "$IP/maintenance/archives/patch-filejournal.sql" );
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue