Commit 091743c6 authored by Rucha Deodhar's avatar Rucha Deodhar

Removing the condition in the for loop and putting it in one place to

make code more readable and cleaner.
parent 8cb2027b
...@@ -8032,12 +8032,14 @@ insert_fields(THD *thd, Name_resolution_context *context, const char *db_name, ...@@ -8032,12 +8032,14 @@ insert_fields(THD *thd, Name_resolution_context *context, const char *db_name,
else treat natural joins as leaves and do not iterate over their underlying else treat natural joins as leaves and do not iterate over their underlying
tables. tables.
*/ */
for (TABLE_LIST *tables= (table_name ? context->table_list : TABLE_LIST *first= context->first_name_resolution_table;
context->first_name_resolution_table); TABLE_LIST *TABLE_LIST::* next= &TABLE_LIST::next_name_resolution_table;
tables; if (table_name)
tables= (table_name ? tables->next_local : {
tables->next_name_resolution_table) first= context->table_list;
) next= &TABLE_LIST::next_local;
}
for (TABLE_LIST *tables= first; tables; tables= tables->*next)
{ {
Field *field; Field *field;
TABLE *table= tables->table; TABLE *table= tables->table;
......
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