Skip to content

Commit

Permalink
Add log for error to help debug (#14632)
Browse files Browse the repository at this point in the history
  • Loading branch information
GuptaManan100 authored Nov 29, 2023
1 parent f892be0 commit c368b51
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions go/vt/vttablet/tabletserver/tabletserver.go
Original file line number Diff line number Diff line change
Expand Up @@ -246,6 +246,9 @@ func WaitForDBAGrants(config *tabletenv.TabletConfig, waitTime time.Duration) er
conn, err := dbconnpool.NewDBConnection(ctx, config.DB.DbaConnector())
if err == nil {
res, fetchErr := conn.ExecuteFetch("SHOW GRANTS", 1000, false)
if fetchErr != nil {
log.Errorf("Error running SHOW GRANTS - %v", fetchErr)
}
if fetchErr == nil && res != nil && len(res.Rows) > 0 && len(res.Rows[0]) > 0 {
privileges := res.Rows[0][0].ToString()
// In MySQL 8.0, all the privileges are listed out explicitly, so we can search for SUPER in the output.
Expand Down

0 comments on commit c368b51

Please sign in to comment.