Mailing List
Home
Forum Home
MySQL General - General MySQL discussion
MaxDB - Everything about MaxDB, formerly known as SAP DB
MySQL++ - Programming with the C++ API to MySQL
MySQL on Win32 - Runing MySQL on Windows 9x/Me/NT/2000/XP
ODBC - ODBC with the MySQL Connector/ODBC driver
Java Help - Mostly related to the MySQL Connector/J driver
Perl - Perl support for MySQL with DBI and DBD::mysql
GUI - MySQL GUI Tools
Announcement
Subjects
mysql openssl Question
mysql:it 's a db not a dbms how it 's possible?!
Does the binary log enabling affect the MySQL performances?
Strange behavior, Table Level Permission
FULLTEXT query format question
Preventing Duplicate Entries
Comparing and writing out BLOBS
Executing MySQL Commands From Within C Program
Can 't access mysql after kernel upgrade
Mysql 4 0 Oracle Stored Procedure Trigger Conversion
Downgrade Mysql from 4 to 3 23
MySQL Cluster Software
mysql test 4 1 fails with the gis test
ERROR 2002: Can 't connect to local MySQL server through socket
Getting Identity after INSERT
Update one field with more fields from another table
ERROR 1045: Access denied for user: 'root@localhost ' (Using
password: NO)
mysql have same function mthod as Oracle decode()
 
MYSQL_OPT_READ_TIMEOUT -- Linux

MYSQL_OPT_READ_TIMEOUT -- Linux

2006-06-01       - By Ramya Krishnan

 Back
Hi,
I am using mysql-5 (See http://sql-5.ora-code.com).0.21 version. This issue was discussed in the bugs
list 4.x.x version and I believe the same has been closed(only for windows).
Problem:
1. Connection is established to the server
2. sever goes down.
3. The read at the client hangs.

The timeout has been implemented for windows. Not for Linux?? If this is
not required in Linux how do i handle the same in linux. Would I have to
wait close to 15 min for the function to return? Can this be controlled
through my.cnf or mysql_option. Why cant setsockopt to control the
timeout be implemented on Linux too.


8938  12:10:11.040375 read(3, 0x8de33b0, 16384) = -1 EHOSTUNREACH (No
route to host)
8938  12:25:36.521901 shutdown(3, 2 /* send and receive */) = -1
ENOTCONN (Transport endpoint is not connected)


void vio_timeout(Vio *vio __attribute__((unused)),
        uint which __attribute__((unused)),
                uint timeout __attribute__((unused)))
{
#ifdef __WIN__
 ulong wait_timeout= (ulong) timeout * 1000;
 (void) setsockopt(vio->sd, SOL_SOCKET,
   which ? SO_SNDTIMEO : SO_RCVTIMEO, (char*) &wait_timeout,
       sizeof(wait_timeout));
#endif /* __WIN__ */
}


--
Thanks and Regards
Ramya Krishnan

Any intelligent fool can make things bigger, more complex, and more violent. It
takes a touch of genius and a lot of courage to move in the opposite direction
-- Albert Einstein


********** DISCLAIMER **********
Information contained and transmitted by this E-MAIL is proprietary to
Sify Limited and is intended for use only by the individual or entity to
which it is addressed, and may contain information that is privileged,
confidential or exempt from disclosure under applicable law. If this is a
forwarded message, the content of this E-MAIL may not have been sent with
the authority of the Company. If you are not the intended recipient, an
agent of the intended recipient or a  person responsible for delivering the
information to the named recipient,  you are notified that any use,
distribution, transmission, printing, copying or dissemination of this
information in any way or in any manner is strictly prohibited. If you have
received this communication in error, please delete this mail & notify us
immediately at admin@(protected)

Watch India vs. England LIVE, Hot videos and more only on Sify Max! Click Here.
www.sifymax.com

Get to see what's happening in your favourite City on Bangalore Live! www
.bangalorelive.in