Skip to content

Commit 979321c

Browse files
jycorJames Cor
andauthored
support no_auto_create_user sql_mode (#2769)
Co-authored-by: James Cor <[email protected]>
1 parent b2756d7 commit 979321c

File tree

2 files changed

+11
-1
lines changed

2 files changed

+11
-1
lines changed

enginetest/queries/variable_queries.go

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -328,6 +328,16 @@ var VariableQueries = []ScriptTest{
328328
{"ALLOW_INVALID_DATES"},
329329
},
330330
},
331+
{
332+
Name: "set system variable to no_auto_create_user, which has been deprecated",
333+
SetUpScript: []string{
334+
`set sql_mode = NO_AUTO_CREATE_USER`,
335+
},
336+
Query: "SELECT @@sql_mode",
337+
Expected: []sql.Row{
338+
{"NO_AUTO_CREATE_USER"},
339+
},
340+
},
331341
{
332342
Name: "set sql_mode variable from mysqldump",
333343
SetUpScript: []string{

sql/variables/system_variables.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2438,7 +2438,7 @@ var systemVars = map[string]sql.SystemVariable{
24382438
Scope: sql.GetMysqlScope(sql.SystemVariableScope_Both),
24392439
Dynamic: true,
24402440
SetVarHintApplies: true,
2441-
Type: types.NewSystemSetType("sql_mode", sql.Collation_utf8mb4_0900_ai_ci, "ALLOW_INVALID_DATES", "ANSI_QUOTES", "ERROR_FOR_DIVISION_BY_ZERO", "HIGH_NOT_PRECEDENCE", "IGNORE_SPACE", "NO_AUTO_VALUE_ON_ZERO", "NO_BACKSLASH_ESCAPES", "NO_DIR_IN_CREATE", "NO_ENGINE_SUBSTITUTION", "NO_UNSIGNED_SUBTRACTION", "NO_ZERO_DATE", "NO_ZERO_IN_DATE", "ONLY_FULL_GROUP_BY", "PAD_CHAR_TO_FULL_LENGTH", "PIPES_AS_CONCAT", "REAL_AS_FLOAT", "STRICT_ALL_TABLES", "STRICT_TRANS_TABLES", "TIME_TRUNCATE_FRACTIONAL", "TRADITIONAL", "ANSI"),
2441+
Type: types.NewSystemSetType("sql_mode", sql.Collation_utf8mb4_0900_ai_ci, "ALLOW_INVALID_DATES", "ANSI_QUOTES", "ERROR_FOR_DIVISION_BY_ZERO", "HIGH_NOT_PRECEDENCE", "IGNORE_SPACE", "NO_AUTO_VALUE_ON_ZERO", "NO_AUTO_CREATE_USER", "NO_BACKSLASH_ESCAPES", "NO_DIR_IN_CREATE", "NO_ENGINE_SUBSTITUTION", "NO_UNSIGNED_SUBTRACTION", "NO_ZERO_DATE", "NO_ZERO_IN_DATE", "ONLY_FULL_GROUP_BY", "PAD_CHAR_TO_FULL_LENGTH", "PIPES_AS_CONCAT", "REAL_AS_FLOAT", "STRICT_ALL_TABLES", "STRICT_TRANS_TABLES", "TIME_TRUNCATE_FRACTIONAL", "TRADITIONAL", "ANSI"),
24422442
Default: sql.DefaultSqlMode,
24432443
},
24442444
"sql_notes": &sql.MysqlSystemVariable{

0 commit comments

Comments
 (0)