Skip to content

Wait OK after COM_QUIT#25

Merged
winterland1989 merged 1 commit intowinterland1989:masterfrom
massimo-zaniboni:master
Oct 14, 2018
Merged

Wait OK after COM_QUIT#25
winterland1989 merged 1 commit intowinterland1989:masterfrom
massimo-zaniboni:master

Conversation

@massimo-zaniboni
Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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