EXPLAIN statement, for every
mysql_select will be
called with option
mysql_explain_union will be called.
SELECT in a given union,
mysql_explain_union will call
mysql_explain_select will call
mysql_select with option
mysql_select creates a
for select if it does not already exist (it might already exist
because if it called for subquery
JOIN can be
JOIN::optimize of outer query when
it decided to calculate the value of the subquery). Then it calls
JOIN::cleanup as usual.
JOIN::exec is called for
select_describe returns the user description of
SELECT and calls
mysql_explain_union for every inner
PROBLEM: how it will work with global query optimization?