Skip to content

Commit

Permalink
executor: notify TiDB update privilege after alter/drop user (#5226) (#…
Browse files Browse the repository at this point in the history
…5232)

* executor: notify TiDB update privilege after alter/drop user (#5226)

* fix CI
  • Loading branch information
tiancaiamao authored and coocood committed Nov 29, 2017
1 parent b8bcf9c commit a80e796
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)
}
sessionctx.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)
}
sessionctx.GetDomain(e.ctx).NotifyUpdatePrivilege(e.ctx)
return nil
}

Expand Down

0 comments on commit a80e796

Please sign in to comment.