Skip to content

Commit 5b77261

Browse files
committed
rm reduundant GetSessionVariable
1 parent a135718 commit 5b77261

File tree

1 file changed

+0
-3
lines changed

1 file changed

+0
-3
lines changed

sql/types/enum.go

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -221,9 +221,6 @@ func (t EnumType) isStrictMode(ctx context.Context) bool {
221221
if sqlCtx, ok := ctx.(*sql.Context); ok {
222222
// Try the direct context method first
223223
sysVal, err := sqlCtx.GetSessionVariable(sqlCtx, "sql_mode")
224-
if err != nil {
225-
sysVal, err = sqlCtx.GetSessionVariable(sqlCtx, "SQL_MODE")
226-
}
227224
if err == nil {
228225
if sqlMode, ok := sysVal.(string); ok {
229226
return strings.Contains(sqlMode, "STRICT_TRANS_TABLES") || strings.Contains(sqlMode, "STRICT_ALL_TABLES")

0 commit comments

Comments
 (0)