Now database classes have an extra "foreign" property when used in
foreign databases, where $wgSharedDB and $wgSharedTables are not
considered.
Bug: 48819
Change-Id: I45db6860d0a4b4480e0b93aa7e750f096424e40f
The error was:
Catchable fatal error: Argument 1 passed to DatabaseMysql::masterPosWait()
must implement interface DBMasterPos, boolean given, called in
/var/www/DevWiki/core/includes/db/LoadBalancer.php on line 419
Change-Id: I230585930c1424b0868f9aa290167c66bc6848bd
We thought we'd fixed it previously, but the LB now connects to the
foreign slaves and tries to select $wgDBname. Fixing this by having
doWait() open connections that don't select any DB name, by passing
the empty string as the DB name. This is an undocumented feature
in the DatabaseMysql constructor, apparently.
Change-Id: Icc5594143a3eaa31170a7fc8c93d429c1a7dd575
* Refactored LoadBalancer::reportConnectionError()
* Removed PHP4-style reference from DatabaseError constructors
* Allowed to not pass a database to the DBError family of exceptions.
Change-Id: If9570b45ea7285de2b8b2391e704bc01f76be48a
Doxygen expects parameter types to come before the
parameter name in @param tags. Used a quick regex
to switch everything around where possible. This
only fixes cases where a primitve variable (or a
primitive followed by other types) is the variable
type. Other cases will need to be fixed manually.
Change-Id: Ic59fd20856eb0489d70f3469a56ebce0efb3db13
Added/removed spaces around logical/arithmetic operator
Reduced multiple empty lines to one empty line
Removed wrong tabs before comments at end of line
Removed too many spaces in assigments
Change-Id: I2bba4e72f9b5f88c53324d7b70e6042f1aad8f6b
Use it as if 'returning' a value for getConnection().
It doesn't make sense to sometimes add a return false and
sometimes not. But it was confusing that it looked like
wfProfileOut( __METHOD__ ); could be called twice.
Change-Id: I09638a134fcc925410389660f85239e8aa16483e
* (bug 41656) LoadBalancer always commits if there are callbacks pending.
This works by checking a new DatabaseBase::writesOrCallbacksPending() function.
* Made transaction idle callbacks run in autocommit mode. Generally callers already
want autocommit mode or do quick begin()/commit() calls anyway. The docs already
make stat that callbacks should close any connections they start, but this makes
it harder for people to forget about implicit transactions. Since the callbacks
often may happen in commitMasterChanges(), if transactions are left open, they
might not get committed by anything afterwards.
* Added sanity exceptions and warnings if callbacks get lost for some reason.
* Renamed trxIdleCallbacks -> mTrxIdleCallbacks for consistency.
Change-Id: I00e1e0fcdd7deeee1fbac6d0f295160479cb8962
In the presence of DBO_TRX, commit() may be used like a "flush".
Added a flag to trigger this mode to commit() and changed DeferredUpdates
to used the flush mode.
Change-Id: I529117618194a2669535f3c5c0fed07588597299
This is a follow-up to Idbe4a903.
LoadBalancer::commitMasterChanges used to cause a warning if an implicite
transaction was in progress. This is now supressed.
Note that warnign when an automatic transaction is committed explicitely,
it does make sense to issue a warning. But that should not be done for summary
commits when closing a connection, etc.
Change-Id: Id68c3607f6b9d930c00422baa6658b0651f2e42e