Commit 80212484 authored by Sergey Petrunya's avatar Sergey Petrunya

MWL#90: Address review feedback part #15

parent ba300893
...@@ -6704,6 +6704,10 @@ get_best_combination(JOIN *join) ...@@ -6704,6 +6704,10 @@ get_best_combination(JOIN *join)
else if (create_ref_for_key(join, j, keyuse, used_tables)) else if (create_ref_for_key(join, j, keyuse, used_tables))
DBUG_RETURN(TRUE); // Something went wrong DBUG_RETURN(TRUE); // Something went wrong
loop_end: loop_end:
/*
Save records_read in JOIN_TAB so that select_describe()/etc don't have
to access join->best_positions[].
*/
j->records_read= (ha_rows)join->best_positions[tablenr].records_read; j->records_read= (ha_rows)join->best_positions[tablenr].records_read;
join->map2table[j->table->tablenr]= j; join->map2table[j->table->tablenr]= j;
...@@ -7765,7 +7769,7 @@ make_join_select(JOIN *join,SQL_SELECT *select,COND *cond) ...@@ -7765,7 +7769,7 @@ make_join_select(JOIN *join,SQL_SELECT *select,COND *cond)
/* First push down constant conditions from on expressions */ /* First push down constant conditions from on expressions */
for (JOIN_TAB *join_tab= first_linear_tab(join, WITHOUT_CONST_TABLES); for (JOIN_TAB *join_tab= first_linear_tab(join, WITHOUT_CONST_TABLES);
join_tab; join_tab;
join_tab= next_linear_tab(join, join_tab, WITHOUT_BUSH_ROOTS)) join_tab= next_linear_tab(join, join_tab, WITH_BUSH_ROOTS))
{ {
if (*join_tab->on_expr_ref) if (*join_tab->on_expr_ref)
{ {
......
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