List:Commits« Previous MessageNext Message »
From:Sergey Petrunia Date:September 2 2008 2:58pm
Subject:bzr push into mysql-6.0-opt-subqueries branch (sergefp:2691 to 2692)
View as plain text  
 2692 Sergey Petrunia	2008-09-02
      Fix trivial typo bug
modified:
  sql/sql_select.cc

 2691 Sergey Petrunia	2008-08-28
      WL#3985 code: Fix valgrind failure and incorrect QEP choice:
      - After join optimizer position->sj_strategy is set for the last table that is related 
        (=either inner or outer correlated) to the given semi-join range. 
        get_best_combination() changes that to be set for the first inner table (this makes it possible
        to do plan refinement in one forward pass over the join order).
        The fix is that we should clear last_related_table_position->sj_strategy because the plan
        refinement code expects it to be set only for the first sj-inner table. \
      - Update test results (checked)
modified:
  mysql-test/r/subselect.result
  mysql-test/r/subselect_no_mat.result
  mysql-test/r/subselect_no_opts.result
  mysql-test/r/subselect_no_semijoin.result
  sql/sql_select.cc

=== modified file 'sql/sql_select.cc'
--- a/sql/sql_select.cc	2008-08-28 09:42:21 +0000
+++ b/sql/sql_select.cc	2008-09-02 14:56:48 +0000
@@ -7617,12 +7617,12 @@ get_best_combination(JOIN *join, table_m
       for (i= tablenr; i != (first + sjm->n_tables - 1); i--)
         rem_tables |= join->best_positions[i].table->table->map;
 
-      POSITION curpos, dummy;
+      POSITION dummy;
       for (i= first + sjm->n_tables; i <= tablenr; i++)
       {
         best_access_path(join, join->best_positions[i].table, rem_tables, i, FALSE,
                          prefix_rec_count, join->best_positions + i, &dummy);
-        prefix_rec_count *= curpos.records_read;
+        prefix_rec_count *= join->best_positions[i].records_read;
         rem_tables &= ~join->best_positions[i].table->table->map;
       }
     }

Thread
bzr push into mysql-6.0-opt-subqueries branch (sergefp:2691 to 2692)Sergey Petrunia2 Sep