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.