MDEV-35596 Assertion `type_handler()->result_type() ==
value.type_handler()->result_type()' failed in virtual bool Item_param::get_date(THD*, MYSQL_TIME*, date_mode_t) This is a cleanup for MDEV-25593. When binding from NULL, IGNORE or DEFAULT, value.type_handler should be set to &type_handler_null, to satisfy the DBUG_ASSERT in Item_param::get_date().
This commit is contained in:
parent
0d35fe6e57
commit
14f42e12a4
@ -4168,6 +4168,7 @@ void Item_param::set_null()
|
||||
max_length= 0;
|
||||
decimals= 0;
|
||||
state= NULL_VALUE;
|
||||
value.set_handler(&type_handler_null);
|
||||
DBUG_VOID_RETURN;
|
||||
}
|
||||
|
||||
@ -4981,7 +4982,10 @@ void Item_param::set_default(bool set_type_handler_null)
|
||||
*/
|
||||
null_value= true;
|
||||
if (set_type_handler_null)
|
||||
{
|
||||
value.set_handler(&type_handler_null);
|
||||
set_handler(&type_handler_null);
|
||||
}
|
||||
}
|
||||
|
||||
void Item_param::set_ignore(bool set_type_handler_null)
|
||||
@ -4990,7 +4994,10 @@ void Item_param::set_ignore(bool set_type_handler_null)
|
||||
state= IGNORE_VALUE;
|
||||
null_value= true;
|
||||
if (set_type_handler_null)
|
||||
{
|
||||
value.set_handler(&type_handler_null);
|
||||
set_handler(&type_handler_null);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
x
Reference in New Issue
Block a user