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;
|
max_length= 0;
|
||||||
decimals= 0;
|
decimals= 0;
|
||||||
state= NULL_VALUE;
|
state= NULL_VALUE;
|
||||||
|
value.set_handler(&type_handler_null);
|
||||||
DBUG_VOID_RETURN;
|
DBUG_VOID_RETURN;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -4981,8 +4982,11 @@ void Item_param::set_default(bool set_type_handler_null)
|
|||||||
*/
|
*/
|
||||||
null_value= true;
|
null_value= true;
|
||||||
if (set_type_handler_null)
|
if (set_type_handler_null)
|
||||||
|
{
|
||||||
|
value.set_handler(&type_handler_null);
|
||||||
set_handler(&type_handler_null);
|
set_handler(&type_handler_null);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void Item_param::set_ignore(bool set_type_handler_null)
|
void Item_param::set_ignore(bool set_type_handler_null)
|
||||||
{
|
{
|
||||||
@ -4990,8 +4994,11 @@ void Item_param::set_ignore(bool set_type_handler_null)
|
|||||||
state= IGNORE_VALUE;
|
state= IGNORE_VALUE;
|
||||||
null_value= true;
|
null_value= true;
|
||||||
if (set_type_handler_null)
|
if (set_type_handler_null)
|
||||||
|
{
|
||||||
|
value.set_handler(&type_handler_null);
|
||||||
set_handler(&type_handler_null);
|
set_handler(&type_handler_null);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
This operation is intended to store some item value in Item_param to be
|
This operation is intended to store some item value in Item_param to be
|
||||||
|
Loading…
x
Reference in New Issue
Block a user