mirror of
https://github.com/MariaDB/server.git
synced 2026-05-02 21:25:36 +02:00
Merging from 5.1.
This commit is contained in:
commit
498a5bbc82
4 changed files with 34 additions and 9 deletions
|
|
@ -2959,22 +2959,16 @@ String *Item_func_conv_charset::val_str(String *str)
|
|||
DBUG_ASSERT(fixed == 1);
|
||||
if (use_cached_value)
|
||||
return null_value ? 0 : &str_value;
|
||||
/*
|
||||
Here we don't pass 'str' as a parameter to args[0]->val_str()
|
||||
as 'str' may point to 'str_value' (e.g. see Item::save_in_field()),
|
||||
which we use below to convert string.
|
||||
Use argument's 'str_value' instead.
|
||||
*/
|
||||
String *arg= args[0]->val_str(&args[0]->str_value);
|
||||
String *arg= args[0]->val_str(str);
|
||||
uint dummy_errors;
|
||||
if (!arg)
|
||||
{
|
||||
null_value=1;
|
||||
return 0;
|
||||
}
|
||||
null_value= str_value.copy(arg->ptr(),arg->length(),arg->charset(),
|
||||
null_value= tmp_value.copy(arg->ptr(), arg->length(), arg->charset(),
|
||||
conv_charset, &dummy_errors);
|
||||
return null_value ? 0 : check_well_formed_result(&str_value);
|
||||
return null_value ? 0 : check_well_formed_result(&tmp_value);
|
||||
}
|
||||
|
||||
void Item_func_conv_charset::fix_length_and_dec()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue