Skip to content

Commit

Permalink
[parser] mysql: update sql-mode default (#45)
Browse files Browse the repository at this point in the history
Change TiDB to use same default as MySQL 5.7
  • Loading branch information
morgo authored and ti-chi-bot committed Oct 9, 2021
1 parent 2876e28 commit 8a1ddc4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion parser/mysql/const.go
Original file line number Diff line number Diff line change
Expand Up @@ -399,7 +399,7 @@ var AllColumnPrivs = []PrivilegeType{SelectPriv, InsertPriv, UpdatePriv}
const AllPrivilegeLiteral = "ALL PRIVILEGES"

// DefaultSQLMode for GLOBAL_VARIABLES
const DefaultSQLMode = "ONLY_FULL_GROUP_BY,STRICT_TRANS_TABLES,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION"
const DefaultSQLMode = "ONLY_FULL_GROUP_BY,STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION"

// DefaultLengthOfMysqlTypes is the map for default physical length of MySQL data types.
// See http://dev.mysql.com/doc/refman/5.7/en/storage-requirements.html
Expand Down

0 comments on commit 8a1ddc4

Please sign in to comment.