Split from T239083, which has more details. Relevant repro steps:
- Find a page with at least 3000 revisions
- Delete it
- Go to Special:Undelete/Name_of_the_page
- Select all revisions [but the last 30ish] -- not sure if unselecting some revisions is necessary.
- Hit "Restore"
- If you get a DB error (T239095), start again from (3.) until it succeeds
Observed: Only some revisions are restored. In the specific example of T239083, everything before 2012 wasn't restored (note, I don't think the date is relevant, it's just the amount of revisions in between).