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 |
||
|---|---|---|
| .. | ||
| logger | ||
| DeprecatablePropertyArray.php | ||
| DeprecationHelper.php | ||
| MWDebug.php | ||