diff options
author | mithun <mithun.c.y@oracle.com> | 2014-04-28 21:07:27 +0530 |
---|---|---|
committer | mithun <mithun.c.y@oracle.com> | 2014-04-28 21:07:27 +0530 |
commit | 11f5d757d32729c26583d6803727370d1074dd43 (patch) | |
tree | a3e9fb226447c5562d2902ccdddb1c043ba13745 /VERSION | |
parent | b34d3728dd8f5e85a0f6f531556bd8b23cd4792a (diff) | |
download | mariadb-git-11f5d757d32729c26583d6803727370d1074dd43.tar.gz |
Bug #18167356: EXPLAIN W/ EXISTS(SELECT* UNION SELECT*)
WHERE ONE OF SELECT* IS DISTINCT FAILS.
ISSUE:
------
There are 2 issues related to explain union.
1. If we have subquery with union of selects. And, one of
the select need temp table to materialize its results
then it will replace its query structure with a simple
select from temporary table. Trying to display new
internal temporary table scan resulted in crash. But to
display the query plan, we should save the original
query structure.
2. Multiple execution of prepared explain statement which
have union of subqueries resulted in crash. If we have
constant subqueries, fake select used in union operation
will be evaluated once before using it for explain.
During first execution we have set fake select options to
SELECT_DESCRIBE, but did not reset after the explain.
Hence during next execution of prepared statement during
first time evaluation of fake select we had our select
options as SELECT_DESCRIBE this resulted in improperly
initialized data structures and crash.
SOLUTION:
---------
1. If called by explain now we save the original query
structure. And this will be used for displaying.
2. Reset the fake select options after it is called for
explain of union.
Diffstat (limited to 'VERSION')
0 files changed, 0 insertions, 0 deletions