We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
System:
How to reproduce:
FLUSH PRIVILEGES;
Investigation: After checking I found the method packet.WritePublicKeyAuthPacket leaves dirty buffer after writing, causing sequence mismatch in the next read op https://github.com/siddontang/go-mysql/blob/0c5789dd0bd378b4b84f99b320a2d35a80d8858f/packet/conn.go#L250 I added an blank read op to clear the buffer and it works properly:
packet.WritePublicKeyAuthPacket
// return errors.Wrap(c.WritePacket(data), "WritePacket failed") err = c.WritePacket(data) if err != nil { return errors.Wrap(err, "WritePacket failed") } _, err = c.reader.Read(data) // clear dirty buffer return err
I think the same would happen to packet.WriteClearAuthPacket too, but I have not tested it yet
packet.WriteClearAuthPacket
I'm not sure this is the correct way to fix this as I'm not very experienced with Go, so I just open an issue here
The text was updated successfully, but these errors were encountered:
Start sync error: invalid sequence 8 != 1
Successfully merging a pull request may close this issue.
System:
How to reproduce:
FLUSH PRIVILEGES;
Investigation:
After checking I found the method
packet.WritePublicKeyAuthPacket
leaves dirty buffer after writing, causing sequence mismatch in the next read ophttps://github.com/siddontang/go-mysql/blob/0c5789dd0bd378b4b84f99b320a2d35a80d8858f/packet/conn.go#L250
I added an blank read op to clear the buffer and it works properly:
I think the same would happen to
packet.WriteClearAuthPacket
too, but I have not tested it yetI'm not sure this is the correct way to fix this as I'm not very experienced with Go, so I just open an issue here
The text was updated successfully, but these errors were encountered: