New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ErrPktSyncMul is returned when the client is blocked by the server #1038
Comments
I tested across versions, and it seems to be a bug with MariaDB 10.2+
I'll leave it up to the maintainer that reads the issue if it's something that needs to be handled, but I'll also report the issue to MariaDB. |
I posted an issue in the MariaDB bug tracker as well. |
It would be nice if this could be handled by the library -- I hit this quite frequently for various reasons and it makes debugging a pain (you can only really debug this with |
I don't know why other clients can read error message although packet number is wrong. |
There's an extract of the packet capture in the MariaDB issue (but it really isn't much, it's the 4 bytes in the response). I think it's ignored in other libraries mostly because it's an error, who cares what the packet number is, the connection isn't allowed, throw an error and handle it like any other error, and I assume they check the packet number much later in the response processing. |
Packet capture: mariadb.pcap.zip MariaDB 10.1 (pre-bug):
MariaDB 10.4 (post-bug added in 10.2):
|
I'm sorry this too so long to fix in MariaDB (MDEV-21252). This will be included in the next releases 10.2.42, 10.3.33, 10.4.23, 10.5.14, 10.6.6, 10.7.2. |
Issue description
Connecting to a server when the server has blocked the client for too many failed connections returns
commands out of sync. Did you run multiple statements at once?
. The mysql client returns a much more clearer and easier to repair messageERROR 1129 (HY000): Host 'X.X.X.X' is blocked because of many connection errors; unblock with 'mysqladmin flush-hosts'
.Is it possible to return better errors, or even retrieve the message returned by the server ?
I know this isn't a fix, but changing the check in packets.go to this:
changes the output of my example to:
which is far more readable.
Example code
Error log
Configuration
Go version: go version go1.13.1 darwin/amd64
Server version: 10.4.10-MariaDB-1:10.4.10+maria~bionic
Server OS: macOS/docker for repeating test.
Testing Repository: koshatul/go-mysql-sync-issue
The text was updated successfully, but these errors were encountered: