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 and xhebox committed Oct 8, 2021
1 parent e33bd48 commit 8f6b62f
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 8f6b62f

Please sign in to comment.