mirror of
https://github.com/MariaDB/server.git
synced 2025-07-27 18:02:13 +03:00
MDEV-16351 JSON_OBJECT() treats hybrid functions with boolean arguments as numbers
Now the boolean data type is preserved in hybrid functions and MIN/MAX, so COALESCE(bool_expr,bool_expr) and MAX(bool_expr) are correctly detected by JSON_OBJECT() as being boolean rather than numeric expressions.
This commit is contained in:
@ -13031,7 +13031,8 @@ check_group_min_max_predicates(Item *cond, Item_field *min_max_arg_item,
|
||||
|
||||
if (args[0] && args[1]) // this is a binary function or BETWEEN
|
||||
{
|
||||
DBUG_ASSERT(pred->is_bool_type());
|
||||
DBUG_ASSERT(pred->fixed_type_handler());
|
||||
DBUG_ASSERT(pred->fixed_type_handler()->is_bool_type());
|
||||
Item_bool_func *bool_func= (Item_bool_func*) pred;
|
||||
Field *field= min_max_arg_item->field;
|
||||
if (!args[2]) // this is a binary function
|
||||
|
Reference in New Issue
Block a user