From 70958285d5ba4dd015ba72dac01c794ae6e98354 Mon Sep 17 00:00:00 2001 From: Simon J Mudd Date: Thu, 4 Dec 2014 18:56:36 +0100 Subject: [PATCH] Match $datadir and show as for odd stuff --- .../file_summary_by_instance_row.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/performance_schema/file_summary_by_instance/file_summary_by_instance_row.go b/performance_schema/file_summary_by_instance/file_summary_by_instance_row.go index 3e6b908..711b742 100644 --- a/performance_schema/file_summary_by_instance/file_summary_by_instance_row.go +++ b/performance_schema/file_summary_by_instance/file_summary_by_instance_row.go @@ -274,6 +274,12 @@ func (t file_summary_by_instance_row) simple_name(global_variables map[string]st if re_charset.MatchString(path) == true { return cache.Put(path, "") } + // clean up datadir to + if len(global_variables["datadir"]) > 0 { + re_datadir := regexp.MustCompile("^" + global_variables["datadir"]) + path = re_datadir.ReplaceAllLiteralString(path, "/") + } + return cache.Put(path, path) } -- 2.20.1