Skip to content
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

Wait OK after COM_QUIT #25

Merged
merged 1 commit into from Oct 14, 2018

Conversation

Projects
None yet
2 participants
@massimo-zaniboni
Copy link
Contributor

massimo-zaniboni commented Oct 9, 2018

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

This comment has been minimized.

Copy link
Owner

winterland1989 commented Oct 12, 2018

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

This comment has been minimized.

Copy link
Contributor Author

massimo-zaniboni commented Oct 12, 2018

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

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
@winterland1989

This comment has been minimized.

Copy link
Owner

winterland1989 commented Oct 14, 2018

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.