Bug #106591 net_set_read_timeout、net_set_write_timeout value set
| Submitted: | 28 Feb 2022 4:10 | Modified: | 28 Feb 2022 7:05 |
|---|---|---|---|
| Reporter: | bin wang (OCA) | Email Updates: | |
| Status: | Verified | Impact on me: | |
| Category: | MySQL Server: Options | Severity: | S5 (Performance) |
| Version: | 8.0 | OS: | Any |
| Assigned to: | CPU Architecture: | Any |
[28 Feb 2022 4:10]
bin wang
suggested add patch
Attachment: net_serv.patch (application/octet-stream, text), 769 bytes.
[28 Feb 2022 7:05]
MySQL Verification Team
Hello bin wang, Thank you for the report and feedback. regards, Umesh
Portions of this website are copyright © 2001, 2002 The PHP Group
Page generated in 0.058 sec. using MySQL 8.4.7-u6-cloud
Timestamp references displayed by the system are UTC.
Content reproduced on this site is the property of the
respective copyright holders.
It is not reviewed in advance
by Oracle and does not necessarily represent the opinion of
Oracle or any other party.
Description: when set read_timeout and write_timeout If default value is equal to user option It is not necessary to call function may cost few time. How to repeat: just add if default value is equal to user option then return Suggested fix: suggest add void my_net_set_read_timeout(NET *net, uint timeout) { DBUG_TRACE; DBUG_PRINT("enter", ("timeout: %d", timeout)); ++ if (net->read_timeout == timeout) return; net->read_timeout = timeout; if (net->vio) vio_timeout(net->vio, 0, timeout); } void my_net_set_write_timeout(NET *net, uint timeout) { DBUG_TRACE; DBUG_PRINT("enter", ("timeout: %d", timeout)); ++ if (net->write_timeout == timeout) return; net->write_timeout = timeout; if (net->vio) vio_timeout(net->vio, 1, timeout); }