diff options
author | Oleksandr Byelkin <sanja@mariadb.com> | 2015-04-02 18:19:33 +0200 |
---|---|---|
committer | Oleksandr Byelkin <sanja@mariadb.com> | 2015-04-03 15:37:27 +0200 |
commit | a220905083c382bec096dd1435b6620d348bbfeb (patch) | |
tree | 15cb6f7d3d7bd05d47568662cb74641d073675f6 /sql/sql_explain.h | |
parent | 7f613ebdb6865e2d1304d20977764b523f6a5080 (diff) | |
download | mariadb-git-a220905083c382bec096dd1435b6620d348bbfeb.tar.gz |
MDEV-7833:ANALYZE FORMAT=JSON and Range checked for each record
Diffstat (limited to 'sql/sql_explain.h')
-rw-r--r-- | sql/sql_explain.h | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/sql/sql_explain.h b/sql/sql_explain.h index 65027bdc907..97a04573361 100644 --- a/sql/sql_explain.h +++ b/sql/sql_explain.h @@ -54,7 +54,7 @@ it into the slow query log. class String_list: public List<char> { public: - bool append_str(MEM_ROOT *mem_root, const char *str); + const char *append_str(MEM_ROOT *mem_root, const char *str); }; class Json_writer; @@ -622,11 +622,29 @@ private: It's a set of keys, tabular explain prints hex bitmap, json prints key names. */ +typedef const char* NAME; + class Explain_range_checked_fer : public Sql_alloc { public: String_list key_set; key_map keys_map; +private: + ha_rows full_scan, index_merge; + ha_rows *keys_stat; + NAME *keys_stat_names; + uint keys; + +public: + Explain_range_checked_fer() + :Sql_alloc(), full_scan(0), index_merge(0), + keys_stat(0), keys_stat_names(0), keys(0) + {} + + int append_possible_keys_stat(MEM_ROOT *alloc, + TABLE *table, key_map possible_keys); + void collect_data(QUICK_SELECT_I *quick); + void print_json(Json_writer *writer, bool is_analyze); }; /* |