This is intended for use with scripts like addWiki.php to avoid mismatched domain errors.
Bug: T209483
Change-Id: Ie24f83f4e0fad7b01690d2055e1529a4cb0275b5
Added as per when this was aliased to ease removal
in the future. It was there since REL_1.29.
Bug: T195576
Change-Id: Ia9061cb9592b39d0f6bac1c96f87c9b0346c105b
Introduced in Ib6e307d76f93.
This patch updates FileBackend, LoadBalancer and LBFactory to use a public
function newScopedIgnoreUserAbort in ScopedCallback instead of all using
the exact same function but duplicated.
Bug: T184044
Change-Id: I27d7dc16abfe4b9447d7f3d8bd89f0de3ddeb662
Also improved the atomicity and affected row count logic for
insert/replace with sqlite.
Also remove unused "fileHandle" code from insert().
Change-Id: If7b9148fd44f3a958899885753c7c86ba66bf193
Should be "string" not "String" and "array" not "Array" in
@param, @return and @var use cases. Also, minor typo fixes.
Change-Id: I9d5ebc5b741c6560907b95f7c0c4039da2861f4a
The documentation says "This must be a valid SQL fragment", but as
written it breaks if given anything other than a field name. It's easy
enough to fix by adding an alias to the internal select() call.
Bug: T201781
Change-Id: I76428af6d3aadc266254fdb24109a0ac2db3761f
Also clean up empty schema handling in DatabaseDomain
This reverts commit f23ac02f4f.
Bug: T193565
Change-Id: I95fde5c069f180ca888a023fade25ec81b846d44
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
Move unclosed transaction error reporting to Database so it can
include information about the caller that started the transaction.
Change-Id: I834d957f172c03005de522f3029bb634b3c7220e