diff --git a/global/status.go b/global/status.go index 498281e..9e7137e 100644 --- a/global/status.go +++ b/global/status.go @@ -9,7 +9,7 @@ import ( const ( informationSchemaGlobalStatus = "INFORMATION_SCHEMA.GLOBAL_STATUS" - performanceSchemaGlobalStatus = "performance_schema.global_status" + performanceSchemaGlobalStatus = "global_status" // no need to prefix the table with the ps schema, this is the default schema. ) // may be modified by usePerformanceSchema() diff --git a/global/variables.go b/global/variables.go index 4ce7e6d..d6aff6c 100644 --- a/global/variables.go +++ b/global/variables.go @@ -10,7 +10,7 @@ import ( const ( informationSchemaGlobalVariables = "INFORMATION_SCHEMA.GLOBAL_VARIABLES" - performanceSchemaGlobalVariables = "performance_schema.global_variables" + performanceSchemaGlobalVariables = "global_variables" // no need to prefix the table with the ps schema, this is the default schema. ) // may be modified by usePerformanceSchema() diff --git a/view/access_info.go b/view/access_info.go index 85f1234..7c6a5df 100644 --- a/view/access_info.go +++ b/view/access_info.go @@ -23,6 +23,10 @@ func NewAccessInfo(database, table string) AccessInfo { // Name returns the fully qualified table name func (ta AccessInfo) Name() string { + if ta.Database == "performance_schema" && len(ta.Table) > 0 { + // no need to prefix the table with the ps schema, this is the default schema. + return ta.Table + } if len(ta.Database) > 0 && len(ta.Table) > 0 { return ta.Database + "." + ta.Table }