diff options
author | Varun Gupta <varun.gupta@mariadb.com> | 2020-02-28 11:46:13 +0530 |
---|---|---|
committer | Varun Gupta <varun.gupta@mariadb.com> | 2020-02-28 15:15:51 +0530 |
commit | 0c35e80dc9ff24bcb8e710cb8cb16428c8c9986f (patch) | |
tree | e9ad708728c8f3b50fe75cb38a8f1a57c379e0da /sql/sql_analyze_stmt.h | |
parent | 8db623038f7158529e804e9607362939bff37337 (diff) | |
download | mariadb-git-0c35e80dc9ff24bcb8e710cb8cb16428c8c9986f.tar.gz |
MDEV-21838: Add information about packed addon fields in ANALYZE FORMAT=JSON10.5-mdev21784-reg1-base
It is useful to know whether sorting uses addon fields[packed|unpacked] or ROWID.
Provide this information in ANALYZE FORMAT=JSON output.
Diffstat (limited to 'sql/sql_analyze_stmt.h')
-rw-r--r-- | sql/sql_analyze_stmt.h | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/sql/sql_analyze_stmt.h b/sql/sql_analyze_stmt.h index 9d5151c3be2..dfe29517b63 100644 --- a/sql/sql_analyze_stmt.h +++ b/sql/sql_analyze_stmt.h @@ -221,7 +221,9 @@ public: time_tracker(do_timing), r_limit(0), r_used_pq(0), r_examined_rows(0), r_sorted_rows(0), r_output_rows(0), sort_passes(0), - sort_buffer_size(0) + sort_buffer_size(0), + r_using_addons(false), + r_packed_addon_fields(false) {} /* Functions that filesort uses to report various things about its execution */ @@ -263,6 +265,14 @@ public: else sort_buffer_size= bufsize; } + + inline void report_addon_fields_format(bool addons_packed) + { + r_using_addons= true; + r_packed_addon_fields= addons_packed; + } + + void get_data_format(String *str); /* Functions to get the statistics */ void print_json_members(Json_writer *writer); @@ -322,6 +332,8 @@ private: other - value */ ulonglong sort_buffer_size; + bool r_using_addons; + bool r_packed_addon_fields; }; |