mirror of
https://github.com/MariaDB/server.git
synced 2025-08-07 00:04:31 +03:00
item_cmpfunc.h, cast.result:
Post fix for bug#16377 mysql-test/r/cast.result: Post fix for bug#16377 sql/item_cmpfunc.h: Post fix for bug#16377
This commit is contained in:
@@ -192,7 +192,7 @@ cast("2001-1-1" as datetime) = "2001-01-01 00:00:00"
|
|||||||
1
|
1
|
||||||
select cast("1:2:3" as TIME) = "1:02:03";
|
select cast("1:2:3" as TIME) = "1:02:03";
|
||||||
cast("1:2:3" as TIME) = "1:02:03"
|
cast("1:2:3" as TIME) = "1:02:03"
|
||||||
1
|
0
|
||||||
select cast(NULL as DATE);
|
select cast(NULL as DATE);
|
||||||
cast(NULL as DATE)
|
cast(NULL as DATE)
|
||||||
NULL
|
NULL
|
||||||
|
@@ -43,11 +43,8 @@ public:
|
|||||||
int set_compare_func(Item_bool_func2 *owner, Item_result type);
|
int set_compare_func(Item_bool_func2 *owner, Item_result type);
|
||||||
inline int set_compare_func(Item_bool_func2 *owner_arg)
|
inline int set_compare_func(Item_bool_func2 *owner_arg)
|
||||||
{
|
{
|
||||||
Item_result ar= (*a)->result_as_longlong() && (*b)->const_item() ?
|
return set_compare_func(owner_arg, item_cmp_type((*a)->result_type(),
|
||||||
INT_RESULT : (*a)->result_type();
|
(*b)->result_type()));
|
||||||
Item_result br= (*b)->result_as_longlong() && (*a)->const_item() ?
|
|
||||||
INT_RESULT : (*b)->result_type();
|
|
||||||
return set_compare_func(owner_arg, item_cmp_type(ar, br));
|
|
||||||
}
|
}
|
||||||
inline int set_cmp_func(Item_bool_func2 *owner_arg,
|
inline int set_cmp_func(Item_bool_func2 *owner_arg,
|
||||||
Item **a1, Item **a2,
|
Item **a1, Item **a2,
|
||||||
@@ -60,11 +57,9 @@ public:
|
|||||||
inline int set_cmp_func(Item_bool_func2 *owner_arg,
|
inline int set_cmp_func(Item_bool_func2 *owner_arg,
|
||||||
Item **a1, Item **a2)
|
Item **a1, Item **a2)
|
||||||
{
|
{
|
||||||
Item_result ar= (*a1)->result_as_longlong() && (*a2)->const_item() ?
|
return set_cmp_func(owner_arg, a1, a2,
|
||||||
INT_RESULT : (*a1)->result_type();
|
item_cmp_type((*a1)->result_type(),
|
||||||
Item_result br= (*a2)->result_as_longlong() && (*a1)->const_item() ?
|
(*a2)->result_type()));
|
||||||
INT_RESULT : (*a2)->result_type();
|
|
||||||
return set_cmp_func(owner_arg, a1, a2, item_cmp_type(ar, br));
|
|
||||||
}
|
}
|
||||||
inline int compare() { return (this->*func)(); }
|
inline int compare() { return (this->*func)(); }
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user