summaryrefslogtreecommitdiff
path: root/sql/handler.h
diff options
context:
space:
mode:
authorSergey Petrunya <psergey@askmonty.org>2011-04-04 12:32:52 +0400
committerSergey Petrunya <psergey@askmonty.org>2011-04-04 12:32:52 +0400
commitd4ce827226828796ba46a134ac38dab0466730e5 (patch)
treeeab08cdebf883def344329b79412d4ec73490647 /sql/handler.h
parent997445bc8eb578355b41abc3f4e42f579f900043 (diff)
downloadmariadb-git-d4ce827226828796ba46a134ac38dab0466730e5.tar.gz
Amend the previous cset:
Make EXPLAIN better at displaying MRR/BKA: - Update all .result files - Extra comments
Diffstat (limited to 'sql/handler.h')
-rw-r--r--sql/handler.h16
1 files changed, 16 insertions, 0 deletions
diff --git a/sql/handler.h b/sql/handler.h
index 36cb81017c6..12413d6238a 100644
--- a/sql/handler.h
+++ b/sql/handler.h
@@ -1358,6 +1358,22 @@ void get_sweep_read_cost(TABLE *table, ha_rows nrows, bool interrupted,
*/
#define HA_MRR_MATERIALIZED_KEYS 256
+/*
+ The following bits are reserved for use by MRR implementation. The intended
+ use scenario:
+
+ * sql layer calls handler->multi_range_read_info[_const]()
+ - MRR implementation figures out what kind of scan it will perform, saves
+ the result in *mrr_mode parameter.
+ * sql layer remembers what was returned in *mrr_mode
+
+ * the optimizer picks the query plan (which may or may not include the MRR
+ scan that was estimated by the multi_range_read_info[_const] call)
+
+ * if the query is an EXPLAIN statement, sql layer will call
+ handler->multi_range_read_explain_info(mrr_mode) to get a text description
+ of the picked MRR scan; the description will be a part of EXPLAIN output.
+*/
#define HA_MRR_IMPLEMENTATION_FLAG1 512
#define HA_MRR_IMPLEMENTATION_FLAG2 1024
#define HA_MRR_IMPLEMENTATION_FLAG3 2048