mirror of
https://github.com/MariaDB/server.git
synced 2025-01-29 02:05:57 +01:00
Safety fix
sql/item_cmpfunc.cc: Safety fix Code cleanup
This commit is contained in:
parent
44dcd7e8ea
commit
c60b184629
1 changed files with 4 additions and 3 deletions
|
@ -2047,7 +2047,8 @@ int cmp_item_row::compare(cmp_item *c)
|
|||
void cmp_item_decimal::store_value(Item *item)
|
||||
{
|
||||
my_decimal *val= item->val_decimal(&value);
|
||||
if (val != &value)
|
||||
/* val may be zero if item is nnull */
|
||||
if (val && val != &value)
|
||||
my_decimal2decimal(val, &value);
|
||||
}
|
||||
|
||||
|
@ -2061,9 +2062,9 @@ int cmp_item_decimal::cmp(Item *arg)
|
|||
}
|
||||
|
||||
|
||||
int cmp_item_decimal::compare(cmp_item *c)
|
||||
int cmp_item_decimal::compare(cmp_item *arg)
|
||||
{
|
||||
cmp_item_decimal *cmp= (cmp_item_decimal *)c;
|
||||
cmp_item_decimal *cmp= (cmp_item_decimal*) arg;
|
||||
return my_decimal_cmp(&value, &cmp->value);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue