Posted on 2005-07-22 13:38:43-07 by itub in response to 778
Re: mysql_auto_reconnect problems

Thanks for the tips about the explicit reconnects; I didn't know because I had never tested that in practice. ;-)

it would be nice if mysql_auto_reconnect reconnected AND reexecuted statements.

This is what the documentation claims, and it seems to work for me...

DBD::mysql has a "reconnect" feature that handles the so-called MySQL "morning bug": If the server has disconnected, most probably due to a timeout, then by default the driver will reconnect *and attempt to execute the same SQL statement again*. However, this behaviour is disabled when AutoCommit is off: Otherwise the transaction state would be completely unpredictable after a reconnect.

Direct Responses: 782 | Write a response
Perl Weekly newsletter
A free weekly newsletter for people who are busy to read all the blogs. click here to check it out.