Page MenuHomePhabricator

update.php for MW 1.10.0 doesn't completely update the DB
Closed, ResolvedPublic

Description

Author: MediaWiki

Description:
The new page_restrictions table in MediaWiki 1.10.0 brings a lot of new
features, but the update.php script included with the new version doesn't
completely update the page restrictions. Moving the restrictions from the page
table to page_restrictions makes them unlistable in Special:Protectedpages
unless all the migrated entries have the NULL default value in the pr_expiry
column changed to "infinity" or some other expiry date. The update script should
do this automatically, or the column should be set to default to "infinity"
instead of NULL.


Version: 1.10.x
Severity: normal

Details

Reference
bz9882

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 21 2014, 9:39 PM
bzimport set Reference to bz9882.
bzimport added a subscriber: Unknown Object (MLST).

The updater.inc script does use 'infinity' as the pr_expiry value, as does
updateRestrictions.php

Ok, /trunk does, I see 1.10 is still behind there.

MediaWiki wrote:

I actually ran both scripts from the Windows command line (cmd.exe), using the
commands 'php update.php' and 'php updateRestrictions.php' in the
C:\apache\htdocs\w\maintenance directory, where MediaWiki maintenance scripts
are stored. I ended up changing the few protected rows manually with phpMyAdmin,
but I have a small wiki with less than 20 protected pages (currently), and it's
only on my computer. Still, for larger wikis, this could be a problem. Will this
be changed in the next release (1.10.1)?

The default NULL value should be perfectly fine here.

Why, exactly, would it be a problem?

MediaWiki wrote:

(In reply to comment #4)

The default NULL value should be perfectly fine here.

Why, exactly, would it be a problem?

I tried using the default after upgrading and none of the protected pages showed up in the list. It was old entries that were messed up; new protections made in MW 1.10.0 were just fine.

The update script was changed. Also, the GROUP BY clause was removed. Both would solve this problem.

*** Bug 10700 has been marked as a duplicate of this bug. ***