Michael Pliskin a écrit :
Hello Neko,
I'd like to add a support to extra parameters in mysql connections.
In particular, I am interested in connect_timeout parameter, as it
usually defaults to 0 and this means nearly infinite waiting time.
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 ?
Any ideas what's the best way to add this? I was thinking to add a
parameter specifying the name of my.cnf section to read - this would
be relatively simple - but maybe there are better approaches.
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.html)
The best would maybe be to completely wrap each of the useful
configuration parameters, but that require some additional work.
Nicolas
--
Neko : One VM to run them all
(http://nekovm.org)