From dde92015b0c9000221e606807b909a1e297a0c31 Mon Sep 17 00:00:00 2001 From: "totten@civicrm.org" Date: Wed, 25 Jun 2014 17:37:08 -0700 Subject: [PATCH] CRM_Core_InnoDBIndexer - Fix (logged) drush error when doing clean install on MySQL <5.6. --- CRM/Core/InnoDBIndexer.php | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/CRM/Core/InnoDBIndexer.php b/CRM/Core/InnoDBIndexer.php index fca34148b0..abe15f8edc 100644 --- a/CRM/Core/InnoDBIndexer.php +++ b/CRM/Core/InnoDBIndexer.php @@ -156,6 +156,13 @@ class CRM_Core_InnoDBIndexer { * @return array (string $indexName => string $indexName) */ public function findActualFtsIndexNames($table) { + $mysqlVersion = CRM_Core_DAO::singleValueQuery('SELECT VERSION()'); + if (version_compare($mysqlVersion, '5.6', '<')) { + // If we're not on 5.6+, then there cannot be any InnoDB FTS indices! + // Also: information_schema.innodb_sys_indexes is only available on 5.6+. + return array(); + } + // Note: this only works in MySQL 5.6, but this whole system is intended to only work in MySQL 5.6 $sql = " SELECT i.name as index_name -- 2.25.1