From 73fda35eeff828fe3cd533bfc353fcb68693d4cd Mon Sep 17 00:00:00 2001 From: Rob Church Date: Mon, 4 Jun 2007 21:43:02 +0000 Subject: [PATCH] (bug 10104) Provide stub "getLag()" function for DatabaseOracle and DatabasePostgres --- RELEASE-NOTES | 1 + includes/DatabaseOracle.php | 11 ++++++++++- includes/DatabasePostgres.php | 11 ++++++++++- 3 files changed, 21 insertions(+), 2 deletions(-) diff --git a/RELEASE-NOTES b/RELEASE-NOTES index 933fc87b76..4271333c08 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -114,6 +114,7 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN set [now prints out a warning] * (bug 10118) Introduced Special:Mostlinkedtemplates, report which lists templates with a high number of inclusion links +* (bug 10104) Fixed Database::getLag() for PostgreSQL and Oracle == MediaWiki API changes since 1.10 == diff --git a/includes/DatabaseOracle.php b/includes/DatabaseOracle.php index 2b720df7ee..0e69909f80 100644 --- a/includes/DatabaseOracle.php +++ b/includes/DatabaseOracle.php @@ -675,10 +675,19 @@ echo "error!\n"; } function ping() { - wfDebug( "Function ping() not written for DatabasePostgres.php yet"); + wfDebug( "Function ping() not written for DatabaseOracle.php yet"); return true; } + /** + * How lagged is this slave? + * + * @return int + */ + public function getLag() { + # Not implemented for Oracle + return 0; + } } // end DatabaseOracle class diff --git a/includes/DatabasePostgres.php b/includes/DatabasePostgres.php index b5721db2b2..d5ae93cc54 100644 --- a/includes/DatabasePostgres.php +++ b/includes/DatabasePostgres.php @@ -1177,7 +1177,16 @@ END; wfDebug( "Function ping() not written for DatabasePostgres.php yet"); return true; } - + + /** + * How lagged is this slave? + * + * @return int + */ + public function getLag() { + # Not implemented for PostgreSQL + return 0; + } } // end DatabasePostgres class -- 2.20.1