MDEV-32324: Server crashes inside filesort at my_decimal::to_binary
A subquery in form "(SELECT not_null_value LIMIT 1 OFFSET 1)" will produce no rows which will translate into scalar SQL NULL value. The code in Item_singlerow_subselect::fix_length_and_dec() failed to take the LIMIT/OFFSET clause into account and used to set item_subselect->maybe_null=0, despite that SQL NULL will be produced. If such subselect was used in ORDER BY, this would cause a crash in filesort() code when it would get a NULL value for a not-nullable item. also made subselect_engine::no_tables() const function.
Showing
Please register or sign in to comment