summaryrefslogtreecommitdiff
path: root/sql/item_strfunc.cc
diff options
context:
space:
mode:
authorMartin Hansson <mhansson@mysql.com>2009-06-16 16:36:15 +0200
committerMartin Hansson <mhansson@mysql.com>2009-06-16 16:36:15 +0200
commitacc642c87cb7abb0ff49996ec2f7eda0bc969493 (patch)
tree4e202e6d5e7d51dc49fb2e560a3ccd568144b324 /sql/item_strfunc.cc
parenteecf06873e1a9448dea86f3cf9ff79738d93d556 (diff)
downloadmariadb-git-acc642c87cb7abb0ff49996ec2f7eda0bc969493.tar.gz
Bug#45168: assertion with convert() and empty set value
The assertion in String::copy was added in order to avoid valgrind errors when the destination was the same as the source. Eased restriction to allow for the case when str == NULL.
Diffstat (limited to 'sql/item_strfunc.cc')
-rw-r--r--sql/item_strfunc.cc5
1 files changed, 2 insertions, 3 deletions
diff --git a/sql/item_strfunc.cc b/sql/item_strfunc.cc
index 2d580e4d9a8..be94f19f597 100644
--- a/sql/item_strfunc.cc
+++ b/sql/item_strfunc.cc
@@ -2710,13 +2710,12 @@ String *Item_func_conv_charset::val_str(String *str)
return null_value ? 0 : &str_value;
/*
Here we don't pass 'str' as a parameter to args[0]->val_str()
- as 'str' may points to 'str_value' (e.g. see Item::save_in_field()),
+ as 'str' may point to 'str_value' (e.g. see Item::save_in_field()),
which we use below to convert string.
Use argument's 'str_value' instead.
*/
- String *arg= args[0]->val_str(&args[0]->str_value);;
+ String *arg= args[0]->val_str(&args[0]->str_value);
uint dummy_errors;
- arg= args[0]->val_str(&args[0]->str_value);
if (!arg)
{
null_value=1;