Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion client/auth.go
Original file line number Diff line number Diff line change
Expand Up @@ -275,7 +275,7 @@ func (c *Conn) writeAuthHandshake() error {
data[11] = 0x00

// Charset [1 byte]
// use default collation id 33 here, is `utf8mb3_general_ci`
// use default collation id 255 here, is `utf8mb4_0900_ai_ci`
collationName := c.collation
if len(collationName) == 0 {
collationName = DEFAULT_COLLATION_NAME
Expand Down
8 changes: 4 additions & 4 deletions mysql/const.go
Original file line number Diff line number Diff line change
Expand Up @@ -183,10 +183,10 @@ const (
DEFAULT_IPV6_ADDR = "[::1]:3306"
DEFAULT_USER = "root"
DEFAULT_PASSWORD = ""
DEFAULT_FLAVOR = "mysql"
DEFAULT_CHARSET = "utf8"
DEFAULT_COLLATION_ID uint8 = 33
DEFAULT_COLLATION_NAME string = "utf8_general_ci"
DEFAULT_FLAVOR = MySQLFlavor
DEFAULT_CHARSET = "utf8mb4"
DEFAULT_COLLATION_ID uint8 = 255
DEFAULT_COLLATION_NAME string = "utf8mb4_0900_ai_ci"
)

const (
Expand Down
Loading