* In SqlBagOStuff, ignore errors due to a read-only database, per my comments on CR r42796. Same for LocalisationCache.
* Merged SqlBagOStuff and MediaWikiBagOStuff, that proved to be an awkward and unnecessary generalisation. Use the standard quoting wrapper functions instead of $db->query().
* Implemented atomic incr() and decr() functions for SqlBagOStuff.
* Made incr() and decr() generally work roughly the same as it does in memcached, respecting negative steps instead of ignoring such operations. This allows decr() to be implemented in terms of incr().
* Per bug 11533, in MessageCache.php, don't retry 20 times on a cache failure, that's really memcached-specific and won't be useful for other cache types. It's not really very useful for memcached either.
* Moved MySQL-specific implementations of wasDeadlock() and wasErrorReissuable() to DatabaseMysql.
* Briefly tested page views with $wgReadOnly=read_only=1, fixed an error from Article::viewUpdates(). A CentralAuth fix will be in a subsequent commit.
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.
I moved a number of methods and marked them abstract in DatabaseBase,
namely those that met the following criteria:
1) Used some mysql_* function, so would obviously fail on any other DB.
2) Were already implemented by all five non-MySQL subclasses.
It would be reasonable to revisit these and make the less essential ones
return a dummy value instead of being abstract. And document them. And
move more methods that are MySQL-specific. But one thing at a time.
I also split the classes Database, DatabaseMysql, and MySQLMasterPos to
DatabaseMysql.php.
This should theoretically have no practical changes, but it's a bunch of
changed code, so it will possibly break something by accident.
Followup to r51795.