phpBB

Code Changes

File: phpbb/search/fulltext_mysql.php

  Unmodified   Added   Modified   Removed
Line 173Line 173
			$engine = $info['Type'];
}


			$engine = $info['Type'];
}


		$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
// We also require https://bugs.mysql.com/bug.php?id=67004 to be
// fixed for proper overall operation. Hence we require 5.6.8.
$engine === 'InnoDB' &&
phpbb_version_compare($this->db->sql_server_info(true), '5.6.8', '>=');


		$fulltext_supported = $engine === 'Aria' || $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
* We also require https://bugs.mysql.com/bug.php?id=67004 to be
* fixed for proper overall operation. Hence we require 5.6.8.
*/
|| $engine === 'InnoDB'
&& phpbb_version_compare($this->db->sql_server_info(true), '5.6.8', '>=');


if (!$fulltext_supported)
{


if (!$fulltext_supported)
{

Line 188Line 189
		}

$sql = 'SHOW VARIABLES

		}

$sql = 'SHOW VARIABLES

			LIKE \'ft\_%\'';

			LIKE \'%ft\_%\'';

		$result = $this->db->sql_query($sql);

$mysql_info = array();

		$result = $this->db->sql_query($sql);

$mysql_info = array();

Line 198Line 199
		}
$this->db->sql_freeresult($result);


		}
$this->db->sql_freeresult($result);


 
		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']);

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


return false;
}