X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2Flibs%2Frdbms%2Floadmonitor%2FLoadMonitorMySQL.php;h=1fbc117c14e2b85888f2cd24a9caaf01acc813c6;hb=bd5a37aacf600bdd5f3a6e7998f92bd1d9326a8a;hp=98cff6d77aa8d1d649187f7665d45e9cd1505a77;hpb=96bf2d1635ed70fca07051d22863433aa4473c4a;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/libs/rdbms/loadmonitor/LoadMonitorMySQL.php b/includes/libs/rdbms/loadmonitor/LoadMonitorMySQL.php index 98cff6d77a..5ae5bbdd9d 100644 --- a/includes/libs/rdbms/loadmonitor/LoadMonitorMySQL.php +++ b/includes/libs/rdbms/loadmonitor/LoadMonitorMySQL.php @@ -39,9 +39,7 @@ class LoadMonitorMySQL extends LoadMonitor { ) { parent::__construct( $lb, $srvCache, $wCache, $options ); - $this->warmCacheRatio = isset( $options['warmCacheRatio'] ) - ? $options['warmCacheRatio'] - : 0.0; + $this->warmCacheRatio = $options['warmCacheRatio'] ?? 0.0; } protected function getWeightScale( $index, IDatabase $conn = null ) { @@ -51,10 +49,10 @@ class LoadMonitorMySQL extends LoadMonitor { $weight = 1.0; if ( $this->warmCacheRatio > 0 ) { - $res = $conn->query( 'SHOW STATUS', false ); + $res = $conn->query( 'SHOW STATUS', __METHOD__ ); $s = $res ? $conn->fetchObject( $res ) : false; if ( $s === false ) { - $host = $this->parent->getServerName( $index ); + $host = $this->lb->getServerName( $index ); $this->replLogger->error( __METHOD__ . ": could not get status for $host" ); } else { // https://dev.mysql.com/doc/refman/5.7/en/server-status-variables.html