* Fixed fieldInfo() on Postgres not using tableName() and thus failing for table user, for example.
* Made fieldInfo() on MySQL return false instead of throwing a query error if table does not exist. This is consistent with other databases' behaviour.
See report on http://permalink.gmane.org/gmane.org.wikimedia.mediawiki/33902
Fixed several tag nesting problems from setup_database().
Make sourceFile() always use text errors in the installer. It can't handle
exceptions properly (introduced in r36211). But they are appropiate for update.php
thus the ugly branches.
The installer now always handles sourceFile() errors.
Also make it abstract in DatabaseBase so all subclasses have to implement some human readable name
(also make getSoftwareLink abstract for the same reason) Every current Database class already implements both.
Notably, this will switch conditional() in MySQL from using IF() to
using CASE, like all other DBMSes. Documentation suggests this works
back to 4.0. If it's a problem, it's a matter of a few lines to
override it in DatabaseMysql.php.
Also, some extra explanatory comments have been added to a number of
methods in DatabaseBase.
Specifically freeResult(), selectDB(), close(), and ping(), as suggested
by Tim on code review for r51918. Where these were overridden by stubs
in subclasses, I deleted the stubs.
All other databases were changed to extend DatabaseBase instead of
Database. Database was kept as an alias for DatabaseMysql for
compatibility. Existing explicit references to Database that I could
find were changed to DatabaseMysql for the sake of clarity.
Should cause no functional changes.
* removing the indexName() hack and with it the /*i*/ stuff from tables.sql
* undoing renames of formerly implicitly named indices
* three indices have to be called different in SQLite because of naming conflicts, adding a patch to updaters.inc that does that
* renamed \2types and \3types both to \types (with different number of param), Doxygen doesn't seem to like numbers in aliases
* Added aliases for @private, @protected and @public
* Don't call quickUserCan('edit') unless section edit is enabled
* In DatabasePostgres and DatabaseSqlite: throw an exception on connection error
* In DatabasePostgres: don't send an invalid connection string whenever one of the fields is empty. Use quoting.
* In Database: make the captured PHP error prettier
* Display a descriptive error message when the user navigates to index.php with PHP 4, not a parse error. Check to see if the *.php5 extension works, using file_get_contents().
* The default port number for PostgreSQL is 5432, not blank.
* Better default for $wgDBname
* Migrated to a unique index for IP block conflict detection, like we did for MySQL some aeons ago.
* Modified DatabasePostgres to return a correct affected row count for INSERT IGNORE. Tested for single and multi.
* Fixed an unrelated bug: duplicate index rc_timestamp in tables.sql
* Tested for install and upgrade on PG 8.3.
No changelog because I'll backport it to 1.13.
This should be fine for now as Postgres uses SMALLINTs for BOOLs, to
match MySQLs BOOL/TINYINT aliasing and subsequent MW coding assumptions.
It's possible this will cause bad effects if inserted values are called
in a boolean context when they are going into a non-SMALLINT column, but we can handle
those as they come up.
rather than just turning off errors, do some savepoint trickery
so we end at the same state as when we started, to emulate
MySQL's INSERT...IGNORE. Bug 14708.
or Database::newFromParams() explicitly at the moment. While that's already bad (breaking PG support etc), I'd rather see those get fixed before we go introducing differences between Database and DatabaseMySql.
* Wrote a tool to check the integrity of the autoloader class list, fixed some issues that came up.
* Start the autoloader before LocalSettings.php, so that when an extension writer thinks an inefficient one-file special page extension is the way to go, they don't have to use explicit includes to make the class inheritance work. Should continue to work with $IP set in LocalSettings.php as long as $IP is set before extensions are included.