Ignore negative lag
authorTim Starling <tstarling@users.mediawiki.org>
Wed, 4 Jan 2006 22:45:55 +0000 (22:45 +0000)
committerTim Starling <tstarling@users.mediawiki.org>
Wed, 4 Jan 2006 22:45:55 +0000 (22:45 +0000)
includes/Database.php

index 6f48ce2..a0fce03 100644 (file)
@@ -1638,8 +1638,12 @@ class Database {
                while ( $row = $this->fetchObject( $res ) ) {
                        if ( $row->User == 'system user' ) {
                                if ( ++$slaveThreads == 2 ) {
-                                       # This is it, return the time
-                                       return $row->Time;
+                                       # This is it, return the time (except -ve)
+                                       if ( $row->Time > 1>>31 ) {
+                                               return 0;
+                                       } else {
+                                               return $row->Time;
+                                       }
                                }
                        }
                }