mirror of
https://github.com/MariaDB/server.git
synced 2026-04-28 11:15:33 +02:00
MDEV-10500 CASE/IF Statement returns multiple values and shifts further result values to the next column
We assume all around the code that null_value==true is in sync with NULL value returned by val_str()/val_decimal(). Item_sum_sum::val_decimal() erroneously returned a non-NULL value together with null_value set to true. Fixing to return NULL instead.
This commit is contained in:
parent
5e23b6344f
commit
1b3430a5ae
3 changed files with 53 additions and 1 deletions
|
|
@ -1462,7 +1462,7 @@ my_decimal *Item_sum_sum::val_decimal(my_decimal *val)
|
|||
if (aggr)
|
||||
aggr->endup();
|
||||
if (hybrid_type == DECIMAL_RESULT)
|
||||
return (dec_buffs + curr_dec_buff);
|
||||
return null_value ? NULL : (dec_buffs + curr_dec_buff);
|
||||
return val_decimal_from_real(val);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue