Last modified: 2014-06-23 16:06:59 UTC
When upgrading from Mediawiki 1.15 to 1.21, running the update.php script produced the following output: ..... Populating rev_sha1 column ...doing rev_id from 1 to 200 Data of revision with rev_id=1 unavailable! Data of revision with rev_id=2 unavailable! Data of revision with rev_id=3 unavailable! Data of revision with rev_id=4 unavailable! Data of revision with rev_id=5 unavailable! Data of revision with rev_id=6 unavailable! ... and so on for every row in the table. It looks like a bug where populateRevisionSha1.php calls new Revision( $row ), and then calls $rev->getSerializedData(), but within the Revision object the mText field is still null. I fixed this (I think) by changing Revision.php, line 541 to be $this->mText = $this->loadText(); avoiding the lazy extraction. And then re-running the script using php populateRevisionSha1.php --force
Thanks for taking the time to report this and even providing a potential fix for mediawiki/core/includes/Revision.php !
Sounds like fixed with Gerrit change #77903
Yeah, I agree, this is the same bug my change fixed.