When a RevisionArchiveRecord is created from an archive table row, it is incorrectly interpreting a null value for ar_len as 0 rather than as "I need to calculate the size".
When the RevisionArchiveRecord is used for undeletion, this results in the rev_len of the restored row incorrectly being 0.
- Fix RevisionArchiveRecord
- Update maintenance/populateRevisionLength.php for MCR and to account for this bug (and possibly merge it with populateRevisionSha1.php). Instead of only updating rows with null length, it should also update rows with 0 length and sha1 != 'phoiac9h4m842xq45sp7s6u21eteeq1'.
- Run the updated populateRevisionLength.php.
Original report:
In the history of Wikipedia:Historical archive/Template:Substub, the revisions prior to 25 September 2005 as well as the moves by Graham87 are incorrectly shown as being empty. We need to fix the sizes (the rev_len fields) for those revisions. Also, to prevent this from ever happening again, we need to fix the ar_len fields for revisions deleted prior to MediaWiki 1.5, which now have ar_text_id and ar_rev_id fields per T36925 and T182678.