From d0e45e17dd67918ceeed7a0b11cc8723a51ec28f Mon Sep 17 00:00:00 2001
From: Andreas Fischer <bantu@phpbb.com>
Date: Sat, 1 Jun 2013 04:09:33 +0200
Subject: [ticket/11583] Allow FULLTEXT indexes on InnoDB when on MySQL 5.6.4
 or higher.

PHPBB3-11583
---
 phpBB/includes/search/fulltext_mysql.php | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

(limited to 'phpBB/includes/search/fulltext_mysql.php')

diff --git a/phpBB/includes/search/fulltext_mysql.php b/phpBB/includes/search/fulltext_mysql.php
index bd4c003397..a2211bbe9b 100644
--- a/phpBB/includes/search/fulltext_mysql.php
+++ b/phpBB/includes/search/fulltext_mysql.php
@@ -86,7 +86,14 @@ class fulltext_mysql extends search_backend
 			$engine = $info['Type'];
 		}
 
-		if ($engine != 'MyISAM')
+		$fulltext_supported =
+			$engine === 'MyISAM' ||
+			// FULLTEXT is supported on InnoDB since MySQL 5.6.4 according to
+			// http://dev.mysql.com/doc/refman/5.6/en/innodb-storage-engine.html
+			$engine === 'InnoDB' &&
+			phpbb_version_compare($db->sql_server_info(true), '5.6.4', '>=');
+
+		if (!$fulltext_supported)
 		{
 			return $user->lang['FULLTEXT_MYSQL_NOT_MYISAM'];
 		}
-- 
cgit v1.2.1