* Fixed a bug causing the installer to ignore the "engine" and "charset" settings...
authorTim Starling <tstarling@users.mediawiki.org>
Tue, 25 Jan 2011 07:37:48 +0000 (07:37 +0000)
committerTim Starling <tstarling@users.mediawiki.org>
Tue, 25 Jan 2011 07:37:48 +0000 (07:37 +0000)
commit0c86b1611a5066a70d9164a9231ec3dd56cfe1fa
tree3d8d7a5db5e9a0275e1cfe17e80f917e048138c6
parent957302fe969cd1bdb456ed0bf8fe61f18e9af438
* Fixed a bug causing the installer to ignore the "engine" and "charset" settings when installing a MySQL database.
* Fixed a bug causing the engine and charset settings to not be properly preserved when adding new tables on upgrade.
* Fixed total breakage of SQLite upgrade, by reusing the administrative connection to the SQLite database instead of creating a new one when wfGetDB() is called. Added LBFactory_Single to support this.
* Introduced a "schema variable" concept to DatabaseBase to avoid the use of globals for communication between the installer and the Database. Removed a lot of old global variable names from Database::replaceVars(), most were only added on a whim and were never used.
* Introduced DatabaseInstaller::getSchemaVars(), to allow schema variables to be supplied by the DatabaseInstaller child classes.
* Removed messages config-mysql-egine-mismatch [sic] and config-mysql-charset-mismatch. In the old installer it was possible for users to request a certain character set for an upgrade, but in the new installer the question is never asked. So these warnings were shown whenever a non-default character set or engine was used in the old database.
* In MysqlInstaller::preUpgrade(), fixed the incorrect strings used to identify the MySQL character sets: mysql5 instead of utf8 and mysql5-binary instead of binary.
* On install, initialise the site_stats table, using code copied from the old installer. Unlike the old installer, use SiteStats to increment the user count when the initial user is added.
* Fixed several instances of inappropriate call-by-reference.
* Replaced call_user_func_array() with call_user_func() where possible, it is shorter and simpler.
* Moved the caching boilerplate for DatabaseInstaller::getConnection() to the base class, and have the derived classes override an uncached function openConnection() instead. Updates r80892.
* In MysqlInstaller::getLocalSettings(), escape PHP strings correctly with LocalSettingsGenerator::escapePhpString().
* Reduce timeout for checks in dirIsExecutable() to 3 seconds, so that it doesn't take 30s to run when apache is in single-threaded mode for debugging.
* MySQL and SQLite have been tested and they appear to work. PostgreSQL upgrade is totally broken, apparently it was like that before I started. The Oracle code is untested.
13 files changed:
includes/AutoLoader.php
includes/db/Database.php
includes/db/DatabaseMysql.php
includes/db/DatabaseOracle.php
includes/db/LBFactory.php
includes/db/LBFactory_Single.php [new file with mode: 0644]
includes/installer/DatabaseInstaller.php
includes/installer/Installer.i18n.php
includes/installer/Installer.php
includes/installer/MysqlInstaller.php
includes/installer/OracleInstaller.php
includes/installer/PostgresInstaller.php
includes/installer/SqliteInstaller.php