diff options
author | Georgi Kodinov <joro@sun.com> | 2009-01-09 19:51:52 +0200 |
---|---|---|
committer | Georgi Kodinov <joro@sun.com> | 2009-01-09 19:51:52 +0200 |
commit | d09185fafa598e87eb6015d8132435d0611155b0 (patch) | |
tree | c7444917cfc9a7604c26bbf32e139ef2d415d9df /sql/item_strfunc.cc | |
parent | fffe666f6d453460b88607e1a99749f9d1647a8d (diff) | |
parent | af0e03b2622f2213d512bf5e11aecaaf401531fb (diff) | |
download | mariadb-git-d09185fafa598e87eb6015d8132435d0611155b0.tar.gz |
merged 41437 to 5.1-bugteam
Diffstat (limited to 'sql/item_strfunc.cc')
-rw-r--r-- | sql/item_strfunc.cc | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/sql/item_strfunc.cc b/sql/item_strfunc.cc index bb3f4821c4f..fc9375e68a5 100644 --- a/sql/item_strfunc.cc +++ b/sql/item_strfunc.cc @@ -1782,6 +1782,12 @@ Item *Item_func_sysconst::safe_charset_converter(CHARSET_INFO *tocs) Item_string *conv; uint conv_errors; String tmp, cstr, *ostr= val_str(&tmp); + if (null_value) + { + Item *null_item= new Item_null((char *) fully_qualified_func_name()); + null_item->collation.set (tocs); + return null_item; + } cstr.copy(ostr->ptr(), ostr->length(), ostr->charset(), tocs, &conv_errors); if (conv_errors || !(conv= new Item_static_string_func(fully_qualified_func_name(), |