From c102abdccdb180ab73e4de52bf16639db5bd68a9 Mon Sep 17 00:00:00 2001 From: Zejun Li Date: Sat, 12 Jan 2019 14:55:49 +0800 Subject: [PATCH] add HasAllowInvalidDatesMode --- mysql/const.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/mysql/const.go b/mysql/const.go index 3ab0fed97..5611ae86a 100644 --- a/mysql/const.go +++ b/mysql/const.go @@ -511,6 +511,11 @@ func (m SQLMode) HasNoAutoCreateUserMode() bool { return m&ModeNoAutoCreateUser == ModeNoAutoCreateUser } +// HasAllowInvalidDatesMode detects if 'ALLOW_INVALID_DATES' mode is set in SQLMode +func (m SQLMode) HasAllowInvalidDatesMode() bool { + return m&ModeAllowInvalidDates == ModeAllowInvalidDates +} + // consts for sql modes. const ( ModeNone SQLMode = 0