Re: Automatically re-connecting to the database.

"Vladimir V. Kolpakov" <[email protected]>
Newsgroups gmane.comp.db.mysql.perl
Message-ID <[email protected]>
Rudy, --

my two cents on this,

On Mon, Sep 06, 2004 at 02:01:07PM -0400, Rudy Lippan wrote:
> DBD::mysql has had the ability to automatically reconnect to the server in the
> event that the server closed the connection to the client. This is useful in the
> event of timeouts in a mod_perl environment, so you can just connect to the

In mod_perl environment auto-reconnect is rather evil then useful,

> The problem arises when you have temp tables or prepared statements. The two

it also breaks whole session-depended environment, such as
user @variables, established locks, and (possible) semaphores, ...

Only application has benefits from auto-reconnect I could see
is interactive one, similar to mysql command-line client,
where human can decide what to do next.

Other then that, disconnect should throw red flag to apps
to re-establish lots of program context, so
non-interactive apps (including cgi-s) should not rely
on this feature, and have to keep it disabled.

--w

-- 
MySQL Perl Mailing List
For list archives: http://lists.mysql.com/perl
To unsubscribe:    http://lists.mysql.com/[email protected]
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.