Skip to content

Commit

Permalink
executor: notify TiDB update privilege after alter/drop user (pingcap…
Browse files Browse the repository at this point in the history
  • Loading branch information
tiancaiamao committed Nov 27, 2017
1 parent b8bcf9c commit 6bae14a
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions executor/simple.go
Original file line number Diff line number Diff line change
Expand Up @@ -218,6 +218,7 @@ func (e *SimpleExec) executeAlterUser(s *ast.AlterUserStmt) error {
errMsg := "Operation ALTER USER failed for " + strings.Join(failedUsers, ",")
return terror.ClassExecutor.New(CodeCannotUser, errMsg)
}
domain.GetDomain(e.ctx).NotifyUpdatePrivilege(e.ctx)
return nil
}

Expand Down Expand Up @@ -249,6 +250,7 @@ func (e *SimpleExec) executeDropUser(s *ast.DropUserStmt) error {
errMsg := "Operation DROP USER failed for " + strings.Join(failedUsers, ",")
return terror.ClassExecutor.New(CodeCannotUser, errMsg)
}
domain.GetDomain(e.ctx).NotifyUpdatePrivilege(e.ctx)
return nil
}

Expand Down

0 comments on commit 6bae14a

Please sign in to comment.