Commit 9111d6ff 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 e1502271
......@@ -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 */
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()))
{
......
......@@ -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
has been chosen.
*/
static void
make_outerjoin_info(JOIN *join)
{
DBUG_ENTER("make_outerjoin_info");
bool top= TRUE;
List_iterator<JOIN_TAB_RANGE> it(join->join_tab_ranges);
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++)
for (JOIN_TAB *tab= first_linear_tab(join, TRUE); tab;
tab= next_linear_tab(join, tab, FALSE))
{
TABLE *table=tab->table;
/*
......@@ -7314,8 +7309,6 @@ make_outerjoin_info(JOIN *join)
}
}
}
top= FALSE;
}
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