Commit 2048bd71 authored by Tatiana A. Nurnberg's avatar Tatiana A. Nurnberg

auto-merge

parents bbb6d2d0 06b3e7e2
......@@ -1344,7 +1344,7 @@ int diff_check()
{
char buf[512]= {0};
FILE *res_file;
char *cmd = "diff -v";
const char *cmd = "diff -v";
int have_diff = 0;
if (!(res_file= popen(cmd, "r")))
......
......@@ -186,4 +186,6 @@ delimiter
2
2
2
@z:='1' @z=database()
1 NULL
End of 5.0 tests
......@@ -309,4 +309,9 @@ EOF
--exec $MYSQL -c < $MYSQLTEST_VARDIR/tmp/bug38158.sql 2>&1
remove_file $MYSQLTEST_VARDIR/tmp/bug38158.sql;
#
# Bug #41437: Value stored in 'case' lacks charset, causees segfault
#
--exec $MYSQL -e "select @z:='1',@z=database()"
--echo End of 5.0 tests
......@@ -1696,6 +1696,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(),
......
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