Index: trunk/phase3/includes/db/DatabaseMysql.php |
— | — | @@ -321,8 +321,11 @@ |
322 | 322 | return $this->mFakeSlaveLag; |
323 | 323 | } |
324 | 324 | $res = $this->query( 'SHOW PROCESSLIST', __METHOD__ ); |
| 325 | + if( !$res ) { |
| 326 | + return false; |
| 327 | + } |
325 | 328 | # Find slave SQL thread |
326 | | - while ( $row = $this->fetchObject( $res ) ) { |
| 329 | + foreach( $res as $row ) { |
327 | 330 | /* This should work for most situations - when default db |
328 | 331 | * for thread is not specified, it had no events executed, |
329 | 332 | * and therefore it doesn't know yet how lagged it is. |