SiteStatsInits queries could be long running, and so lead to buffers
and undo table issues.
This change allows SiteStatsInits to connect to vslow host.
Bug: T131475
Change-Id: I63c643ef3cc12f38c24374592c55364ba7569a26
public function __construct( $database = false ) {
if ( $database instanceof IDatabase ) {
$this->db = $database;
+ } elseif ( $database ) {
+ $this->db = wfGetDB( DB_MASTER );
} else {
- $this->db = wfGetDB( $database ? DB_MASTER : DB_SLAVE );
+ $this->db = wfGetDB( DB_SLAVE, 'vslow' );
}
}