Translations:Manual:PopulateParentId.php/5/en

The way it works now is that, after populateParentId.php selects the rows with null rev_parent_id, when it is dealing with a particular revision, first it checks for rows with the same $timestamp as that revision, that have with a smaller rev_id than that revision. The highest ID "wins". This avoids loops as the timestamp can only decrease and never loops with IDs (from parent to parent). If there are no rows with the same timestamp, then it uses the highest ID with a lower timestamp.