summaryrefslogtreecommitdiff
path: root/sql/filesort.cc
diff options
context:
space:
mode:
authorVarun Gupta <varun.gupta@mariadb.com>2020-02-28 11:46:13 +0530
committerVarun Gupta <varun.gupta@mariadb.com>2020-02-28 15:15:51 +0530
commit0c35e80dc9ff24bcb8e710cb8cb16428c8c9986f (patch)
treee9ad708728c8f3b50fe75cb38a8f1a57c379e0da /sql/filesort.cc
parent8db623038f7158529e804e9607362939bff37337 (diff)
downloadmariadb-git-10.5-mdev21784-reg1-base.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/filesort.cc')
-rw-r--r--sql/filesort.cc6
1 files changed, 6 insertions, 0 deletions
diff --git a/sql/filesort.cc b/sql/filesort.cc
index 763f9f59246..34fecd516b4 100644
--- a/sql/filesort.cc
+++ b/sql/filesort.cc
@@ -298,6 +298,12 @@ SORT_INFO *filesort(THD *thd, TABLE *table, Filesort *filesort,
tracker->report_sort_buffer_size(sort->sort_buffer_size());
}
+ if (param.using_addon_fields())
+ {
+ // report information whether addon fields are packed or not
+ tracker->report_addon_fields_format(param.using_packed_addons());
+ }
+
if (open_cached_file(&buffpek_pointers,mysql_tmpdir,TEMP_PREFIX,
DISK_BUFFER_SIZE, MYF(MY_WME)))
goto err;