From 80a4a131d1f380044da1aa073a90eadbf1f769dd Mon Sep 17 00:00:00 2001 From: Domas Mituzas Date: Wed, 9 Jun 2004 16:15:25 +0000 Subject: [PATCH] Remove 'LOW_PRIORITY' for non-mysql --- includes/SearchUpdate.php | 6 ++++-- includes/SiteStatsUpdate.php | 6 ++++-- includes/ViewCountUpdate.php | 9 ++++----- 3 files changed, 12 insertions(+), 9 deletions(-) diff --git a/includes/SearchUpdate.php b/includes/SearchUpdate.php index 08f66eab88..adad91bde4 100644 --- a/includes/SearchUpdate.php +++ b/includes/SearchUpdate.php @@ -1,4 +1,5 @@ mId ) { return false; @@ -32,7 +33,8 @@ class SearchUpdate { $lc = SearchEngine::legalSearchChars() . "&#;"; if( $this->mText == false ) { # Just update the title - $sql = "UPDATE LOW_PRIORITY searchindex SET si_title='" . + $lowpri=$wgIsMySQL?"LOW_PRIORITY":""; + $sql = "UPDATE $lowpri searchindex SET si_title='" . wfStrencode( Title::indexTitle( $this->mNamespace, $this->mTitle ) ) . "' WHERE si_page={$this->mId}"; wfQuery( $sql, DB_WRITE, "SearchUpdate::doUpdate" ); diff --git a/includes/SiteStatsUpdate.php b/includes/SiteStatsUpdate.php index 4c4b32cde0..900956b639 100644 --- a/includes/SiteStatsUpdate.php +++ b/includes/SiteStatsUpdate.php @@ -1,4 +1,5 @@ mViews < 0 ) { $m = "-1"; } @@ -30,8 +32,8 @@ class SiteStatsUpdate { else if ( $this->mGood > 0 ) { $m = "+1"; } else $m = ""; array_push( $a, "ss_good_articles=(ss_good_articles$m)" ); - - $sql = "UPDATE LOW_PRIORITY site_stats SET " . implode ( ",", $a ) . + $lowpri=$wgIsMySQL?"LOW_PRIORITY":""; + $sql = "UPDATE $lowpri site_stats SET " . implode ( ",", $a ) . " WHERE ss_row_id=1"; wfQuery( $sql, DB_WRITE, "SiteStatsUpdate::doUpdate" ); } diff --git a/includes/ViewCountUpdate.php b/includes/ViewCountUpdate.php index 84a03991f8..16976f11b0 100644 --- a/includes/ViewCountUpdate.php +++ b/includes/ViewCountUpdate.php @@ -1,6 +1,6 @@ mPageID}"; $res = wfQuery( $sql, DB_WRITE, "ViewCountUpdate::doUpdate" ); } } - ?> -- 2.20.1