wiki.techinc.nl/tests/phpunit/includes/db
Aaron Schulz fe0af6cad5 rdbms: Database::selectDB() update the domain and handle failure better
LoadBalancer uses Database::getDomainId() for deciding which keys to use
in the foreign connection handle arrays. This method should reflect any
changes made to the DB selection.

If the query fails, then do not change domain field. This is the sort of
approach that LoadBalancer is expects in openForeignConnection(). Also,
throw an exception when selectDB() fails.

The db/schema/prefix fields of Database no longer exist in favor of just
using the newer currentDomain field.

Also:
* Add IDatabase::selectDomain() method and made selectDB() wrap it.
* Extract the DB name from sqlite files if not explicitly provided.
* Fix inconsistent open() return values from Database subclasses.
* Make a relationSchemaQualifier() method to handle the concern of
  omitting schema names in queries. The means that getDomainId() can
  still return the right value, rather than confusingly omitt the schema.
* Make RevisionStore::checkDatabaseWikiId() account for the domain schema.
  Unlike d2a4d614fc, this does not incorrectly assume the storage is
  always for the current wiki domain. Also, LBFactorySingle sets the local
  domain so it is defined even in install.php.
* Make RevisionStoreDbTestBase actually set the LoadBalancer local domain.
* Make RevisionTest::testLoadFromTitle() account for the domain schema.

Bug: T193565
Change-Id: I6e51cd54c6da78830b38906b8c46789c79498ab5
2018-10-10 12:03:30 -07:00
..
DatabaseOracleTest.php tests: Enable PHPUnit 4/6 compat layer in some tests that need it 2018-04-07 19:31:24 -07:00
DatabasePostgresTest.php Fix caller name in DatabasePostgresTest 2018-09-30 17:38:22 +00:00
DatabaseSqliteTest.php rdbms: make LoadBalancer::getConnection() ignore CONN_TRX_AUTO when unusable 2018-03-02 18:40:39 +00:00
DatabaseTestHelper.php rdbms: Database::selectDB() update the domain and handle failure better 2018-10-10 12:03:30 -07:00
LBFactoryTest.php rdbms: Database::selectDB() update the domain and handle failure better 2018-10-10 12:03:30 -07:00
LoadBalancerTest.php rdbms: add more comments and sanity checks for CONN_TRX_AUTOCOMMIT 2018-08-09 01:39:07 +00:00