X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=CRM%2FCore%2FInnoDBIndexer.php;h=5f880e1d2b21e7541f2d9b829f2051f34b761bce;hb=a13f3d8c01e114b11c381b6ac3e64becae9380b1;hp=fca34148b098f57cfdac8604de3bd9bfbc45e232;hpb=61101c0139a33917f1220f3e970b7c1293f34449;p=civicrm-core.git diff --git a/CRM/Core/InnoDBIndexer.php b/CRM/Core/InnoDBIndexer.php index fca34148b0..5f880e1d2b 100644 --- a/CRM/Core/InnoDBIndexer.php +++ b/CRM/Core/InnoDBIndexer.php @@ -1,7 +1,7 @@ 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 @@ -254,7 +263,7 @@ class CRM_Core_InnoDBIndexer { } /** - * @param boolean $isActive + * @param bool $isActive */ public function setActive($isActive) { $this->isActive = $isActive;