Merge "Special:Version: Link to tree instead of commit for git hashes"
[lhc/web/wiklou.git] / includes / db / DatabaseMysqlBase.php
index 837d094..5ad7c78 100644 (file)
@@ -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
@@ -847,8 +806,8 @@ abstract class DatabaseMysqlBase extends DatabaseBase {
        /**
         * Check to see if a named lock is available. This is non-blocking.
         *
-        * @param string $lockName name of lock to poll
-        * @param string $method name of method calling us
+        * @param string $lockName Name of lock to poll
+        * @param string $method Name of method calling us
         * @return bool
         * @since 1.20
         */
@@ -942,7 +901,7 @@ abstract class DatabaseMysqlBase extends DatabaseBase {
 
        /**
         * @param bool $value
-        * @return mixed null|bool|ResultWrapper
+        * @return null|bool|ResultWrapper
         */
        public function setBigSelects( $value = true ) {
                if ( $value === 'default' ) {
@@ -1282,7 +1241,7 @@ class MySQLMasterPos implements DBMasterPos {
        /** @var string */
        public $file;
 
-       /** @var int timestamp */
+       /** @var int Timestamp */
        public $pos;
 
        function __construct( $file, $pos ) {