Skip to content

Commit

Permalink
PMM-12375 use a different database
Browse files Browse the repository at this point in the history
  • Loading branch information
Alex Tymchuk committed Aug 30, 2023
1 parent 7865feb commit fb745dd
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions agent/connectionchecker/connection_checker.go
Original file line number Diff line number Diff line change
Expand Up @@ -289,15 +289,15 @@ func (cc *ConnectionChecker) checkProxySQLConnection(ctx context.Context, dsn st
res.Error = err.Error()
}

if _, err := db.ExecContext(ctx, "USE mysql"); err != nil {
res.Error = err.Error()
return &res
}
// if _, err := db.ExecContext(ctx, "USE mysql"); err != nil {
// res.Error = err.Error()
// return &res
// }

var version string
if err := db.QueryRowContext(
ctx,
"SELECT /* agent='connectionchecker' */ variable_value FROM global_variables WHERE variable_name = 'admin-version'").Scan(&version); err != nil { //nolint:lll
"SELECT /* agent='connectionchecker' */ variable_value FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES WHERE variable_name = 'admin-version'").Scan(&version); err != nil {
res.Error = err.Error()
return &res
}
Expand Down

0 comments on commit fb745dd

Please sign in to comment.