I have the following problem: A client written by me using the C API hung
recently during some operation (almost certainly a SELECT, but possibly
an INSERT). I fired up a "mysql" text client, and that hung too, every
time I did a SELECT on the table I was interested in. Upon further
investigation I discovered that the partition which my data directory was
in, was full. It had, in fact, been filled by the mysql.log! It seems
that this had caused the server to hang, and that caused the clients to
hang when they tried to access it.
I "resolved" the problem by killing the mysql daemons (there were 18
running!), and re-installing mysql from source, pointing to a different
However, I'm still somewhat (read: very) concerned that it appears that
a hung server led to a hung client, which leads me to my question: Can
I write my client code so that when it issues a mysql_real_query(), it
will time out if it receives no response from the server after a given
period of time? This would seem an obvious thing to do but I can't see
timeouts on anything other than connection...
One of my colleagues is suggesting hacking the libmysqlclient code, but
I really don't want to do that if I can help it!!! :)
I haven't used mysqlbug for this report, since the problem install is no
longer there (yes, I know, d'oh) - and this isn't an easily replicable
error anyway! Really I just want to know if/how I can modify my client
to avoid this problem? Also, is this something that's known about
already? If not, I might try to replicate on a toy machine here...
On the server:
The old version was from the mysql-3.22.27 binary RPM.
The new version is from the mysql-3.23.11 source tarbal.
The OS is Red Hat Linux 6.1 or maybe 6.0, w/ kernel version 2.2.12-20smp
The client was using client library from mysql-22.214.171.124
All advice appreciated. Best regards,
Andy Gimblett, Programmer, Frontier Internet Services Ltd. <firstname.lastname@example.org>
All statements made are subject to Frontier's Terms and Conditions of
Business which are available upon request.