List:MySQL++« Previous MessageNext Message »
From:jk1103 Date:November 24 2004 9:10am
Subject:repost about problems with blocking calls
View as plain text  
posted few days ago in mysql general list but no answer or infos yet :

I noticed that all mysql client programs i have (cmd line tool mysql and own
applications) block when the connection to a server is physically cut.

1. make connection
2. do some querys
3. line cut
4. mysql_ping() or mysql_query() block the application forever

a strace from mysql cli-tool shows that the read does not timeout ever:
(Linux 2.4.22 Redhat 7.3)

times({tms_utime=1, tms_stime=1, tms_cutime=0, tms_cstime=0}) = 6631941
fcntl64(3, F_SETFL, O_RDWR|O_NONBLOCK)  = 0
read(3, 0x8072e78, 16384)               = -1 EAGAIN (Resource temporarily
fcntl64(3, F_SETFL, O_RDWR)             = 0
write(3, "\37\0\0\0\3select * from maildb.mailid"..., 35) = 35

is there another option to ./configure or to mysql_options to get
non-blocking calls ? any network parameters that influence this behavior ?
all i want is a CR_SERVER_GONE_ERROR. 

tested this with 4.0.18 and 4.1.7 libmysqlclient, same result.

./configure --prefix=/usr/local/mysql/4.1.7 --localstatedir=/var/mysql/data 
 --without-innodb --with-openssl --with-pthread

NEU +++ DSL Komplett von GMX +++
GMX DSL-Netzanschluss + Tarif zum superg
repost about problems with blocking callsjk110324 Nov
  • Re: repost about problems with blocking callsWarren Young24 Nov