Skip to content

Commit 93c3765

Browse files
authored
Update collations and make utf8mb4 default (go-sql-driver#877)
1 parent d3a0b0f commit 93c3765

File tree

4 files changed

+218
-199
lines changed

4 files changed

+218
-199
lines changed

README.md

+6-1
Original file line numberDiff line numberDiff line change
@@ -171,13 +171,18 @@ Unless you need the fallback behavior, please use `collation` instead.
171171
```
172172
Type: string
173173
Valid Values: <name>
174-
Default: utf8_general_ci
174+
Default: utf8mb4_general_ci
175175
```
176176

177177
Sets the collation used for client-server interaction on connection. In contrast to `charset`, `collation` does not issue additional queries. If the specified collation is unavailable on the target server, the connection will fail.
178178

179179
A list of valid charsets for a server is retrievable with `SHOW COLLATION`.
180180

181+
The default collation (`utf8mb4_general_ci`) is supported from MySQL 5.5. You should use an older collation (e.g. `utf8_general_ci`) for older MySQL.
182+
183+
Collations for charset "ucs2", "utf16", "utf16le", and "utf32" can not be used ([ref](https://dev.mysql.com/doc/refman/5.7/en/charset-connection.html#charset-connection-impermissible-client-charset)).
184+
185+
181186
##### `clientFoundRows`
182187

183188
```

0 commit comments

Comments
 (0)