-
unknown authored
Analysis: The crash in EXPLAIN resulted from an attempt to print the name of the internal temporary table created to compute distinct for the innermost subquery of the test case. Such tables do not have a corresponding TABLE_LIST (table reference), hence the crash. The reason for this was that the subquery was executed as part of constant condition evaluation before EXPLAIN attempts to print the table name. During the subquery execution, the subquery JOIN_TAB and its table are substituted by a temporary table in make_simple_join. Solution: Similar to the analogous case for other Items than the IS NULL function, do not evaluate expensive constant conditions.
bb39eb0e