1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-03-13 20:28:44 +01:00

Merge pull request #5626 from cpeel/ticket/16096

[ticket/16096] Use InnoDB fulltext limits for InnoDB tables
This commit is contained in:
Marc Alexander 2019-07-27 16:18:37 +02:00
commit 79bcb20ac5
No known key found for this signature in database
GPG Key ID: 50E0D2423696F995

View File

@ -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;
}