1
0
mirror of https://github.com/MariaDB/server.git synced 2025-11-19 19:03:26 +03:00
Files
mariadb/mysql-test/suite
unknown 2df1914791 Fix bug lp:827416
Analysis:
Constant table optimization of the outer query finds that
the right side of the equality is a constant that can
be used for an eq_ref access to fetch one row from t1,
and substitute t1 with a constant. Thus constant optimization
triggers evaluation of the subquery during the optimize
phase of the outer query.

The innermost subquery requires a plan with a temporary
table because with InnoDB tables the exact count of rows
is not known, and the empty tables cannot be optimzied
way. JOIN::exec for the innermost subquery substitutes
the subquery tables with a temporary table.

When EXPLAIN gets to print the tables in the innermost
subquery, EXPLAIN needs to print the name of each table
through the corresponding TABLE_LIST object. However,
the temporary table created during execution doesn't
have a corresponding TABLE_LIST, so we get a null
pointer exception.

Solution:
The solution is to forbid using expensive constant
expressions for eq_ref access for contant table
optimization. Notice that eq_ref with a subquery
providing the value is still possible during regular
execution.
2011-08-27 00:40:29 +03:00
..
2011-05-28 05:11:32 +03:00
2011-02-25 20:15:27 +02:00
2011-07-21 15:55:08 -07:00
2011-07-31 22:59:55 +02:00
2011-08-16 19:02:15 +03:00
2011-05-02 20:58:45 +03:00
2011-02-20 18:51:43 +02:00
2011-08-27 00:40:29 +03:00
2011-05-10 18:17:43 +03:00