Steps to replicate the issue (include links if applicable):
- Have a MediaWiki instance using an SQLite database.
- Try to perform any operation involving this database with maintenance/SqliteMaintenance.php i.e. --backup-to / --integrity / --vacuum
What happens?:
An error is returned: This maintenance script requires a SQLite database.
This seems to have occurred because change 759634 ("Convert various callers to LoadBalancer::getConnectionRef()") performed this February as part of T193565 did not account for the test $dbw instanceof DatabaseSqlite immediately following the modification. $dbw is now an instance of Wikimedia\Rdbms\DBConnRef, not [Wikimedia\Rdbms\]DatabaseSqlite.
In my case this meant that backups were no longer generated. In fact, they were also not being generated for another reason: I previously used it in a crontab as Sqlite.php, but the file was moved in MW 1.36. Ideally, I would have caught this earlier, but the error was not emailed due to lack of an MTA.
What should have happened instead?:
- The SQLite database operation should have executed as requested.
- Code-wise, the test might could be modified to if ( $dbw->getType() != "sqlite" ) { similar to how it was before, and vacuum(), integrityCheck() and backup() should accept a DBConnRef rather than DatabaseSqlite (else they fail).
- The failure to perform a backup should have been caught by an automated test, as this is part of the critical backup path for SQLite installations.
Software version (skip for WMF-hosted wikis like Wikipedia):
At least REL1_38 and REL1_39 (on current git branches).