Native Connector

Hello,
It's good to see a native connector for MySQL under 4.2.
One question: In the server my.cnf the value for wait_timeout
is set to 60 seconds and will not be increased. This is a nuisance
if one needs to be connected over longer periods but sometimes
has to go away from there client for more than a minute.
Under the JDBC-connector there is a possibility to specify
"?auto-reconnect=true" after the database name.
Is there some facility like that under the native connector?
Regards
H. Stoellinger

Hi Heinrich,

You do not give the whole story :

- which connector are you talking about, where did you get it ? It is
not supplied by default with official builds of LO, so either it has
been included as a packet with your Linux distribution, or else you have
got it from somewhere else ;

- as for the autoreconnect, have you tried adding this as a parameter in
the database URL when you set up the connection (i.e. as you would with
the JDBC connector) - alternatively, is there anything in the Advanced
Properties of the database connection ?

If there isn't, or if the suggestion I made above doesn't work, then I
doubt that it is possible. The only other alternative is to shut down
the ODB and re-open it periodically.

Alex

Hi Heinrich,

You do not give the whole story :

- which connector are you talking about, where did you get it ? It is
not supplied by default with official builds of LO, so either it has
been included as a packet with your Linux distribution, or else you have
got it from somewhere else ;

I use JDBC-Connector mysql-connector-java-5.1.30-bin.jar; can't tell you
where I got it from, certainly not from a Linux-distribution (I run
Debian-Wheezy and Mint-16 respectively).

- as for the autoreconnect, have you tried adding this as a parameter in
the database URL when you set up the connection (i.e. as you would with
the JDBC connector) - alternatively, is there anything in the Advanced
Properties of the database connection ?

Yes, with a JDBC-Connection (not in the native connection case!) one can
specify "?autoReconnect=true" right after the database name. The connector
obviously uses this parameter to automatically reconnect to the server
when the latter closes the connection after the idle time specified in
my.cnf (or defaulted to the MUCH higher value mentioned by Girvin).

If there isn't, or if the suggestion I made above doesn't work, then I
doubt that it is possible. The only other alternative is to shut down
the ODB and re-open it periodically.

I don't have to shut down the ODB --- see above!
Heinrich

Hi Heinrich,

I use JDBC-Connector mysql-connector-java-5.1.30-bin.jar; can't tell you
where I got it from, certainly not from a Linux-distribution (I run
Debian-Wheezy and Mint-16 respectively).

You stated initially that you were using the native connector - where
did you get it from ?

I don't have to shut down the ODB --- see above!
Heinrich

Yes, in other words, it works with the JDBC connector, but not the
mysql-native C/C++ connector, this has always been the case, as far as I
know. The JDBC has a far broader range of acceptable connection
parameters than the native connector.

Alex