Commit e1502271 authored by Sergey Petrunya's avatar Sergey Petrunya

MWL#90: Address review feedback part #8

parent 52246038
...@@ -204,7 +204,7 @@ void JOIN_CACHE::calc_record_fields() ...@@ -204,7 +204,7 @@ void JOIN_CACHE::calc_record_fields()
tab= tab->bush_children->start; tab= tab->bush_children->start;
} }
} }
DBUG_ASSERT(!start_tab->bush_children); DBUG_ASSERT(!tab->bush_children);
start_tab= tab; start_tab= tab;
fields= 0; fields= 0;
......
...@@ -8507,7 +8507,6 @@ make_join_readinfo(JOIN *join, ulonglong options, uint no_jbuf_after) ...@@ -8507,7 +8507,6 @@ make_join_readinfo(JOIN *join, ulonglong options, uint no_jbuf_after)
tab->partial_join_cardinality= 1; tab->partial_join_cardinality= 1;
} }
//for (i=join->const_tables ; i < join->tables ; i++)
for (tab= first_linear_tab(join, TRUE), i= join->const_tables; for (tab= first_linear_tab(join, TRUE), i= join->const_tables;
tab; tab;
tab= next_linear_tab(join, tab, TRUE)) tab= next_linear_tab(join, tab, TRUE))
...@@ -9025,15 +9024,17 @@ void JOIN::cleanup(bool full) ...@@ -9025,15 +9024,17 @@ void JOIN::cleanup(bool full)
if (full) if (full)
{ {
for (tab= top_jtrange_tables?join_tab:NULL; tab; tab= next_linear_tab(this, tab, TRUE)) for (tab= first_linear_tab(this, TRUE); tab;
tab= next_linear_tab(this, tab, TRUE))
{
tab->cleanup(); tab->cleanup();
//psergey4: how is the above supposed to work when }
//top_jtrange_tables==FALSE? It will crash right away!
table= 0; table= 0;
} }
else else
{ {
for (tab= top_jtrange_tables?join_tab:NULL; tab; tab= next_linear_tab(this, tab, TRUE)) for (tab= first_linear_tab(this, TRUE); tab;
tab= next_linear_tab(this, tab, TRUE))
{ {
if (tab->table) if (tab->table)
tab->table->file->ha_index_or_rnd_end(); tab->table->file->ha_index_or_rnd_end();
......
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