Remove 'LOW_PRIORITY' for non-mysql
authorDomas Mituzas <midom@users.mediawiki.org>
Wed, 9 Jun 2004 16:15:25 +0000 (16:15 +0000)
committerDomas Mituzas <midom@users.mediawiki.org>
Wed, 9 Jun 2004 16:15:25 +0000 (16:15 +0000)
includes/SearchUpdate.php
includes/SiteStatsUpdate.php
includes/ViewCountUpdate.php

index 08f66ea..adad91b 100644 (file)
@@ -1,4 +1,5 @@
 <?php
+# $Id$
 # See deferred.doc
 
 class SearchUpdate {
@@ -24,7 +25,7 @@ class SearchUpdate {
 
        function doUpdate()
        {
-               global $wgDBminWordLen, $wgLang, $wgDisableSearchUpdate;
+               global $wgDBminWordLen, $wgLang, $wgDisableSearchUpdate, $wgIsMySQL;
 
                if( $wgDisableSearchUpdate || !$this->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" );
index 4c4b32c..900956b 100644 (file)
@@ -1,4 +1,5 @@
 <?php
+# $Id$
 # See deferred.doc
 
 class SiteStatsUpdate {
@@ -14,6 +15,7 @@ class SiteStatsUpdate {
 
        function doUpdate()
        {
+               global $wgIsMySQL;
                $a = array();
 
                if ( $this->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" );
        }
index 84a0399..16976f1 100644 (file)
@@ -1,6 +1,6 @@
 <?php
+# $Id$
 # See deferred.doc
-
 class ViewCountUpdate {
 
        var $mPageID;
@@ -12,13 +12,12 @@ class ViewCountUpdate {
 
        function doUpdate()
        {
-               global $wgDisableCounters;
+               global $wgDisableCounters, $wgIsMySQL;
                if ( $wgDisableCounters ) { return; }
-
-               $sql = "UPDATE LOW_PRIORITY cur SET cur_counter=(1+cur_counter)," .
+               $lowpri=$wgIsMySQL?"LOW_PRIORITY":"";
+               $sql = "UPDATE $lowpri cur SET cur_counter=(1+cur_counter)," .
                  "cur_timestamp=cur_timestamp WHERE cur_id={$this->mPageID}";
                $res = wfQuery( $sql, DB_WRITE, "ViewCountUpdate::doUpdate" );
        }
 }
-
 ?>