mirror of
https://github.com/MariaDB/server.git
synced 2025-01-20 05:52:27 +01:00
backport #41437, commit 62803
This commit is contained in:
parent
20776a68d2
commit
1d3f040c8c
3 changed files with 13 additions and 0 deletions
|
@ -180,4 +180,6 @@ ERROR at line 1: DELIMITER cannot contain a backslash character
|
|||
1
|
||||
This is a file starting with UTF8 BOM 0xEFBBBF
|
||||
This is a file starting with UTF8 BOM 0xEFBBBF
|
||||
@z:='1' @z=database()
|
||||
1 NULL
|
||||
End of 5.0 tests
|
||||
|
|
|
@ -290,4 +290,9 @@ EOF
|
|||
--exec $MYSQL < $MYSQLTEST_VARDIR/tmp/bug29323.sql 2>&1
|
||||
remove_file $MYSQLTEST_VARDIR/tmp/bug29323.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(),
|
||||
|
|
Loading…
Reference in a new issue