1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-31 22:22:30 +03:00
Files
mariadb/mysql-test/r
evgen@moonbone.local d34189715e Fixed bug#16302: Quantified subquery without any tables gives wrong results
The ALL/ANY subqueries are the subject of MIN/MAX optimization. The matter
of this optimization is to embed MIN() or MAX() function into the subquery
in order to get only one row by which we can tell whether the expression
with ALL/ANY subquery is true or false.
But when it is applied to a subquery like 'select a_constant' the reported bug
occurs. As no tables are specified in the subquery the do_select() function 
isn't called for the optimized subquery and thus no values have been added 
to a MIN()/MAX() function and it returns NULL instead of a_constant.
This leads to a wrong query result.

For the subquery like 'select a_constant' there is no reason to apply
MIN/MAX optimization because the subquery anyway will return at most one row.
Thus the Item_maxmin_subselect class is more appropriate for handling such
subqueries.

The Item_in_subselect::single_value_transformer() function now checks
whether tables are specified for the subquery. If no then this subselect is
handled like a UNION using an Item_maxmin_subselect object.
2006-07-11 00:34:37 +04:00
..
2004-05-05 17:05:24 +03:00
2006-05-01 21:30:09 +03:00
2005-06-16 10:09:05 +02:00
2004-03-30 02:32:41 +03:00
2006-06-15 16:39:18 +04:00
2004-08-26 18:26:38 +03:00
2005-11-06 02:11:12 +03:00
2006-06-22 00:29:04 +04:00
2006-05-04 20:19:37 +03:00
2005-02-15 21:03:17 -08:00
2004-10-07 10:50:13 +03:00
2005-08-29 22:35:48 -05:00
2005-06-27 20:31:00 +03:00
2006-06-02 14:14:57 -07:00
2005-06-13 11:38:16 -07:00
2005-11-01 13:00:02 +02:00
2005-05-05 10:36:17 -07:00
2004-06-20 19:11:02 +02:00
2005-07-22 21:06:02 +05:00
2006-05-06 23:48:13 -07:00
2004-03-31 03:32:38 +03:00
2006-01-30 15:17:33 +03:00
2005-08-07 03:16:15 +01:00
2005-09-06 18:03:08 +04:00
2004-09-02 22:06:30 -07:00
2006-03-06 18:34:38 +01:00
2005-02-02 08:38:24 +02:00
2004-09-09 11:22:23 -05:00
2006-05-04 09:58:03 +05:00
2005-11-25 10:41:22 +01:00
2004-11-08 11:06:36 +01:00
2005-09-12 12:45:03 -07:00
2005-09-30 11:39:49 +02:00
2004-09-30 21:36:25 +00:00
2006-06-12 15:35:47 +02:00
2004-05-11 10:40:48 +02:00
2005-05-04 10:16:03 +02:00
2004-10-07 08:42:11 +00:00
2004-08-31 21:10:57 +03:00
2006-04-20 22:15:38 -07:00
2004-05-05 23:29:35 +03:00
2005-06-23 10:56:44 +03:00
2004-10-07 10:50:13 +03:00
2004-05-13 23:47:20 +03:00
2005-08-24 19:37:27 +03:00
2005-07-28 21:25:05 +03:00
2004-07-20 11:00:10 +02:00
2004-06-21 10:21:20 +03:00
2004-06-21 10:21:20 +03:00
2005-02-24 17:25:06 +01:00
2004-05-05 17:05:24 +03:00
2004-03-18 00:09:13 +02:00
2004-05-24 21:12:05 +04:00
2005-04-06 12:20:55 +02:00
2004-05-17 01:52:13 +03:00
2004-09-07 21:30:28 +02:00
2004-05-19 05:09:10 +03:00
2005-02-28 19:59:38 +04:00
2006-06-20 23:05:55 +04:00
2004-11-12 17:44:17 +02:00
2004-08-24 17:24:23 +02:00
2005-08-09 00:13:49 +03:00
2005-03-23 20:38:42 +01:00
2004-08-19 03:02:09 +02:00
2006-01-26 00:06:20 +03:00