Bug #86356 | please send COM_QUIT and read EOF with recv() in mysql_close(). | ||
---|---|---|---|
Submitted: | 17 May 2017 14:13 | Modified: | 16 Nov 2017 4:20 |
Reporter: | Takanori Sejima | Email Updates: | |
Status: | Verified | Impact on me: | |
Category: | MySQL Server: C API (client library) | Severity: | S4 (Feature request) |
Version: | 5.7.18 | OS: | Linux |
Assigned to: | CPU Architecture: | Any |
[17 May 2017 14:13]
Takanori Sejima
[17 May 2017 15:47]
Takanori Sejima
Using COM_QUIT allows sending FIN from mysqld, but it is not good that TIME_WAIT remains in the client that sent COM_QUIT.
[16 Nov 2017 4:20]
MySQL Verification Team
Hello Takanori-San, Thank you for the feature request and feedback! Thanks, Umesh
[6 Jul 2018 8:18]
Yoshinori Matsunobu
I think the change will be as simple as the following. @@ -6368,12 +6368,11 @@ void STDCALL mysql_close(MYSQL *mysql) - simple_command(mysql,COM_QUIT,(uchar*) 0,0,1); + simple_command(mysql,COM_QUIT,(uchar*) 0,0,0); The change will have a side effect that closing a connection involves additional round trip, so some people may not like the change. It would make more sense to add a client option to control the behavior.