aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/phpbb
diff options
context:
space:
mode:
authorMarc Alexander <admin@m-a-styles.de>2019-07-27 16:18:37 +0200
committerMarc Alexander <admin@m-a-styles.de>2019-07-27 16:18:37 +0200
commit79bcb20ac53ab76e6a3590651a6598e95b64e25f (patch)
treef21643aea023c0521fdc618b1f8e6f4d8dfe5c85 /phpBB/phpbb
parentd06e9745c2091c6b3bb8ab084cc4d9672071c78d (diff)
parente33e5727413543c74b3ede43ad437bb261c72839 (diff)
downloadforums-79bcb20ac53ab76e6a3590651a6598e95b64e25f.tar
forums-79bcb20ac53ab76e6a3590651a6598e95b64e25f.tar.gz
forums-79bcb20ac53ab76e6a3590651a6598e95b64e25f.tar.bz2
forums-79bcb20ac53ab76e6a3590651a6598e95b64e25f.tar.xz
forums-79bcb20ac53ab76e6a3590651a6598e95b64e25f.zip
Merge pull request #5626 from cpeel/ticket/16096
[ticket/16096] Use InnoDB fulltext limits for InnoDB tables
Diffstat (limited to 'phpBB/phpbb')
-rw-r--r--phpBB/phpbb/search/fulltext_mysql.php14
1 files changed, 11 insertions, 3 deletions
diff --git a/phpBB/phpbb/search/fulltext_mysql.php b/phpBB/phpbb/search/fulltext_mysql.php
index 137ed7433d..1105d0892f 100644
--- a/phpBB/phpbb/search/fulltext_mysql.php
+++ b/phpBB/phpbb/search/fulltext_mysql.php
@@ -188,7 +188,7 @@ class fulltext_mysql extends \phpbb\search\base
}
$sql = 'SHOW VARIABLES
- LIKE \'ft\_%\'';
+ LIKE \'%ft\_%\'';
$result = $this->db->sql_query($sql);
$mysql_info = array();
@@ -198,8 +198,16 @@ class fulltext_mysql extends \phpbb\search\base
}
$this->db->sql_freeresult($result);
- $this->config->set('fulltext_mysql_max_word_len', $mysql_info['ft_max_word_len']);
- $this->config->set('fulltext_mysql_min_word_len', $mysql_info['ft_min_word_len']);
+ if ($engine === 'MyISAM')
+ {
+ $this->config->set('fulltext_mysql_max_word_len', $mysql_info['ft_max_word_len']);
+ $this->config->set('fulltext_mysql_min_word_len', $mysql_info['ft_min_word_len']);
+ }
+ else if ($engine === 'InnoDB')
+ {
+ $this->config->set('fulltext_mysql_max_word_len', $mysql_info['innodb_ft_max_token_size']);
+ $this->config->set('fulltext_mysql_min_word_len', $mysql_info['innodb_ft_min_token_size']);
+ }
return false;
}