I have the below code to query if mysql supports full text searching for innodb.
I am just wondering if there are any permissions that can can cause information_schema.GLOBAL_VARIABLES to not be available?
Is there a better way to find out if the database supports full text? I have tried this on a couple shared servers. I am just wondering if there are any odd setups where this won't work or cause a fatal query error.
function supports_full_text()
{
$result = $this->db->query("SELECT COUNT(*) as count FROM information_schema.GLOBAL_VARIABLES WHERE Variable_name = 'innodb_ft_cache_size'");
return $result->row()->count > 0;
}
Full-text searches are supported for InnoDB and MyISAM tables only. FULLTEXT index support for InnoDB tables requires MySQL 5.6.4 or higher.
5.6> supports fulltext search for InnoDB. One of the big pushes to 5.6 was so that tables that were MyISAM in prior versions 5.5< could be converted to InnoDB in order to completely move away from MyISAM.