-
Oystein Grovlen authored
MODE ( INNODB ONLY ) Unlike, MyISAM, InnoDB does not support Boolean full text search (FTS) on non-indexed columns. Before this fix, code allowed non-indexed columns in MATCH expression for BOOLEAN mode, but not for NATURAL LANGUAGE mode. This patch fixes this issue by restricting the exception for BOOLEAN mode to only apply to MyISAM and not to InnoDB. This is patch is a bit ad-hoc in the way it determines whether to allow non-indexed columns or not. It exploits the fact that InnoDB supports an extended FTS API, while MyISAM does not. In other words, non-indexed columns are only allowed if the storage engine does NOT support the extended FTS API. A side effect of this patch is that when reporting an error due to non-indexed columns in MATCH expression, we will no longer distinguish between tables without any fulltext indexes and tables with no applicable fulltext indexes. In the first case, the error used to be ER_TABLE_HAS_NO_FT. Now, one will get ER_FT_MATCHING_KEY_NOT_FOUND in both cases. This matches the existing behavior of NATURAL LANGUAGE mode for both InnoDB and MyISAM.
Oystein Grovlen authoredMODE ( INNODB ONLY ) Unlike, MyISAM, InnoDB does not support Boolean full text search (FTS) on non-indexed columns. Before this fix, code allowed non-indexed columns in MATCH expression for BOOLEAN mode, but not for NATURAL LANGUAGE mode. This patch fixes this issue by restricting the exception for BOOLEAN mode to only apply to MyISAM and not to InnoDB. This is patch is a bit ad-hoc in the way it determines whether to allow non-indexed columns or not. It exploits the fact that InnoDB supports an extended FTS API, while MyISAM does not. In other words, non-indexed columns are only allowed if the storage engine does NOT support the extended FTS API. A side effect of this patch is that when reporting an error due to non-indexed columns in MATCH expression, we will no longer distinguish between tables without any fulltext indexes and tables with no applicable fulltext indexes. In the first case, the error used to be ER_TABLE_HAS_NO_FT. Now, one will get ER_FT_MATCHING_KEY_NOT_FOUND in both cases. This matches the existing behavior of NATURAL LANGUAGE mode for both InnoDB and MyISAM.
Loading