1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-29 05:21:33 +03:00

MDEV-16320 Replace INT_ITEM references in sql_select.cc

- Removing tests of item->type() against INT_ITEM and replacing
  them to calls of new method item->is_bool_literal().
- Changing constant conditions to use Item_bool() instead of Item_int().
This commit is contained in:
Alexander Barkov
2018-05-29 16:16:33 +04:00
parent 840d46b04f
commit d4da8e7c02
3 changed files with 21 additions and 18 deletions

View File

@ -8117,7 +8117,7 @@ Item_bool_func::get_mm_leaf(RANGE_OPT_PARAM *param,
else if (type == GT_FUNC &&
(field->type() != FIELD_TYPE_BIT) &&
!((Field_num*)field)->unsigned_flag &&
!((Item_int*)value)->unsigned_flag &&
!value->unsigned_flag &&
(value->val_int() < 0))
type= GE_FUNC;
}
@ -8164,7 +8164,7 @@ Item_bool_func::get_mm_leaf(RANGE_OPT_PARAM *param,
value->result_type() == INT_RESULT &&
((field->type() == FIELD_TYPE_BIT ||
((Field_num *) field)->unsigned_flag) &&
!((Item_int*) value)->unsigned_flag))
!value->unsigned_flag))
{
longlong item_val= value->val_int();
if (item_val < 0)