allow to disable schema checks - those acquire giant locks on table opens..
authorDomas Mituzas <midom@users.mediawiki.org>
Sat, 25 Feb 2006 13:47:11 +0000 (13:47 +0000)
committerDomas Mituzas <midom@users.mediawiki.org>
Sat, 25 Feb 2006 13:47:11 +0000 (13:47 +0000)
includes/DefaultSettings.php
includes/Image.php

index ddbd9cc..c99bbd7 100644 (file)
@@ -432,6 +432,8 @@ $wgDBprefix         = '';
 $wgDBschema        = 'mediawiki';
 /**#@-*/
 
+/** Live high performance sites should disable this - some checks acquire giant mysql locks */
+$wgCheckDBSchema = true;
 
 
 /**
index 8d62b2f..96e892f 100644 (file)
@@ -1244,6 +1244,10 @@ class Image
        }
 
        function checkDBSchema(&$db) {
+                global $wgCheckDBSchema;
+               if (!$wgCheckDBSchema) {
+                       return;
+               }
                # img_name must be unique
                if ( !$db->indexUnique( 'image', 'img_name' ) && !$db->indexExists('image','PRIMARY') ) {
                        wfDebugDieBacktrace( 'Database schema not up to date, please run maintenance/archives/patch-image_name_unique.sql' );