~maria-captains/maria/5.3-frm

Viewing all changes in revision 3199.

  • Committer: timour at askmonty
  • Date: 2011-09-28 14:20:43 UTC
  • Revision ID: timour@askmonty.org-20110928142043-b88ob3qytbroxdks
Fix bug lp:858148.

Analysis:
The crash is a result of the same cause as all similar
bugs (lp:827416, lp:718763, lp:778413, lp:806943,
lp:611690). The general pattern is that some optimization
requires the evaluation of some condition (e.g. the WHERE
clause), and this condition contains a subquery, such that
the subquery itself requires a temporary table for its
execution. During the subquery execution the original
tables in the FROM clause are replaced by the temporary
table needed for the final GROUP or ORDER operation. All
this happens during optimization of the outer query. Later
when EXPLAIN is run for the subquery, explain attempts to
print the name of the tables in the FROM clause, but it
finds there a temporary table without a corresponding
TABLE_LIST object. The attempt to print the name of a
NULL table list results in a crash.

Solution:
This patch extends the fix to bug lp:702301, and dissalows
constant substitution of aggregate functions if the filter
condition used to check MIN/MAX keys is an expensive condition.

expand all expand all

Show diffs side-by-side

added added

removed removed

Lines of Context: