Skip to content

Commit

Permalink
[parser] mysql: NO_AUTO_CREATE_USER detect helper function (pingcap#10)
Browse files Browse the repository at this point in the history
* mysql: Add NO_AUTO_CREATE_USER detection
  • Loading branch information
morgo authored Nov 6, 2018
1 parent 3a19290 commit ac83b0e
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions parser/mysql/const.go
Original file line number Diff line number Diff line change
Expand Up @@ -506,6 +506,11 @@ func (m SQLMode) HasIgnoreSpaceMode() bool {
return m&ModeIgnoreSpace == ModeIgnoreSpace
}

// HasNoAutoCreateUserMode detects if 'NO_AUTO_CREATE_USER' mode is set in SQLMode
func (m SQLMode) HasNoAutoCreateUserMode() bool {
return m&ModeNoAutoCreateUser == ModeNoAutoCreateUser
}

// consts for sql modes.
const (
ModeNone SQLMode = 0
Expand Down

0 comments on commit ac83b0e

Please sign in to comment.