1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-01 03:47:19 +03:00

Merge 5.2->5.3

This commit is contained in:
Sergey Petrunya
2012-05-12 12:12:35 +04:00
3 changed files with 50 additions and 3 deletions

View File

@ -9174,14 +9174,16 @@ static uint reset_nj_counters(JOIN *join, List<TABLE_LIST> *join_list)
while ((table= li++))
{
NESTED_JOIN *nested_join;
bool is_eliminated_nest= FALSE;
if ((nested_join= table->nested_join))
{
nested_join->counter= 0;
//nested_join->n_tables= my_count_bits(nested_join->used_tables &
// ~join->eliminated_tables);
nested_join->n_tables= reset_nj_counters(join, &nested_join->join_list);
if (!nested_join->n_tables)
is_eliminated_nest= TRUE;
}
if (!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);