Bug#26664 test suite times out on OS X 64bit

- Add checks to make sure net has a vio assigned
 - For example bootstrap will create a fake "net" with vio
   set to 0
This commit is contained in:
msvensson@pilot.blaudden 2007-05-25 16:47:43 +02:00
parent 006afd713d
commit e50116e99e

View File

@ -1123,7 +1123,8 @@ void my_net_set_read_timeout(NET *net, uint timeout)
DBUG_PRINT("enter", ("timeout: %d", timeout));
net->read_timeout= timeout;
#ifdef NO_ALARM
vio_timeout(net->vio, 0, timeout);
if (net->vio)
vio_timeout(net->vio, 0, timeout);
#endif
DBUG_VOID_RETURN;
}
@ -1135,7 +1136,8 @@ void my_net_set_write_timeout(NET *net, uint timeout)
DBUG_PRINT("enter", ("timeout: %d", timeout));
net->write_timeout= timeout;
#ifdef NO_ALARM
vio_timeout(net->vio, 1, timeout);
if (net->vio)
vio_timeout(net->vio, 1, timeout);
#endif
DBUG_VOID_RETURN;
}