← Back to team overview

maria-developers team mailing list archive

bzr commit into MariaDB 5.1, with Maria 1.5:maria branch (knielsen:2765) Bug#42116 WL#17

 

#At lp:maria

 2765 knielsen@xxxxxxxxxxxxxxx	2009-11-16
      Corrected a line from the patch for table elimination (WL#17)
      to fix a problem with the test case for bug#42116. 
      
      Re-commit of Igor's fix due to re-commit of MySQL 5.1.41 merge.
      modified:
        sql/sql_select.cc

=== modified file 'sql/sql_select.cc'
--- a/sql/sql_select.cc	2009-11-16 20:49:51 +0000
+++ b/sql/sql_select.cc	2009-11-16 20:54:33 +0000
@@ -8937,7 +8937,7 @@ static uint reset_nj_counters(JOIN *join
       //                                     ~join->eliminated_tables);
       nested_join->n_tables= reset_nj_counters(join, &nested_join->join_list);
     }
-    if (table->table && (table->table->map & ~join->eliminated_tables))
+    if (!table->table || (table->table->map & ~join->eliminated_tables))
       n++;
   }
   DBUG_RETURN(n);