Bug #115191 optimize for net_write_buff
| Submitted: | 1 Jun 2024 4:29 | Modified: | 1 Jun 2024 8:59 |
|---|---|---|---|
| Reporter: | alex xing (OCA) | Email Updates: | |
| Status: | Verified | Impact on me: | |
| Category: | MySQL Server: Compiling | Severity: | S5 (Performance) |
| Version: | 8.0.37 | OS: | Any |
| Assigned to: | CPU Architecture: | Any | |
| Tags: | Contribution | ||
[1 Jun 2024 4:30]
alex xing
a simple patch to describe the optimization (*) I confirm the code being submitted is offered under the terms of the OCA, and that I am authorized to contribute it.
Contribution: optimize_net_write_buff.patch (application/octet-stream, text), 966 bytes.
[1 Jun 2024 8:59]
MySQL Verification Team
Hello Alex Xing, Thank you for the report and contribution. regards, umesh
Portions of this website are copyright © 2001, 2002 The PHP Group
Page generated in 0.038 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: optimize for net_write_buff if Send empty packet, the parameter(size_t len) of my_net_write is 0. And in this case , the parameter(size_t len) of net_write_buff is also 0. just like code in handle_local_infile: handle_local_infile(){ (void)my_net_write(net, (const uchar *)"", 0); /* Server needs one packet */ } my_net_write(){ return net_write_buff(net, packet, len); } In this case, there is no need for some judgment logic for net_write_buff How to repeat: just read the code Suggested fix: optimize as the below patch