Bug #58224 Assorted bugs in the VIO layer
Submitted: 16 Nov 2010 10:12
Reporter: Davi Arnaut (OCA) Email Updates:
Status: Verified Impact on me:
Category:MySQL Server: General Severity:S3 (Non-critical)
Version:5.5 OS:Windows
Assigned to: CPU Architecture:Any

[16 Nov 2010 10:12] Davi Arnaut
Although the dbug library saves and restores the value of errno when some of its hooks are invoked, this is not sufficient on Windows as certain errors are not signaled via errno. For example, certain Winsock related error will only be available through WSAGetLastError (or GetLastError), which might end up being reset depending on which function dbug invokes.

Another problem is that vio_fastsend and some other hooks in Vio are invoked even for transport types which do not implement it. For example, vio_fastsend is invoked for a Vio of type shared memory and will call setsockopt on a invalid socket.

The shm.test test case tests the connection with mysqladmin over a TCP/IP connection, whilst it could do so over a shared memory transport type.

How to repeat:
Code inspection.
[16 Nov 2010 13:22] MySQL Verification Team
reminded me of bug 28775 which makes debugging a black art :D