Hello Nicolas,
> Really ? When the server is down, I think there's still
a timeout, but
> maybe there is no timeout during the time of login'in
?
Well this depends on defaults in my.cnf (my.ini) file -
[client]
section is read by all client programs. If nothing is
specified, 0 is
assumed (at least my findings show that). And this timeout
is exactly
for server being down - the way to exploit it is to put a
firewall
between server and client - then client won't be rejected
immediately
like when server is down but will hang forever instead if no
timeout
is specified.
> I'm using the C function mysql_real_connect to connect
to the database.
> There is no possibility to do extra configuration here,
but there is a
> "mysql_options" api function that can be
called between "mysql_init" and
> "mysql_real_connect"
> (http://dev.mysql.com/doc/refman/5.0/en/mysql-options.ht
ml)
> The best would maybe be to completely wrap each of the
useful
> configuration parameters, but that require some
additional work.
Well for now I just settled with putting the timeout I need
into
[client] of my.cnf, but in the future it might be nice to
make smth
like 'Additional parameters' structure with all these params
being
set.. I can try to implement this and send a patch
sometimes.
--
Best regards,
Michael mailto:mike comapping.com
--
Neko : One VM to run them all
(http://nekovm.org)
|