From 8f6b62fb99713f0f93b286efc5693ba609f3d055 Mon Sep 17 00:00:00 2001 From: Morgan Tocker Date: Tue, 6 Nov 2018 15:07:27 +0100 Subject: [PATCH] [parser] mysql: NO_AUTO_CREATE_USER detect helper function (#10) * mysql: Add NO_AUTO_CREATE_USER detection --- parser/mysql/const.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/parser/mysql/const.go b/parser/mysql/const.go index 47623f1808e0a..efa4bce46e5f6 100644 --- a/parser/mysql/const.go +++ b/parser/mysql/const.go @@ -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