Last modified: 2014-09-23 23:18:42 UTC
Per http://www.mediawiki.org/wiki/Requests_for_comment/Page_deletion, we want to move away from using the archive table. One thing that can be done right now to prep for that is to make sure revision queries join on rev_page=page_id to make sure the revisions returned are live (unless the caller doesn't care if they are orphaned). A future deletion schema will involve moving page rows to an archived_page table. Revisions not belonging to a 'page' row would be "deleted". Many places already JOIN on page, which works out nicely.
Core code looks OK as of r101030. It's OK to have: * JOIN rev_page=rev_id * WHERE rev_page = <some ID from a live title) * WHERE rev_id=page_latest
We still need to cover extensions.
Adding Yuvi to this bug since he said he'd take a look at this.
I may be better in most cases to do a LinkBatch query (e.g. Pager::doBatchLookups) rather than a JOIN in most places.