merging

parent 4a01582f
...@@ -5771,10 +5771,12 @@ bool setup_tables_and_check_access(THD *thd, ...@@ -5771,10 +5771,12 @@ bool setup_tables_and_check_access(THD *thd,
TABLE_LIST *leaves_tmp= NULL; TABLE_LIST *leaves_tmp= NULL;
bool first_table= true; bool first_table= true;
thd->leaf_count= 0;
if (setup_tables(thd, context, from_clause, tables, if (setup_tables(thd, context, from_clause, tables,
&leaves_tmp, select_insert)) &leaves_tmp, select_insert))
return TRUE; return TRUE;
if (leaves)
*leaves= leaves_tmp; *leaves= leaves_tmp;
for (; leaves_tmp; leaves_tmp= leaves_tmp->next_leaf) for (; leaves_tmp; leaves_tmp= leaves_tmp->next_leaf)
...@@ -5787,6 +5789,7 @@ bool setup_tables_and_check_access(THD *thd, ...@@ -5787,6 +5789,7 @@ bool setup_tables_and_check_access(THD *thd,
return TRUE; return TRUE;
} }
first_table= 0; first_table= 0;
thd->leaf_count++;
} }
return FALSE; return FALSE;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment