Commit 223cf9f5 authored by serg@serg.mysql.com's avatar serg@serg.mysql.com

make EXPLAIN killable

parent 7d24a792
...@@ -1703,7 +1703,7 @@ make_join_statistics(JOIN *join,TABLE_LIST *tables,COND *conds, ...@@ -1703,7 +1703,7 @@ make_join_statistics(JOIN *join,TABLE_LIST *tables,COND *conds,
sizeof(POSITION)*join->const_tables); sizeof(POSITION)*join->const_tables);
join->best_read=1.0; join->best_read=1.0;
} }
DBUG_RETURN(get_best_combination(join)); DBUG_RETURN(join->thd->killed || get_best_combination(join));
} }
...@@ -2532,6 +2532,8 @@ find_best(JOIN *join,table_map rest_tables,uint idx,double record_count, ...@@ -2532,6 +2532,8 @@ find_best(JOIN *join,table_map rest_tables,uint idx,double record_count,
swap(JOIN_TAB*,join->best_ref[idx],*pos); swap(JOIN_TAB*,join->best_ref[idx],*pos);
find_best(join,rest_tables & ~real_table_bit,idx+1, find_best(join,rest_tables & ~real_table_bit,idx+1,
current_record_count,current_read_time); current_record_count,current_read_time);
if (thd->killed)
return;
swap(JOIN_TAB*,join->best_ref[idx],*pos); swap(JOIN_TAB*,join->best_ref[idx],*pos);
} }
if (join->select_options & SELECT_STRAIGHT_JOIN) if (join->select_options & SELECT_STRAIGHT_JOIN)
......
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