Comment 4 for bug 997747

Revision history for this message
Sergey Petrunia (sergefp) wrote :

Fix for that bug is small:

=== modified file 'sql/sql_select.cc'
--- sql/sql_select.cc 2011-07-18 06:12:31 +0000
+++ sql/sql_select.cc 2011-07-19 21:31:40 +0000
@@ -11999,8 +11999,8 @@
       if (!nested_join->n_tables)
         is_eliminated_nest= TRUE;
     }
- if ((!table->table && !is_eliminated_nest) ||
- (table->table && (table->table->map & ~join->eliminated_tables)))
+ if ((table->nested_join && !is_eliminated_nest) ||
+ (!table->nested_join && (table->table->map & ~join->eliminated_tables)))
       n++;
   }
   DBUG_RETURN(n);

Should I back-port it?