Commit f064087e authored by Sergey Petrunya's avatar Sergey Petrunya

MWL#90: Address review feedback part #9:

- among everything else, switch to using first/next_linear_tab() in make_outerjoin_info().
parent 739e6c99
...@@ -2169,7 +2169,13 @@ enum_nested_loop_state JOIN_CACHE::join_matching_records(bool skip_last) ...@@ -2169,7 +2169,13 @@ enum_nested_loop_state JOIN_CACHE::join_matching_records(bool skip_last)
/* Prepare to retrieve all records of the joined table */ /* Prepare to retrieve all records of the joined table */
if ((error= join_tab_scan->open())) if ((error= join_tab_scan->open()))
goto finish; /* psergey-note: if this returns error, we will assert in net_send_statement() */ {
/*
TODO: if we get here, we will assert in net_send_statement(). Add test
coverage and fix.
*/
goto finish;
}
while (!(error= join_tab_scan->next())) while (!(error= join_tab_scan->next()))
{ {
......
...@@ -7245,18 +7245,13 @@ add_found_match_trig_cond(JOIN_TAB *tab, COND *cond, JOIN_TAB *root_tab) ...@@ -7245,18 +7245,13 @@ add_found_match_trig_cond(JOIN_TAB *tab, COND *cond, JOIN_TAB *root_tab)
This function can be called only after the execution plan This function can be called only after the execution plan
has been chosen. has been chosen.
*/ */
static void static void
make_outerjoin_info(JOIN *join) make_outerjoin_info(JOIN *join)
{ {
DBUG_ENTER("make_outerjoin_info"); DBUG_ENTER("make_outerjoin_info");
bool top= TRUE; for (JOIN_TAB *tab= first_linear_tab(join, TRUE); tab;
List_iterator<JOIN_TAB_RANGE> it(join->join_tab_ranges); tab= next_linear_tab(join, tab, FALSE))
JOIN_TAB_RANGE *jt_range;
while ((jt_range= it++))
{
for (JOIN_TAB *tab=jt_range->start + (top ? join->const_tables : 0);
tab != jt_range->end; tab++)
{ {
TABLE *table=tab->table; TABLE *table=tab->table;
/* /*
...@@ -7314,8 +7309,6 @@ make_outerjoin_info(JOIN *join) ...@@ -7314,8 +7309,6 @@ make_outerjoin_info(JOIN *join)
} }
} }
} }
top= FALSE;
}
DBUG_VOID_RETURN; DBUG_VOID_RETURN;
} }
......
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