Bug #8596 client returns an emtpy result set if server has packet write timeouts
Submitted: 18 Feb 2005 9:37 Modified: 18 Feb 2005 20:57
Reporter: Dino Tsoumakis Email Updates:
Status: Can't repeat Impact on me:
None 
Category:MySQL Server Severity:S3 (Non-critical)
Version:4.1.10 OS:Linux (SuSE Linux 8.1 (2.4.21, i686))
Assigned to: CPU Architecture:Any

[18 Feb 2005 9:37] Dino Tsoumakis
Description:
It seems that the client doesn't provide an error message, if the server has packet write timeouts cause of network problems. The client resturns the rows fetched so far (or an empty result set if there haven't been any) instead.

This is irritating, because it fakes there are no rows for this query.

How to repeat:
I don't really know, but I think this is because of a slow or even instable TCP/IP Connection between Client and Server.

We the client interface showing:
ppp0      Link encap:Point-to-Point Protocol
          inet addr:192.168.0.34  P-t-P:192.168.0.33  Mask:255.255.255.255
          UP POINTOPOINT RUNNING NOARP MULTICAST  MTU:1500  Metric:1
          RX packets:434 errors:0 dropped:0 overruns:0 frame:0
          TX packets:664 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:3
          RX bytes:33739 (32.9 Kb)  TX bytes:99452 (97.1 Kb)

and the server interface showing:
ippp0     Link encap:Point-to-Point Protocol
          inet addr:192.168.0.33  P-t-P:192.168.0.34  Mask:255.255.255.255
          UP POINTOPOINT RUNNING NOARP  MTU:1500  Metric:1
          RX packets:12246 errors:0 dropped:0 overruns:0 frame:0
          TX packets:8179 errors:201 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:30
          RX bytes:1400365 (1.3 Mb)  TX bytes:1481079 (1.4 Mb)

Hope this helps.

Suggested fix:
Provide a error message if the server has write packet timeouts ?
[18 Feb 2005 20:57] Jorge del Conde
Hi,

I was unable to repeat this problem in FC2.  Is there anything you suggest that will enable us to reproduce this problem ?

Thanks !
[18 Feb 2005 21:49] Dino Tsoumakis
I also wasn't able to reproduce this bug by now. The thing is I have a remote connection from Germany to Australia. It seems to happen from time to time if I have a query on this slow connection and there are packet errors during this query. (Have a look at the TX packets in the statistics I submitted!)

I had a quick look at the source code for libmysqlclient.so and especially mysql_fetch_rows function. I'm not an expert to mysql source code, but it seems to me the empty result set is returned if there was a packet write timeout. There wasn't any error message because of the packet errors. The result set was just empty.