Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion global/status.go
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
2 changes: 1 addition & 1 deletion global/variables.go
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
4 changes: 4 additions & 0 deletions view/access_info.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down