1
0
mirror of https://github.com/MariaDB/server.git synced 2025-09-02 09:41:40 +03:00
Files
mariadb/mysql-test/t
unknown c9e236828e Fix bug lp:782305
Analysis:
Both the wrong result and the valgrind warning were a result
of incomplete cleanup of the MIN/MAX subquery rewrite. At the
first execution of the query, the non-aggregate subquery is
transformed into an aggregate MIN/MAX subquery. During the
fix_fields phase of the MIN/MAX function, it sets the property
st_select_lex::with_sum_func to true.

The second execution of the query finds this flag to be ON.
When optimization reaches the same MIN/MAX subquery
transformation, it tests if the subquery is an aggregate or not.
Since select_lex->with_sum_func == true from the previous
execution, the transformation executes the second branch that
handles aggregate subqueries. This substitutes the subquery
Item into a Item_maxmin_subselect. At the same time elsewhere
it is assumed that the subquery Item is of type
Item_allany_subselect. Ultimately this results in casting the
actual object to the wrong class, and calling the wrong
any_value() method from empty_underlying_subquery().

Solution:
Cleanup the st_select_lex::with_sum_func property in the case
when the MIN/MAX transformation was performed for a non-aggregate
subquery, so that the transformation can be repeated.
2011-07-18 23:45:38 +03:00
..
2010-02-25 23:13:11 +04:00
2010-09-12 18:40:01 +02:00
2010-06-10 11:11:52 +02:00
2011-05-28 05:11:32 +03:00
2011-05-12 16:31:54 +02:00
2011-01-25 12:14:28 +05:30
2011-05-10 18:17:43 +03:00
2011-05-02 20:58:45 +03:00
2010-11-25 00:57:34 +02:00
2011-05-28 05:11:32 +03:00
2011-06-21 15:50:07 +03:00
2011-06-10 21:15:13 +02:00
2011-05-03 19:10:10 +03:00
2011-05-10 23:20:35 +03:00
2010-11-25 00:57:34 +02:00
2011-06-07 18:13:02 +02:00
2011-06-09 17:23:39 +02:00
2010-11-25 00:57:34 +02:00
2011-06-07 18:13:02 +02:00
2011-06-10 21:15:13 +02:00
2011-05-02 20:58:45 +03:00
2011-05-02 20:58:45 +03:00
2011-01-18 00:53:41 +02:00
2010-12-27 14:22:05 -08:00
2011-02-20 18:51:43 +02:00
2010-10-19 15:58:35 +02:00
2011-01-11 15:36:41 +02:00
2011-06-24 21:43:31 +04:00
2011-05-02 20:58:45 +03:00
2011-01-11 15:36:41 +02:00
2011-03-29 10:09:05 +02:00
2010-09-06 02:15:34 +03:00
2011-05-19 19:19:44 +02:00
2010-11-23 23:39:59 +02:00
2010-09-06 02:15:34 +03:00
2011-05-02 20:58:45 +03:00
2011-05-10 18:17:43 +03:00
2010-08-25 22:22:33 +02:00
2011-05-02 20:58:45 +03:00
2011-05-10 18:17:43 +03:00
2010-06-14 18:58:52 +02:00
2010-11-25 00:57:34 +02:00
2011-05-28 05:11:32 +03:00
2011-05-28 05:11:32 +03:00
2011-05-02 20:58:45 +03:00
2011-06-03 21:45:24 +04:00
2011-07-18 23:45:38 +03:00
2011-05-28 05:11:32 +03:00
2010-05-26 21:55:40 +03:00
2011-05-28 05:11:32 +03:00
2011-06-09 17:23:39 +02:00
2011-06-07 18:13:02 +02:00
2011-06-09 17:23:39 +02:00
2011-05-19 19:01:46 +02:00
2011-05-28 05:11:32 +03:00
2010-06-10 11:11:52 +02:00
2011-03-09 15:47:59 +02:00
2011-05-10 18:17:43 +03:00
2011-05-31 15:33:14 +03:00
2011-07-11 10:56:48 -07:00
2010-10-27 16:31:22 -07:00
2011-03-31 14:29:23 +02:00