summaryrefslogtreecommitdiff
path: root/sql/item_func.cc
diff options
context:
space:
mode:
Diffstat (limited to 'sql/item_func.cc')
-rw-r--r--sql/item_func.cc8
1 files changed, 3 insertions, 5 deletions
diff --git a/sql/item_func.cc b/sql/item_func.cc
index 9a38fc60b0d..252ca9e504b 100644
--- a/sql/item_func.cc
+++ b/sql/item_func.cc
@@ -1,4 +1,4 @@
-/* Copyright (c) 2000, 2014, Oracle and/or its affiliates.
+/* Copyright (c) 2000, 2015, Oracle and/or its affiliates.
Copyright (c) 2009, 2015, MariaDB
This program is free software; you can redistribute it and/or modify
@@ -6280,9 +6280,7 @@ bool Item_func_match::fix_fields(THD *thd, Item **ref)
table= 0;
for (uint i=1 ; i < arg_count ; i++)
{
- item=args[i];
- if (item->type() == Item::REF_ITEM)
- args[i]= item= *((Item_ref *)item)->ref;
+ item= args[i]= args[i]->real_item();
/*
When running in PS mode, some Item_field's can already be replaced
to Item_func_conv_charset during PREPARE time. This is possible
@@ -6295,7 +6293,7 @@ bool Item_func_match::fix_fields(THD *thd, Item **ref)
if (!thd->stmt_arena->is_stmt_execute() &&
item->type() != Item::FIELD_ITEM)
{
- my_error(ER_WRONG_ARGUMENTS, MYF(0), "AGAINST");
+ my_error(ER_WRONG_ARGUMENTS, MYF(0), "MATCH");
return TRUE;
}
/*