Page MenuHomePhabricator

Regression: updateArticleCount.php --update option doesn't work
Closed, ResolvedPublic

Description

Looks like another regression in option processing; updateArticleCount is no longer recognizing the --update option which is required for it to actually save its udpates to the database:

$ php maintenance/updateArticleCount.php --update
Counting articles...found 60.
To update the site statistics table, run the script with the --update option.

This is blocking site maintenance such as request for count rebuild in bug 20998.


Version: unspecified
Severity: enhancement

Details

Reference
bz21006

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 21 2014, 10:48 PM
bzimport set Reference to bz21006.

overlordq wrote:

Swear I posted this in a bug already but cannot find it; the query itself is broken for PG.

Query: SELECT COUNT(DISTINCT page_namespace, page_title) AS pagecount FROM page, pagelinks WHERE pl_from=page_id and page_namespace IN ( 0 ) AND page_is_redirect = 0 AND page_len > 0
Function: UpdateArticleCount::count
Error: 1 ERROR: function count(smallint, text) does not exist
LINE 1: SELECT /* UpdateArticleCount::count */ COUNT(DISTINCT page_...

^

HINT: No function matches the given name and argument types. You might need to add explicit type casts.

Fixed Brion's bug in r57392.