Skip to content

Commit

Permalink
privileges: Fix panic when using skip-grant-table (#27558) (#27559)
Browse files Browse the repository at this point in the history
  • Loading branch information
ti-srebot authored Aug 25, 2021
1 parent 3d88be8 commit 9d798d5
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions privilege/privileges/privileges.go
Original file line number Diff line number Diff line change
Expand Up @@ -221,6 +221,10 @@ func (p *UserPrivileges) GetEncodedPassword(user, host string) string {

// GetAuthPlugin gets the authentication plugin for the account identified by the user and host
func (p *UserPrivileges) GetAuthPlugin(user, host string) (string, error) {
if SkipWithGrant {
return mysql.AuthNativePassword, nil
}

mysqlPriv := p.Handle.Get()
record := mysqlPriv.connectionVerification(user, host)
if record == nil {
Expand Down

0 comments on commit 9d798d5

Please sign in to comment.