summaryrefslogtreecommitdiff
path: root/storage/myisam
diff options
context:
space:
mode:
authorSergey Petrunya <psergey@askmonty.org>2011-04-02 14:04:45 +0400
committerSergey Petrunya <psergey@askmonty.org>2011-04-02 14:04:45 +0400
commit997445bc8eb578355b41abc3f4e42f579f900043 (patch)
tree1224e5382ffa0b158db9d4d109114ba28b6c361d /storage/myisam
parent886d84d6d15f17d91a37453875b386167a9fef76 (diff)
downloadmariadb-git-997445bc8eb578355b41abc3f4e42f579f900043.tar.gz
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.
Diffstat (limited to 'storage/myisam')
-rw-r--r--storage/myisam/ha_myisam.cc7
-rw-r--r--storage/myisam/ha_myisam.h3
2 files changed, 9 insertions, 1 deletions
diff --git a/storage/myisam/ha_myisam.cc b/storage/myisam/ha_myisam.cc
index 1edecf5289a..89bdd4597f8 100644
--- a/storage/myisam/ha_myisam.cc
+++ b/storage/myisam/ha_myisam.cc
@@ -2281,6 +2281,13 @@ ha_rows ha_myisam::multi_range_read_info(uint keyno, uint n_ranges, uint keys,
return ds_mrr.dsmrr_info(keyno, n_ranges, keys, key_parts, bufsz, flags, cost);
}
+
+int ha_myisam::multi_range_read_explain_info(uint mrr_mode, char *str,
+ size_t size)
+{
+ return ds_mrr.dsmrr_explain_info(mrr_mode, str, size);
+}
+
/* MyISAM MRR implementation ends */
diff --git a/storage/myisam/ha_myisam.h b/storage/myisam/ha_myisam.h
index 529d31b4a4a..9b9ca5c18d9 100644
--- a/storage/myisam/ha_myisam.h
+++ b/storage/myisam/ha_myisam.h
@@ -170,7 +170,8 @@ public:
ha_rows multi_range_read_info(uint keyno, uint n_ranges, uint keys,
uint key_parts, uint *bufsz,
uint *flags, COST_VECT *cost);
-
+ int multi_range_read_explain_info(uint mrr_mode, char *str, size_t size);
+
/* Index condition pushdown implementation */
Item *idx_cond_push(uint keyno, Item* idx_cond);
private: