Commit db1545cf authored by Varun Gupta's avatar Varun Gupta

minor fix

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