From f3103b87ca1719c70210252fe620696086310209 Mon Sep 17 00:00:00 2001 From: Tim Otten Date: Fri, 6 Jun 2014 20:10:49 -0700 Subject: [PATCH] CRM-14811 - Check "enable_innodb_fts" during upgrades --- CRM/Upgrade/Incremental/Legacy.php | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/CRM/Upgrade/Incremental/Legacy.php b/CRM/Upgrade/Incremental/Legacy.php index c6e1da861e..e489ce0d05 100644 --- a/CRM/Upgrade/Incremental/Legacy.php +++ b/CRM/Upgrade/Incremental/Legacy.php @@ -110,6 +110,19 @@ SELECT id )); } } + + if (CRM_Core_BAO_Setting::getItem(CRM_Core_BAO_Setting::SYSTEM_PREFERENCES_NAME, 'enable_innodb_fts', NULL, FALSE)) { + // The FTS indexing feature dynamically manipulates the schema which could + // cause conflicts with other layers that manipulate the schema. The + // simplest thing is to turn it off and back on. + + // It may not always be necessary to do this -- but I doubt we're going to test + // systematically in future releases. When it is necessary, one could probably + // ignore the matter and simply run CRM_Core_InnoDBIndexer::fixSchemaDifferences + // after the upgrade. But that's speculative. For now, we'll leave this + // advanced feature in the hands of the sysadmin. + $preUpgradeMessage .= '
' . ts('This database uses InnoDB Full Text Search for optimized searching. The upgrade procedure has not been tested with this feature. You should disable (and later re-enable) the feature by navigating to "Administer => System Settings => Miscellaneous".'); + } } /** -- 2.25.1