summaryrefslogtreecommitdiff
path: root/sql/item_func.cc
diff options
context:
space:
mode:
authorChad MILLER <chad@mysql.com>2009-04-14 13:20:13 -0400
committerChad MILLER <chad@mysql.com>2009-04-14 13:20:13 -0400
commit14f923c0286588f9f391a2fda8b9fab5a4e2953c (patch)
tree55596b47965261462217616f8271d0c2b9d79ab0 /sql/item_func.cc
parent9d7f61dc698ee6b1dd379cc5820c59b8a9806c2d (diff)
parentbd2db28cdad7e715b9efcee2f440f432a0562e8f (diff)
downloadmariadb-git-14f923c0286588f9f391a2fda8b9fab5a4e2953c.tar.gz
Merge 5.0.80 release and 5.0 community. Version left at 5.0.80.
Diffstat (limited to 'sql/item_func.cc')
-rw-r--r--sql/item_func.cc18
1 files changed, 15 insertions, 3 deletions
diff --git a/sql/item_func.cc b/sql/item_func.cc
index 394556140c4..17700d0d23d 100644
--- a/sql/item_func.cc
+++ b/sql/item_func.cc
@@ -2758,7 +2758,7 @@ longlong Item_func_find_in_set::val_int()
if (is_last_item && !is_separator)
str_end= substr_end;
if (!my_strnncoll(cs, (const uchar *) str_begin,
- str_end - str_begin,
+ (uint) (str_end - str_begin),
find_str, find_str_len))
return (longlong) position;
else
@@ -4285,6 +4285,15 @@ my_decimal *Item_func_set_user_var::val_decimal_result(my_decimal *val)
}
+bool Item_func_set_user_var::is_null_result()
+{
+ DBUG_ASSERT(fixed == 1);
+ check(TRUE);
+ update(); // Store expression
+ return is_null();
+}
+
+
void Item_func_set_user_var::print(String *str)
{
str->append(STRING_WITH_LEN("(@"));
@@ -4783,7 +4792,7 @@ Item_func_get_system_var(sys_var *var_arg, enum_var_type var_type_arg,
:var(var_arg), var_type(var_type_arg), component(*component_arg)
{
/* set_name() will allocate the name */
- set_name(name_arg, name_len_arg, system_charset_info);
+ set_name(name_arg, (uint) name_len_arg, system_charset_info);
}
@@ -4952,7 +4961,10 @@ bool Item_func_match::fix_fields(THD *thd, Item **ref)
if (item->type() == Item::REF_ITEM)
args[i]= item= *((Item_ref *)item)->ref;
if (item->type() != Item::FIELD_ITEM)
- key=NO_SUCH_KEY;
+ {
+ my_error(ER_WRONG_ARGUMENTS, MYF(0), "AGAINST");
+ return TRUE;
+ }
}
/*
Check that all columns come from the same table.