mirror of
https://github.com/MariaDB/server.git
synced 2025-08-09 22:24:09 +03:00
main.ctype_ucs2 --ps: Item_func_nullif should use m_args0_copy metadata
in case args[0] changes between PREPARE and EXECUTE
This commit is contained in:
@@ -2751,20 +2751,20 @@ bool Item_func_if::date_op(MYSQL_TIME *ltime, uint fuzzydate)
|
|||||||
void
|
void
|
||||||
Item_func_nullif::fix_length_and_dec()
|
Item_func_nullif::fix_length_and_dec()
|
||||||
{
|
{
|
||||||
if (!args[0]) // Only false if EOM
|
if (!m_args0_copy) // Only false if EOM
|
||||||
return;
|
return;
|
||||||
|
|
||||||
cached_result_type= args[0]->result_type();
|
cached_result_type= m_args0_copy->result_type();
|
||||||
cached_field_type= args[0]->field_type();
|
cached_field_type= m_args0_copy->field_type();
|
||||||
collation.set(args[0]->collation);
|
collation.set(m_args0_copy->collation);
|
||||||
decimals= args[0]->decimals;
|
decimals= m_args0_copy->decimals;
|
||||||
unsigned_flag= args[0]->unsigned_flag;
|
unsigned_flag= m_args0_copy->unsigned_flag;
|
||||||
fix_char_length(args[0]->max_char_length());
|
fix_char_length(m_args0_copy->max_char_length());
|
||||||
|
|
||||||
convert_const_compared_to_int_field(current_thd);
|
convert_const_compared_to_int_field(current_thd);
|
||||||
args[0]->cmp_context= args[1]->cmp_context=
|
m_args0_copy->cmp_context= args[1]->cmp_context=
|
||||||
item_cmp_type(args[0]->result_type(), args[1]->result_type());
|
item_cmp_type(m_args0_copy->result_type(), args[1]->result_type());
|
||||||
cmp.set_cmp_func(this, tmp_arg, tmp_arg + 1, args[0]->cmp_context);
|
cmp.set_cmp_func(this, tmp_arg, tmp_arg + 1, m_args0_copy->cmp_context);
|
||||||
maybe_null=1;
|
maybe_null=1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user