From 997445bc8eb578355b41abc3f4e42f579f900043 Mon Sep 17 00:00:00 2001 From: Sergey Petrunya Date: Sat, 2 Apr 2011 14:04:45 +0400 Subject: Make EXPLAIN better at displaying MRR/BKA: - "Using MRR" is no longer shown with range access. - Instead, both range and BKA accesses will show one of the following: = "Rowid-ordered scan" = "Key-ordered scan" = "Key-ordered Rowid-ordered scan" depending on whether DS-MRR implementation will do scan keys in order, rowids in order, or both. - The patch also introduces a way for other storage engines/MRR implementations to pass information to EXPLAIN output about the properties of employed MRR scans. --- sql/sql_join_cache.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'sql/sql_join_cache.h') diff --git a/sql/sql_join_cache.h b/sql/sql_join_cache.h index 5498192122f..920b7a507c1 100644 --- a/sql/sql_join_cache.h +++ b/sql/sql_join_cache.h @@ -637,7 +637,7 @@ public: enum_nested_loop_state join_records(bool skip_last); /* Add a comment on the join algorithm employed by the join cache */ - void print_explain_comment(String *str); + virtual void print_explain_comment(String *str); virtual ~JOIN_CACHE() {} void reset_join(JOIN *j) { join= j; } @@ -1315,6 +1315,7 @@ public: /* Check index condition of the joined table for a record from BKA cache */ bool skip_index_tuple(range_id_t range_info); + void print_explain_comment(String *str); }; @@ -1404,4 +1405,6 @@ public: /* Check index condition of the joined table for a record from BKAH cache */ bool skip_index_tuple(range_id_t range_info); + + void print_explain_comment(String *str); }; -- cgit v1.2.1