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 | 18526afc07fc65a844a302a7aa5dff75c2bd5b6a (patch) | |
tree | c7444917cfc9a7604c26bbf32e139ef2d415d9df /sql/item_strfunc.cc | |
parent | 2314183806e23e2c604b8c3f9752c04b8783bed1 (diff) | |
parent | 054bdbb43a8e2356450f0b606b6db4b6af17163b (diff) | |
download | mariadb-git-18526afc07fc65a844a302a7aa5dff75c2bd5b6a.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(), |