CRM-14811 - Add setting "enable_innodb_fts". Changes trigger InnoDBIndexer->fixSchema...
authorTim Otten <totten@civicrm.org>
Sat, 7 Jun 2014 01:32:24 +0000 (18:32 -0700)
committerTim Otten <totten@civicrm.org>
Sat, 7 Jun 2014 03:11:26 +0000 (20:11 -0700)
CRM/Core/InnoDBIndexer.php
settings/Core.setting.php

index a505feec538863b027f595f94a4c1047352d28d1..c9bc4c9af795467ce0ade63bb9cb8bfa2a8fe5bb 100644 (file)
@@ -59,7 +59,8 @@ class CRM_Core_InnoDBIndexer {
           array('name'),
         ),
       );
-      self::$singleton = new self(TRUE, $indices);
+      $active = CRM_Core_BAO_Setting::getItem(CRM_Core_BAO_Setting::SYSTEM_PREFERENCES_NAME, 'enable_innodb_fts', NULL, FALSE);
+      self::$singleton = new self($active, $indices);
     }
     return self::$singleton;
   }
index 556dad263c3aea9ae9d20ec6bc03da92320ad56f..d637664f830603e5d97dd036fa77fa4ce413dd0e 100644 (file)
@@ -714,4 +714,23 @@ When enabled, statistics about your CiviCRM installation are reported anonymousl
     'description' => 'When enabled, "empowered by CiviCRM" is displayed at the bottom of public forms.',
     'help_text' => null,
   ),
+  'enable_innodb_fts' => array(
+    'group_name' => 'CiviCRM Preferences',
+    'group' => 'core',
+    'name' => 'enable_innodb_fts',
+    'prefetch' => 0,
+    'config_only'=> 0,
+    'type' => 'Boolean',
+    'quick_form_type' => 'YesNo',
+    'default' => 0,
+    'add' => '4.4',
+    'title' => 'InnoDB Full Text Search',
+    'is_domain' => 1,
+    'is_contact' => 0,
+    'description' => "Enable InnoDB full-text search optimizations. (Requires MySQL 5.6+)",
+    'help_text' => null,
+    'on_change' => array(
+      array('CRM_Core_InnoDBIndexer', 'onToggleFts'),
+    ),
+  ),
 );