Commit f8349447 authored by Varun Gupta's avatar Varun Gupta

minor fix

parent 8e268505
......@@ -111,6 +111,7 @@ void print_best_access_for_table(THD *thd, POSITION *pos,
enum join_type type);
void add_sort_nest_tables_to_trace(JOIN *join,
Mat_join_tab_nest_info* nest_info);
void trace_sort_nest(JOIN *join, uint idx, table_map remaining_tables);
/*
Security related (need to add a proper comment here)
......
......@@ -5355,8 +5355,6 @@ make_join_statistics(JOIN *join, List<TABLE_LIST> &tables_list,
}
}
join->join_tab= stat;
join->make_notnull_conds_for_range_scans();
/*
Here a call is made to remove the constant from the order by clause,
this call would only remove the basic constants. This is done primarily
......@@ -5371,6 +5369,9 @@ make_join_statistics(JOIN *join, List<TABLE_LIST> &tables_list,
join->propagate_equal_field_for_orderby();
join->join_tab= stat;
join->make_notnull_conds_for_range_scans();
/* Calc how many (possible) matched records in each table */
/*
......@@ -9715,7 +9716,6 @@ best_extension_by_limited_search(JOIN *join,
{
position->sort_nest_operation_here= TRUE;
}
>>>>>>> ORDER BY LIMIT
/* Compute the cost of extending the plan with 's' */
current_record_count= COST_MULT(record_count, position->records_read);
......
......@@ -2285,7 +2285,8 @@ void best_access_path(JOIN *join, JOIN_TAB *s,
table_map remaining_tables,
const POSITION *join_positions, uint idx,
bool disable_jbuf, double record_count,
POSITION *pos, POSITION *loose_scan_pos);
POSITION *pos, POSITION *loose_scan_pos,
table_map sort_nest_tables, bool nest_created);
bool cp_buffer_from_ref(THD *thd, TABLE *table, TABLE_REF *ref);
bool error_if_full_join(JOIN *join);
int report_error(TABLE *table, int error);
......
......@@ -43,7 +43,7 @@ clause.
Let's say we have tables
t1, t2, t3, t4 .............tk,tk+1.........................tn
|<---------prefix------------>|<-------suffix--------------->
|<---------prefix------------>|<-------suffix--------------->|
and lets assume the prefix can resolve the ORDER BY clause and we can push
the LIMIT.
......@@ -124,7 +124,7 @@ Preparation of Sort Nest
Let's say we have the best join order as:
t1, t2, t3, t4 .............tk,tk+1.........................tn
|<---------prefix------------>|<-------suffix--------------->
|<---------prefix------------>|<-------suffix--------------->|
The array of join_tab structures would look like
......
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