1
0
mirror of https://github.com/MariaDB/server.git synced 2025-05-28 13:01:41 +03:00
evgen@moonbone.local 8ffda481c9 Fixed bug#18503: Queries with a quantified subquery returning empty set
may return a wrong result.

An Item_sum_hybrid object has the was_values flag which indicates whether any
values were added to the sum function. By default it is set to true and reset
to false on any no_rows_in_result() call. This method is called only in
return_zero_rows() function. An ALL/ANY subquery can be optimized by MIN/MAX
optimization. The was_values flag is used to indicate whether the subquery
has returned at least one row. This bug occurs because return_zero_rows() is
called only when we know that the select will return zero rows before
starting any scans but often such information is not known.
In the reported case the return_zero_rows() function is not called and
the was_values flag is not reset to false and yet the subquery return no rows
Item_func_not_all and Item_func_nop_all functions return a wrong
comparison result.

The end_send_group() function now calls no_rows_in_result() for each item
in the fields_list if there is no rows were found for the (sub)query.
2006-07-12 01:52:18 +04:00
..
2005-09-30 14:03:55 +02:00
2006-06-22 00:29:04 +04:00
2005-09-12 18:48:17 +03:00
2004-09-01 04:12:09 +03:00
2005-08-30 02:46:03 +02:00
2006-05-15 17:25:37 +04:00
2005-06-21 04:24:21 -07:00
2006-06-20 23:05:55 +04:00
2006-06-15 16:39:18 +04:00
2006-06-16 23:46:37 +04:00
2006-06-17 02:11:12 +04:00
2006-06-17 02:11:12 +04:00
2005-03-17 10:59:25 +04:00
2005-09-24 15:51:45 +02:00
2004-10-06 19:14:33 +03:00
2005-11-01 13:00:02 +02:00
2004-12-14 03:36:19 +03:00
2006-05-06 23:48:13 -07:00
2005-05-18 22:14:08 +02:00
2006-05-06 23:48:13 -07:00
2006-06-02 14:14:57 -07:00
2006-05-04 00:03:58 +05:00
2006-04-20 22:15:38 -07:00
2006-04-20 22:15:38 -07:00
2004-11-08 01:13:54 +02:00
2005-12-13 18:30:10 +02:00
2005-07-27 13:05:30 +03:00