1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-01 03:47:19 +03:00

Merge branch '10.4' into 10.5

This commit is contained in:
Oleksandr Byelkin
2020-02-12 08:55:17 +01:00
162 changed files with 2849 additions and 2277 deletions

View File

@ -2740,14 +2740,34 @@ bool partition_key_modified(TABLE *table, const MY_BITMAP *fields)
static inline int part_val_int(Item *item_expr, longlong *result)
{
*result= item_expr->val_int();
switch (item_expr->cmp_type())
{
case DECIMAL_RESULT:
{
my_decimal buf;
my_decimal *val= item_expr->val_decimal(&buf);
if (val && my_decimal2int(E_DEC_FATAL_ERROR, val, item_expr->unsigned_flag,
result, FLOOR) != E_DEC_OK)
return true;
break;
}
case INT_RESULT:
*result= item_expr->val_int();
break;
case STRING_RESULT:
case REAL_RESULT:
case ROW_RESULT:
case TIME_RESULT:
DBUG_ASSERT(0);
break;
}
if (item_expr->null_value)
{
if (unlikely(current_thd->is_error()))
return TRUE;
return true;
*result= LONGLONG_MIN;
}
return FALSE;
return false;
}