* 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.
* Use camel case in tableName and dbName, dontrunallyourwordstogetherlikethis
* Call the function factory() instead of newFromType(), for consistency with the rest of MediaWiki
* Marked wfMsgNoDBForContent() as deprecated and added wfDeprecated() call; the call in LoadBalancer was the only one in core and extensions
* Also added call to wfDeprecated() in wfMsgWeirdKey(); no call in core or extensions
* Don't run a COUNT(*) query on what's potentially the entire categorylinks table on enwiki (hundreds of millions of rows). Put it in a miser mode check
* Wait for DB replication to catch up before processing the next batch. Implemented LoadBalancer::waitAll() for this purpose, which should behave more nicely than wfWaitForSlaves()
Turn DatabaseBase::classFromType() into newFromType() factory function for constructing a new object based on a given type and (optional) params. Documented it fairly clearly.
I think it looks nicer :)
Seemingly no callers in extensions OR phase3 (weird...), searching for "closeConnecton" or the correctly spelt "closeConnection"
The back-compat typo thing probably wants removing.. Seems to have been as such since it was added in r32578...
This is to avoid log mess with concurrent accesses and to allow logging between the messages.
Makes the message more readeable:
Connecting to localhost wikidb...
Connected to localhost wikidb.
Connection failed to localhost wikidb.
= BacklinkCache.php =
* BacklinkCache class
** Set a few otherwise unset varables ($wgContLang & $wgMemc in
BacklinkCache)
= testHelpers.inc =
* TectRecorder class
** TestRecorder::record() accept and use a recorder object
** change TestFileIterator::setParser use a MediaWikiParserTest instead
of ParserTest
= parserTest.inc =
* ParserTest class
** Make $ParserTest->regex and $ParsaerTest->savedGlobals member
variables available to stop warnings.
** Force ParserTest::$showProgress and $showFailure to false
** Set ParserTest::$uploadDir on time
** Move ParserTest::chomp() and addArticle() to bootstrap for
MediaWikiTestSetup.
** Update ParserTest::runTest so that Success and Failure are reported
via reporter->showsTestResult() or ParserTestSuiteBackend::show*()
as needed.
** Set $ParserTest->uploadDir with setupUploadDir()
** Change ParserTest->setupGlobals() so that $wgDBprefix doesn't get
to set to the “parsertest_” bits.
** Sprinkle $this->teardownGlobals() at exit points in
ParserTest->teardownDatabase()
= bootstrap.php =
* MediaWikiTestSetup class
** Make member variables MediaWikiTestSetup::$suite,
MediaW* Make member variables MediaWikiTestSetup::$suite,
MediaWikiTestSetup::$regex, MediaWikiTestSetup::$runDisabled
available.
* Setup a constructor MediaWikiTestSetup that accepts an optional
PHPUnit_Framework_TestSuite so they can use PHPUnit.
* Change MediaWikiParserTest so that it is derived from
MediaWikiTestSetup instead of PHPUnit_Framework_TestSuite
* Make MediaWikiParserTest create a PHPUnit_Framework_TestSuite for
the parser tests and pass it to the new parent (MediaWikiTestSetup)
as the PHPUnit testsuite.
* Replace MediaWikiParserTest->run() with MediaWikiParserTest::suite()
so that the tests can be loaded into a suite and then run with
PHPUnit's test runner.
= ParserHelpers.php =
* ParserUnitTest class
** Force run() $backend to use ParserTestSuiteBackend instead of
trying to get the backend from the suite member.
** Use ParserTest::runTest() instead of
ParserikiTestSetup::$regex, MediaWikiTestSetup::$runDisabled
available.
** Setup a constructor MediaWikiTestSetup that accepts an optional
PHPUnit_Framework_TestSuite so they can use PHPUnit.
** Change MediaWikiParserTest so that it is derived from
MediaWikiTestSetup instead of PHPUnit_Framework_TestSuite
** Make MediaWikiParserTest create a PHPUnit_Framework_TestSuite for
the parser tests and pass it to the new parent (MediaWikiTestSetup)
as the PHPUnit testsuite.
** Replace MediaWikiParserTest->run() with MediaWikiParserTest::suite()
so that the tests can be loaded into a suite and then run with
PHPUnit's test runner.
= ParserHelpers.php =
* ParserUnitTest class
** Force run() $backend to use ParserTestSuiteBackend instead of
trying to get the backend from the suite member.
** Use ParserTest::runTest() instead of
ParserTestSuiteBackend::runTest()
* ParserTestSuiteBackend class
** extends PHPUnit_FrameWork_TestSuite instead of ParserTest
** Add member variables $recorder, $term, and $usePHPUnit
** Add a constructor that determines if PHPUnit is usewd.
** Add a method showTestResult() that can be used to show success or
failure
** Change showSucess and showFailure() to be static and use identical
arguments and only use PHPUnit_Framework_Assert::assertEquals
when PHPUnit is in use.
= SearchEngineTest.php =
** Fix path in require to bootstrap.php