List:Commits« Previous MessageNext Message »
From:Guilhem Bichot Date:October 21 2010 1:30pm
Subject:bzr commit into mysql-next-mr-bugfixing branch (guilhem:3329)
View as plain text  
#At file:///home/mysql_src/bzrrepos_new/mysql-next-mr-bugfixing2/ based on revid:anitha.gopi@stripped

 3329 Guilhem Bichot	2010-10-21
      Follow-up after the fix for BUG 52005
      "'JOIN_TAB->dependent' may be incorrectly propageted for multilevel outer joins"
     @ sql/sql_select.cc
        The fix for BUG 52005 allowed us to choose a correct tables order for
        STRAIGHT_JOIN queries; here we add an assertion that this order is
        correct (like there already is for the non-STRAIGHT_JOIN case in
        greedy_search()). I verified that if the fix for BUG 52005 is
        reverted, but the test query is kept in join_outer.test, the
        assertion fires properly in the problematic query.

    modified:
      sql/sql_select.cc
=== modified file 'sql/sql_select.cc'
--- a/sql/sql_select.cc	2010-09-30 14:53:11 +0000
+++ b/sql/sql_select.cc	2010-10-21 13:30:19 +0000
@@ -7627,6 +7627,12 @@ optimize_straight_join(JOIN *join, table
  
   for (JOIN_TAB **pos= join->best_ref + idx ; (s= *pos) ; pos++)
   {
+    /*
+      Dependency computation (make_join_statistics()) and proper ordering
+      based on them (join_tab_cmp*) guarantee that this order is compatible
+      with execution, check it:
+    */
+    DBUG_ASSERT(!check_interleaving_with_nj(s));
     /* Find the best access method from 's' to the current partial plan */
     best_access_path(join, s, join_tables, idx, FALSE, record_count,
                      join->positions + idx, &loose_scan_pos);


Attachment: [text/bzr-bundle] bzr/guilhem@mysql.com-20101021133019-gq2gys0sxve9ompg.bundle
Thread
bzr commit into mysql-next-mr-bugfixing branch (guilhem:3329) Guilhem Bichot21 Oct