Last modified: 2014-09-23 23:18:42 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T33864, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 31864 - Make sure revision queries JOIN on page in most places
Make sure revision queries JOIN on page in most places
Status: NEW
Product: MediaWiki
Classification: Unclassified
Page deletion (Other open bugs)
unspecified
All All
: Normal normal (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2011-10-21 19:32 UTC by Aaron Schulz
Modified: 2014-09-23 23:18 UTC (History)
2 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Aaron Schulz 2011-10-21 19:32:44 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.
Comment 1 Aaron Schulz 2011-10-27 20:13:47 UTC
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
Comment 2 Sumana Harihareswara 2011-11-03 00:47:30 UTC
We still need to cover extensions.
Comment 3 Sumana Harihareswara 2011-12-01 21:53:00 UTC
Adding Yuvi to this bug since he said he'd take a look at this.
Comment 4 Aaron Schulz 2011-12-01 22:30:25 UTC
I may be better in most cases to do a LinkBatch query (e.g. Pager::doBatchLookups) rather than a JOIN in most places.

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links