aboutsummaryrefslogtreecommitdiffstats
path: root/includes/SearchMySQL4.php
diff options
context:
space:
mode:
authorBrion Vibber <brion@users.mediawiki.org>2005-03-28 10:47:12 +0000
committerBrion Vibber <brion@users.mediawiki.org>2005-03-28 10:47:12 +0000
commit0b86f637f22416a54a6bd1e48a282826d7bc11cd (patch)
treea1703d3a453580813b3e44dcda94e666f8e2ac9d /includes/SearchMySQL4.php
parent96d2e151d9abef45e61f4558a6403cf64c0efa41 (diff)
downloadmediawikicore-0b86f637f22416a54a6bd1e48a282826d7bc11cd.tar.gz
mediawikicore-0b86f637f22416a54a6bd1e48a282826d7bc11cd.zip
Decouple revision.rev_id from text.old_id
* This will allow the backend text storage to use different id numbers * Revisions noting metadata changes can be added to history without duplicating text (implemented for page move) This changes the revision table schema and requires running update.php or maintenance/archives/patch-rev_text_id.sql on existing test wikis. PostgreSQL table defs are still not in sync, so not updated.
Notes
Notes: http://mediawiki.org/wiki/Special:Code/MediaWiki/7964
Diffstat (limited to 'includes/SearchMySQL4.php')
-rw-r--r--includes/SearchMySQL4.php9
1 files changed, 5 insertions, 4 deletions
diff --git a/includes/SearchMySQL4.php b/includes/SearchMySQL4.php
index 6847ac1d0a29..20bbfbcfc51d 100644
--- a/includes/SearchMySQL4.php
+++ b/includes/SearchMySQL4.php
@@ -81,12 +81,13 @@ class SearchMySQL4 extends SearchEngine {
/** @todo document */
function queryMain( $filteredTerm, $fulltext ) {
$match = $this->parseQuery( $filteredTerm, $fulltext );
- $page = $this->db->tableName( 'page' );
- $text = $this->db->tableName( 'text' );
+ $page = $this->db->tableName( 'page' );
+ $revision = $this->db->tableName( 'revision' );
+ $text = $this->db->tableName( 'text' );
$searchindex = $this->db->tableName( 'searchindex' );
return 'SELECT page_id, page_namespace, page_title, old_flags, old_text ' .
- "FROM $page,$text,$searchindex " .
- 'WHERE page_id=si_page AND page_latest=old_id AND ' . $match;
+ "FROM $page,$revision,$text,$searchindex " .
+ 'WHERE page_id=si_page AND page_latest=rev_id AND rev_text_id=old_id AND ' . $match;
}
/** @todo document */