Why ifnull() return DECIMAL instead of BIGINT in MariaDB 10.1?
For example:
Query:
select a, ifnull(b, 1) from table;
10.0.22-MariaDB:
ifnull(b, 1)
type is BIGINT
10.1.37-MariaDB:
ifnull(b, 1)
type is DECIMAL
Moreover, in both versions the return type of this query is the same:
select 1; //type is BIGINT
Why ifnull()
convert BIGINT
to DECIMAL
?