wiki.techinc.nl/tests/phpunit/includes/db
Aaron Schulz 99d5d2e8cc rdbms: cleanup getServer() and connection parameter fields in Database
Make getServer() always return a string, as documented, even with new
Database::NEW_UNCONNECTED handles that have yet to call open(). If the
'host' parameter to __construct() is ''/null, getServer() now returns
'localhost' instead of null. This avoids problems like fatal errors in
calls to TransactionProfiler::recordConnection().

Use Database constants for "connectionParams" field keys for better
static analysis.

Also:
* Add Database::getServerName() method that returns "readable" server
  names in the style of LoadBalancer::getServerName(). Note that the
  "hostName" field is already passed in from LoadBalancer.
* Migrate most getServer() callers to getServerName() for easier
  debugging and more readable logging.
* Also, normalize Database/LoadBalancer SPI logging context to use
  "db_server" and reduce logging code duplication in LoadBalancer.

Bug: T277056
Change-Id: I00ed4049ebb45edab1ea07561c47e226a423ea3b
2021-05-05 19:44:02 +00:00
..
DatabaseTestHelper.php rdbms: cleanup getServer() and connection parameter fields in Database 2021-05-05 19:44:02 +00:00
LBFactoryTest.php Replace uses of DB_MASTER with DB_PRIMARY 2021-04-29 09:24:31 -07:00
LoadBalancerTest.php rdbms: cleanup getServer() and connection parameter fields in Database 2021-05-05 19:44:02 +00:00