summaryrefslogtreecommitdiff
path: root/sql
diff options
context:
space:
mode:
Diffstat (limited to 'sql')
-rw-r--r--sql/item_func.cc14
1 files changed, 14 insertions, 0 deletions
diff --git a/sql/item_func.cc b/sql/item_func.cc
index d832bdac6e3..39c05d63150 100644
--- a/sql/item_func.cc
+++ b/sql/item_func.cc
@@ -5790,6 +5790,13 @@ void Item_func_match::init_search(bool no_order)
{
DBUG_ENTER("Item_func_match::init_search");
+ /*
+ We will skip execution if the item is not fixed
+ with fix_field
+ */
+ if (!fixed)
+ DBUG_VOID_RETURN;
+
/* Check if init_search() has been called before */
if (ft_handler)
{
@@ -5920,6 +5927,13 @@ bool Item_func_match::fix_index()
uint ft_to_key[MAX_KEY], ft_cnt[MAX_KEY], fts=0, keynr;
uint max_cnt=0, mkeys=0, i;
+ /*
+ We will skip execution if the item is not fixed
+ with fix_field
+ */
+ if (!fixed)
+ return false;
+
if (key == NO_SUCH_KEY)
return 0;