Commit graph

14 commits

Author SHA1 Message Date
Alexandre Emsenhuber
78a56a67ba Added missing GPLv2 headers in includes/db.
Change-Id: Ib8fe301c6db77603e411113cea5a39c25c664961
2012-04-26 10:47:10 +02:00
Sam Reed
39356de1a4 Moar documentations 2011-11-29 21:04:20 +00:00
Tim Starling
a3bf5ecb4a * Fix for r90643: in the case where there is only one server, implying no replication, make LoadBalancer::getLagTimes(), LoadMonitor_MySQL::getLagTimes() and LoadBalancer::getMaxLag() quickly report zero lag without attempting to do a SHOW SLAVE STATUS query.
* Updated the documentation to make it clear that REPLICATION CLIENT is required in a replicated setup. 
* Reverted r90773.
2011-08-29 04:42:26 +00:00
Sam Reed
efd79d767c Merge r90664 from 1.17wmf1 2011-06-30 01:27:03 +00:00
Tim Starling
0e73205470 General database-related code cleanup:
* Merged the 4 simulated implementations of Database*::replace(). I took diffs, they were nearly identical. I made one based on the IBM DB2 version, since it used insert() which looked like a nice touch.
* Provided the non-simulated implementation of Database*::replace() via a protected member function, and made DatabaseMysql::replace() and DatabaseSqlite::replace() into a wrapper for it. 
* Moved the MySQL-specific functionality from masterPosWait(), getSlavePos() and getMasterPos() from DatabaseBase to DatabaseMysql. 
* Renamed getStatus() to getMysqlStatus() and moved it to DatabaseMysql. Removed "unimplemented" errors from two other subclasses. Really there's no way another DBMS could or should implement this function. 
* Split the LoadMonitor class into a no-op class and a MySQL-specific class, to avoid fatal errors due to the getMysqlStatus() call if other DBMSs tried to use LoadBalancer with multiple servers. Of course there are lots of other reasons it won't work, I'm just fixing the architecture issue here.

And while I have a replicated test setup handy:
* On MySQL 4.1.9 and later, use SHOW SLAVE STATUS to get the lag instead of SHOW PROCESSLIST. This has the advantage of reading zero when there are no events for a while.
2011-06-23 03:14:11 +00:00
Sam Reed
2b676156ba And even more documentation 2011-05-28 18:58:51 +00:00
Sam Reed
6fac268c19 Documentation 2011-05-25 18:41:31 +00:00
Sam Reed
33ad682ab0 Add/remove/tweak method documentation 2011-05-19 00:03:31 +00:00
Sam Reed
01891953bc More function/member variable documentation 2011-03-09 17:09:10 +00:00
Sam Reed
7ebf2e5165 More function level documentation
Fixup some indenting
2011-02-19 00:44:38 +00:00
Alexandre Emsenhuber
fb36e6ac3e * standardised file headers
* added a basic description
* added @file
2010-08-08 11:55:47 +00:00
Alexandre Emsenhuber
54fd0a4c1f Fixed some doxygen warnings 2010-03-11 20:59:25 +00:00
Andrew Garrett
36dab182b8 Allow DB to be used during LocalSettings.php et al by changing plain get of global $wgMemc to wfGetMainCache(), which will load memcached if necessary. 2008-11-30 09:44:00 +00:00
Tim Starling
d6f0a95465 * Split off DB load monitoring logic into a LoadMonitor class hierarchy, to allow for plugins in this area.
* Use an associative array to initialise LoadBalancer objects
* By default, use Preprocessor_DOM if available, otherwise use Preprocessor_Hash. Preprocessor_Hash has worse performance.
* Fix parserTests.php for replicated databases. Use CREATE TABLE instead of CREATE TEMPORARY TABLE if there is more than one server configured.
* Log exceptions even in command-line mode.
2008-07-07 03:31:00 +00:00