diff options
author | evgen@moonbone.local <> | 2007-01-11 16:45:38 +0300 |
---|---|---|
committer | evgen@moonbone.local <> | 2007-01-11 16:45:38 +0300 |
commit | fc0e206cb538d622abf1854a50a14836ac275b74 (patch) | |
tree | 34f917f8b95414b540f86d33b2f29d88a5c28feb /sql/item_strfunc.cc | |
parent | f35e10d43ca61eff7631d9ba95a4d9c4012f40b0 (diff) | |
download | mariadb-git-fc0e206cb538d622abf1854a50a14836ac275b74.tar.gz |
Bug#23409: Arguments of the ENCODE() and the DECODE() functions were not printed
correctly.
The Item_func::print method was used to print the Item_func_encode and the
Item_func_decode objects. The last argument to ENCODE and DECODE functions
is a plain C string and thus Item_func::print wasn't able to print it.
The print() method is added to the Item_func_encode class. It correctly
prints the Item_func_encode and the Item_func_decode objects.
Diffstat (limited to 'sql/item_strfunc.cc')
-rw-r--r-- | sql/item_strfunc.cc | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/sql/item_strfunc.cc b/sql/item_strfunc.cc index f7408cb5e9f..7c98f0c6380 100644 --- a/sql/item_strfunc.cc +++ b/sql/item_strfunc.cc @@ -1583,6 +1583,19 @@ String *Item_func_encode::val_str(String *str) return res; } +void Item_func_encode::print(String *str) +{ + str->append(func_name()); + str->append('('); + args[0]->print(str); + str->append(','); + str->append('\''); + str->append(seed); + str->append('\''); + str->append(')'); +} + + String *Item_func_decode::val_str(String *str) { DBUG_ASSERT(fixed == 1); |