From: umherirrender Date: Wed, 25 Jun 2014 17:54:15 +0000 (+0200) Subject: Remove DatabaseMysqlBase::getLagFromProcesslist() (deprecated 1.19) X-Git-Tag: 1.31.0-rc.0~15203^2~2 X-Git-Url: https://git.cyclocoop.org/%7B%24admin_url%7Dmembres/modifier.php?a=commitdiff_plain;h=3b2236e40f531005ba67c6593ed8337b097698fd;p=lhc%2Fweb%2Fwiklou.git Remove DatabaseMysqlBase::getLagFromProcesslist() (deprecated 1.19) Change-Id: I7dfdd943abf1c94a35e2401f92208c19683dc200 --- diff --git a/RELEASE-NOTES-1.24 b/RELEASE-NOTES-1.24 index 1035a5e135..01b49386b2 100644 --- a/RELEASE-NOTES-1.24 +++ b/RELEASE-NOTES-1.24 @@ -180,6 +180,7 @@ changes to languages because of Bugzilla reports. * Removed HTMLForm::addJS(). (deprecated since 1.18) * Removed LogEventsList::showHeader(). (deprecated since 1.19) * Removed ImageGalleryBase::useSkin(). (deprecated since 1.18) +* Removed DatabaseMysqlBase::getLagFromProcesslist(). (deprecated since 1.19) ==== Renamed classes ==== * CLDRPluralRuleConverter_Expression to CLDRPluralRuleConverterExpression diff --git a/includes/db/DatabaseMysqlBase.php b/includes/db/DatabaseMysqlBase.php index 837d0947e5..cf377361ad 100644 --- a/includes/db/DatabaseMysqlBase.php +++ b/includes/db/DatabaseMysqlBase.php @@ -637,47 +637,6 @@ abstract class DatabaseMysqlBase extends DatabaseBase { } } - /** - * @deprecated since 1.19, use getLagFromSlaveStatus - * - * @return bool|int - */ - function getLagFromProcesslist() { - wfDeprecated( __METHOD__, '1.19' ); - $res = $this->query( 'SHOW PROCESSLIST', __METHOD__ ); - if ( !$res ) { - return false; - } - # Find slave SQL thread - foreach ( $res as $row ) { - /* This should work for most situations - when default db - * for thread is not specified, it had no events executed, - * and therefore it doesn't know yet how lagged it is. - * - * Relay log I/O thread does not select databases. - */ - if ( $row->User == 'system user' && - $row->State != 'Waiting for master to send event' && - $row->State != 'Connecting to master' && - $row->State != 'Queueing master event to the relay log' && - $row->State != 'Waiting for master update' && - $row->State != 'Requesting binlog dump' && - $row->State != 'Waiting to reconnect after a failed master event read' && - $row->State != 'Reconnecting after a failed master event read' && - $row->State != 'Registering slave on master' - ) { - # This is it, return the time (except -ve) - if ( $row->Time > 0x7fffffff ) { - return false; - } else { - return $row->Time; - } - } - } - - return false; - } - /** * Wait for the slave to catch up to a given master position. * @todo Return values for this and base class are rubbish