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.
[!NOTE]
The above change in proto library usage introduces a minor behavior change within those libraries. The old github.com/golang/protobuf library would error if given a nil message to Marshal, while the new google.golang.org/protobuf library will successfully output zero bytes in this case. This means server method handlers that did return nil, nil will now return an empty message and no error, while it used to return an error. This also affects the client side, where clients sending nil messages used to fail without sending the RPC, and now they will send an empty message.
Release 1.61.1
Bug Fixes
server: wait to close connection until incoming socket is drained (with timeout) to prevent data loss on client-side (#6977)
Special Thanks: @s-matyukevich for discovering the root cause
Updates google.golang.org/protobuf from 1.32.0 to 1.33.0
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 major version` will close this group update PR and stop Dependabot creating any more for the specific dependency's major version (unless you unignore this specific dependency's major version or upgrade to it yourself)
- `@dependabot ignore minor version` will close this group update PR and stop Dependabot creating any more for the specific dependency's minor version (unless you unignore this specific dependency's minor version or upgrade to it yourself)
- `@dependabot ignore ` will close this group update PR and stop Dependabot creating any more for the specific dependency (unless you unignore this specific dependency or upgrade to it yourself)
- `@dependabot unignore ` will remove all of the ignore conditions of the specified dependency
- `@dependabot unignore ` will remove the ignore condition of the specified dependency and ignore conditions
Bumps the minor-patch group with 4 updates: github.com/go-sql-driver/mysql, github.com/stretchr/testify, google.golang.org/grpc and google.golang.org/protobuf.
Updates
github.com/go-sql-driver/mysql
from 1.7.1 to 1.8.0Release 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)Updates
github.com/stretchr/testify
from 1.8.4 to 1.9.0Release notes
Sourced from github.com/stretchr/testify's releases.
... (truncated)
Commits
bb548d0
Merge pull request #1552 from stretchr/dependabot/go_modules/github.com/stret...814075f
build(deps): bump github.com/stretchr/objx from 0.5.1 to 0.5.2e045612
Merge pull request #1339 from bogdandrutu/uintptr5b6926d
Merge pull request #1385 from hslatman/not-implements9f97d67
Merge pull request #1550 from stretchr/release-notesbcb0d3f
Include the auto-release notes in releasesfb770f8
Merge pull request #1247 from ccoVeille/typos85d8bb6
fix typos in comments, tests and github templatese2741fa
Merge pull request #1548 from arjunmahishi/msgAndArgs6e59f20
http_assertions: assert that the msgAndArgs actually works in testsUpdates
google.golang.org/grpc
from 1.57.0 to 1.62.1Release notes
Sourced from google.golang.org/grpc's releases.
... (truncated)
Commits
9952aa8
Change version to 1.62.1 (#7020)d7334c4
fix enabling compression by trimming whitespaces in accept encoding header (#...d076e14
rpc_util: Fix RecvBufferPool deactivation issues (#6766)9d981b0
cherry-pick #6997 to 1.62.x release branch (#6979) (#7018)7c4b553
Switch version to 1.62.1-dev (#6995)d715b2e
Change version to 1.62.0 (#6994)d706a42
cherry-pick #6926 to 1.62 release branch (#6986)8a4ca0c
cherry-pick #6977 to 1.62.x release branch (#6979)d41b01d
encoding: fix typo (#6966)c2b50ee
deps: fix backwards compatibility with encoding (#6965)Updates
google.golang.org/protobuf
from 1.32.0 to 1.33.0Dependabot 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