Commit 7cac7d8c authored by Annamalai Gurusami's avatar Annamalai Gurusami

Merge from mysql-5.1 to mysql-5.5

parents 45f176ef 31413eef
...@@ -225,13 +225,23 @@ class set_var :public set_var_base ...@@ -225,13 +225,23 @@ class set_var :public set_var_base
if (value_arg && value_arg->type() == Item::FIELD_ITEM) if (value_arg && value_arg->type() == Item::FIELD_ITEM)
{ {
Item_field *item= (Item_field*) value_arg; Item_field *item= (Item_field*) value_arg;
if (!(value=new Item_string(item->field_name, if (item->field_name)
(uint) strlen(item->field_name), {
system_charset_info))) // names are utf8 if (!(value= new Item_string(item->field_name,
value=value_arg; /* Give error message later */ (uint) strlen(item->field_name),
system_charset_info))) // names are utf8
value= value_arg; /* Give error message later */
}
else
{
/* Both Item_field and Item_insert_value will return the type as
Item::FIELD_ITEM. If the item->field_name is NULL, we assume the
object to be Item_insert_value. */
value= value_arg;
}
} }
else else
value=value_arg; value= value_arg;
} }
int check(THD *thd); int check(THD *thd);
int update(THD *thd); int update(THD *thd);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment