Page MenuHomePhabricator

SiteStats code to avoid negative stats is broken
Closed, DuplicatePublic

Description

SiteStatsUpdate has code to try to stop stats from going negative, however it doesn't work.

Updating site stats...Wikimedia\Rdbms\DBQueryError from line 1230 of /vagrant/mediawiki/includes/libs/rdbms/database/Database.php: Error 1690: BIGINT UNSIGNED value is out of range in '`wiki`.`site_stats`.`ss_good_articles` - 1'
Function: MediaWiki\Deferred\SiteStatsUpdate::doUpdate
Query: UPDATE  `site_stats` SET ss_total_edits = GREATEST(`ss_total_edits`-1,0),ss_total_pages = GREATEST(`ss_total_pages`-1,0),ss_good_articles = GREATEST(`ss_good_articles`-1,0) WHERE ss_row_id = 1