From f0e11c2d1eecc8f071ce42ce45566ab60622fb5d Mon Sep 17 00:00:00 2001 From: Umherirrender Date: Sat, 20 Apr 2024 21:20:29 +0200 Subject: [PATCH] Migrate to IReadableDatabase::newSelectQueryBuilder Bug: T312469 Change-Id: I5774b8d0dc59df3404f26026b1aeeceeda413e13 --- maintenance/cleanup.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/maintenance/cleanup.php b/maintenance/cleanup.php index 8ec92925..162922d2 100644 --- a/maintenance/cleanup.php +++ b/maintenance/cleanup.php @@ -51,7 +51,11 @@ class Cleanup extends Maintenance { $dryRun = $this->hasOption( 'dry-run' ); $dbr = $this->getReplicaDB(); - $maxID = (int)$dbr->selectField( 'page', 'MAX(page_id)', [], __METHOD__ ); + $maxID = (int)$dbr->newSelectQueryBuilder() + ->select( 'MAX(page_id)' ) + ->from( 'page' ) + ->caller( __METHOD__ ) + ->fetchField(); $reportingInterval = 100; $this->output( "Regexes are " . implode( ', ', array_map( 'strlen', $regexes ) ) . " bytes\n" );