1
0
mirror of https://github.com/MariaDB/server.git synced 2025-11-21 06:21:35 +03:00
Files
mariadb/mysql-test/t
unknown adce16f96f Fix LP BUG#718763
Analysis:
The reason for the crash was that the inner subquery was executed
via a scan on a final temporary table applied after all other
operations. This final operation is implemented by changing the
contents of the JOIN object of the subquery to represent a table
scan over the temp table. At the same time query optimization of
the outer subquery required evaluation of the inner subquery, which
happened before the actual EXPLAIN. The evaluation left the JOIN
object of the inner subquery in the changed state, where it represented
a table scan over a temp table, and EXPLAIN crashed because the temp
table is not associated with any table reference (TABLE_LIST object).
The reason the JOIN was not restored was because its saving/restoration
was controlled by the join->select_lex->uncacheable flag, which was
not set in the case of materialization.

Solution:
In the methods Item_in_subselect::[single | row]_value_transformer() set:
    select_lex->uncacheable|= UNCACHEABLE_EXPLAIN;
In addition, for symmetry, change:
    master_unit->uncacheable|= UNCACHEABLE_EXPLAIN;
instead of UNCACHEABLE_DEPENDENT because if a subquery was not
dependent initially, the changed methods do not change this
fact. The subquery may later become correlated if it is transformed
to an EXISTS query, but it may stay uncorrelated if executed via
materialization.
2011-03-03 23:48:31 +02:00
..
2009-08-20 14:30:59 +02: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
2009-10-28 09:52:34 +02:00
2009-10-28 09:52:34 +02:00
2009-10-28 09:52:34 +02:00
2010-09-12 18:40:01 +02:00
2010-03-09 16:09:32 +01:00
2009-12-22 15:33:21 +03:00
2009-10-28 09:52:34 +02:00
2010-05-26 21:55:40 +03:00
2010-11-25 00:57:34 +02:00
2009-09-29 17:38:40 +02:00
2010-01-15 17:27:55 +02:00
2009-10-28 09:52:34 +02:00
2010-11-25 00:57:34 +02:00
2009-09-08 00:50:10 +04:00
2010-11-25 00:57:34 +02:00
2009-09-08 00:50:10 +04:00
2010-11-01 09:47:57 +03:00
2010-11-25 00:57:34 +02:00
2010-10-19 15:58:35 +02:00
2010-11-25 00:57:34 +02:00
2010-11-25 00:57:34 +02:00
2009-10-28 09:52:34 +02:00
2010-12-27 14:22:05 -08:00
2009-09-08 00:50:10 +04:00
2009-06-09 15:19:13 +02:00
2009-06-09 15:19:13 +02:00
2010-01-15 16:58:25 +01:00
2010-10-19 15:58:35 +02:00
2010-10-27 16:31:22 -07:00
2010-10-27 16:31:22 -07:00
2011-01-11 15:36:41 +02:00
2010-08-30 16:25:23 +03:00
2011-01-11 15:36:41 +02:00
2010-09-06 02:15:34 +03:00
2010-11-23 23:39:59 +02:00
2009-10-28 09:52:34 +02:00
2009-10-28 09:52:34 +02:00
2010-09-06 02:15:34 +03:00
2009-06-25 02:44:14 +04:00
2010-03-04 09:03:07 +01:00
2009-10-04 01:20:51 +02:00
2010-09-20 15:17:59 +02:00
2010-08-25 22:22:33 +02:00
2010-11-25 00:57:34 +02:00
2011-01-26 20:45:23 -08:00
2009-10-28 09:52:34 +02:00
2009-08-12 12:03:05 +02:00
2010-06-14 18:58:52 +02:00
2010-11-25 00:57:34 +02:00
2010-11-23 23:39:59 +02:00
2010-12-06 10:25:44 +02:00
2009-09-08 00:50:10 +04:00
2010-12-10 01:17:09 -08:00
2009-10-28 09:52:34 +02:00
2010-10-27 16:31:22 -07:00
2011-01-26 11:30:29 -08:00
2009-10-28 09:52:34 +02:00
2009-07-03 10:19:32 +02:00
2009-11-27 18:10:28 +02:00
2010-04-08 14:10:05 +02:00
2010-03-21 21:58:19 +01:00
2010-10-27 16:31:22 -07:00
2010-10-27 16:31:22 -07:00
2011-03-03 23:48:31 +02:00
2010-11-25 00:34:50 +02:00
2010-05-26 21:55:40 +03:00
2010-06-10 11:11:52 +02:00
2010-09-20 15:17:59 +02:00
2010-08-13 14:18:46 +03:00
2011-02-23 14:46:16 +02:00
2011-02-07 15:19:03 -08:00
2010-10-27 16:31:22 -07:00