From: Domas Mituzas Date: Sat, 25 Feb 2006 13:47:11 +0000 (+0000) Subject: allow to disable schema checks - those acquire giant locks on table opens.. X-Git-Tag: 1.6.0~276 X-Git-Url: http://git.cyclocoop.org/%24image?a=commitdiff_plain;h=433ded5bda7adf5a131da54dd9d570a27eeed029;p=lhc%2Fweb%2Fwiklou.git allow to disable schema checks - those acquire giant locks on table opens.. --- diff --git a/includes/DefaultSettings.php b/includes/DefaultSettings.php index ddbd9cc261..c99bbd7a5a 100644 --- a/includes/DefaultSettings.php +++ b/includes/DefaultSettings.php @@ -432,6 +432,8 @@ $wgDBprefix = ''; $wgDBschema = 'mediawiki'; /**#@-*/ +/** Live high performance sites should disable this - some checks acquire giant mysql locks */ +$wgCheckDBSchema = true; /** diff --git a/includes/Image.php b/includes/Image.php index 8d62b2faa0..96e892fc2f 100644 --- a/includes/Image.php +++ b/includes/Image.php @@ -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' );