HomePhabricator

PopulateContentTables: compute sha1 and length if needed.
5b3d823078cdUnpublished

Unpublished Commit · Learn More

  • Publishing Disabled: All publishing is disabled for this repository.
  • Not On Permanent Ref: This commit is not an ancestor of any permanent ref.

Description

PopulateContentTables: compute sha1 and length if needed.

PopulateContentTables tries to copy rev_sha1 to content_sha1 and rev_len
to content_size, but when updating directly from on old version of
MediaWiki, these fields may be empty or NULL. To ensure that the content
table gets the correct value, we have to compute them on the fly.

Note that PopulateRevisionSha1 runs *after* the normal database updates.
So even though it was introduced in 1.19, it will run after the schema
updates for 1.32, which include PopulateContentTables. This means that
PopulateContentTables can't rely on rev_sha1 to have been filled in
already. But per I0c22286a16d7b, it also means that PopulateRevisionSha1
can make use of the hash in content_sha1 instead of re-calculating.

Bug: T217831
Bug: T200653
Change-Id: I69e91a812ad5f038562220b02c3634589667cdb6

Details

Provenance
danielAuthored on Jul 4 2019, 11:54 AM
ReedyCommitted on Oct 10 2019, 9:31 PM
Parents
rMW94d585810daa: Start RELEASE-NOTES for 1.33.2
Branches
Unknown
Tags
Unknown
ChangeId
I69e91a812ad5f038562220b02c3634589667cdb6