Skip to content

Wait OK after COM_QUIT #25

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

Merged
merged 1 commit into from
Oct 14, 2018

Conversation

massimo-zaniboni
Copy link
Contributor

With recent versions of MySQL, the server, after receiving COM_QUIT, can send an optional OK packet. But this driver close the TCP connection before reading it. So in the server LOG there are many errors like this:

2018-10-06T11:26:06.781937Z 49 [Note] Aborted connection 49 to db: 'regression_tests_1' user: 'regression_tests_1' host: 'localhost' (Got an error reading communication packets)

There is no lost data, so the error is harmless. But it is "scaring" reading these errors in the LOG.

This patch is compatible also with older version of MySQL not sending the OK packet, like this mysql Ver 15.1 Distrib 5.5.60-MariaDB, for Linux (x86_64) using readline 5.1

Many thanks in any case for the wonderful work!

@winterland1989
Copy link
Owner

Thanks! I'll find time to test this with the latest MySQL to confirm this behavior. BTW. Is there any documentation on the MySQL site about this behavior?

@massimo-zaniboni
Copy link
Contributor Author

Is there any documentation on the MySQL site about this behavior?

https://dev.mysql.com/doc/internals/en/com-quit.html

In particular

response: either a connection close or a OK_Packet

@winterland1989 winterland1989 merged commit fff9ccc into winterland1989:master Oct 14, 2018
@winterland1989
Copy link
Owner

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants