Bug #62285 don't initialize vio string description, create it on demand

Submitted: 28 Aug 2011 22:00 Modified: 19 Mar 2012 15:49
Reporter: Domas Mituzas Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Locking Severity:S3 (Non-critical)
Version: OS:Any
Assigned to: CPU Architecture:Any

[28 Aug 2011 22:00] Domas Mituzas
Description:
this code:

sprintf(vio->desc,
   (vio->type == VIO_TYPE_SOCKET ? "socket (%d)" : "TCP/IP (%d)"),
   vio->sd);

takes quite some time in socket creation path, yet it is not needed at all in non-debug builds. have this string built in vio_description() instead of vio_new()

How to repeat:
connect to mysql

Suggested fix:
create string in vio_description() instead of vio_new() as all the data is in vio object anyway
[19 Mar 2012 15:49] Paul DuBois
Noted in 5.6.5 changelog.

The VIO description string was initialized even for connections where
it was unneeded.

Portions of this website are copyright © 2001, 2002 The PHP Group

Page generated in 0.049 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.