If there are duplicate ar_rev_id (see T135851: Preserve InnoDB table auto_increment on restart), attempting to restore the second one will result in an error and the loss of the revision.
To reproduce:
- Create a page
- Delete it
- Restart MySQL server
- Create a page
- Delete it.
You will see a page with only "Error undeleting page".
The revision will be lost entirely, and if it was a single-revision page, you end up with inconsistent state, "Notice: Page <PAGE> exists but has no (visible) revisions!"
It should at least stay in the archive table.