Older go-mysql-driver used collation_id in the handshake packet. But it caused collation mismatch in some situation.
If you don't specify charset nor collation, go-mysql-driver sends SET NAMES utf8mb4 for new connection. This uses server's default collation for utf8mb4.
If you specify charset, go-mysql-driver sends SET NAMES <charset>. This uses the server's default collation for <charset>.
If you specify collation and/or charset, go-mysql-driver sends SET NAMES charset COLLATE collation.
When text protocol is used, go-mysql-driver passed bare []byte to database/sql for avoid unnecessary allocation and conversion.
If user specified *any to Scan(), database/sql passed the []byte into the target variabe.
This confused users because most user doesn't know when text/binary protocol used.
go-mysql-driver 1.8 converts integer/float values into int64/double even in text protocol. This doesn't increase allocation compared to []byte and conversion cost is negilible.
New options start using the Functional Option Pattern to avoid increasing technical debt in the Config object. Future version may introduce Functional Option for existing options, but not for now.
Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
- `@dependabot show ignore conditions` will show all of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
Bumps github.com/go-sql-driver/mysql from 1.7.1 to 1.8.0.
Release notes
Sourced from github.com/go-sql-driver/mysql's releases.
... (truncated)
Commits
33b7747
Add BeforeConnect callback to configuration object (#1469)6964272
Make TimeTruncate functional option (#1552)097fe6e
Update workflows (#1547)f019727
add TiDB support in README.md (#1333)743e263
IntroducetimeTruncate
parameter fortime.Time
arguments (#1541)c48c0e7
Fix unsigned int overflow (#1530)0004702
Parallelize test (#1525)d4517c5
Support ENUM and SET type in DatabaseTypeName() (#1520)2cdf624
Fix sql.RawBytes corruption issue (#1523)fc589cb
Add client_ed25519 authentication (#1518)Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting
@dependabot rebase
.Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show