maria-developers team mailing list archive
Mailing list archive
Re: Please review MDEV-9653 Assertion `length || !scale' failed in uint my_decimal_length_to_precision(uint, uint, bool)
On Mar 17, Alexander Barkov wrote:
> > why is it NOT_FIXED_DEC? it seems to me that it has to be 0 here.
> Perhaps my example in the comments made you think that
> it happens in a very special case with CAST AS UNSIGNED.
> It also happens in simpler cases:
> SELECT CASE WHEN TRUE
> THEN COALESCE(NULL)
> ELSE 40
> I guess I should fix the example to this ^^^.
1. Perhaps my_decimal_length_to_precision() then? It's used not only in
Item_func_case::agg_num_lengths. Quick grepping finds more
potentially dangerous places. For example
2. Why my_decimal_length_to_precision is only used in Item_func_case?
How do other functions aggregate types? Perhaps CASE needs
to be changed to work like other similar functions do?
Chief Architect MariaDB