~drizzle-trunk/drizzle/development

Viewing all changes in revision 814.1.5.

  • Committer: Jay Pipes
  • Date: 2009-01-30 05:54:48 UTC
  • mto: (779.3.22 devel)
  • mto: This revision was merged to the branch mainline in revision 823.
  • Revision ID: jpipes@serialcoder-20090130055448-7hsp1jgrrl6wo2ki
Fixes crash in optimizer where LEFT JOIN was mixing with a subselect.

Problem was in the JOIN::flatten_subqueries() method, which was not
properly populating the join->cond member that was being passed to the
replace_where_subcondition() static function later on in the method call.

After checking out the source for MySQL 6.0, I noticed that the optimizer
team has punted on LEFT JOIN with dependent subqueries, probably because
of this issue, so I adapted the code from 6.0 into Drizzle.

After that, I modified the test case subselect_sj.test to put back in the
tests for LEFT JOIN on a condition with a subquery and verified that 
the results returned were correct.  The SELECT returns a valid and correct
data set now for both un-commented queries, and the EXPLAIN SELECT just 
shows SUBQUERY, not DEPENDENT or UNIQUE SUBQUERY.

expand all expand all

Show diffs side-by-side

added added

removed removed

Lines of Context: