dépôts
/
lhc
/
web
/
wiklou.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
979508b
)
Sanity check on result from SHOW PROCESSLIST, foreach -> while (sorta followup to...
author
Chad Horohoe
<demon@users.mediawiki.org>
Tue, 28 Sep 2010 11:39:10 +0000
(11:39 +0000)
committer
Chad Horohoe
<demon@users.mediawiki.org>
Tue, 28 Sep 2010 11:39:10 +0000
(11:39 +0000)
includes/db/DatabaseMysql.php
patch
|
blob
|
history
diff --git
a/includes/db/DatabaseMysql.php
b/includes/db/DatabaseMysql.php
index
afcaa2c
..
041ebd1
100644
(file)
--- a/
includes/db/DatabaseMysql.php
+++ b/
includes/db/DatabaseMysql.php
@@
-321,8
+321,11
@@
class DatabaseMysql extends DatabaseBase {
return $this->mFakeSlaveLag;
}
$res = $this->query( 'SHOW PROCESSLIST', __METHOD__ );
+ if( !$res ) {
+ return false;
+ }
# Find slave SQL thread
-
while ( $row = $this->fetchObject( $res )
) {
+
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.