On 5/9/07, Jeremy Kister <[EMAIL PROTECTED]> wrote:
On 5/9/2007 11:12 AM, Chas Owens wrote:
> my $dbh = DBI->connect($dsn, $dbun, $dbpw, {RaiseError => 1});
>
> to
>
> my $dbh = DBI->connect(
>     $dsn, $dbun, $dbpw,
>     {
>         RaiseError => 1,
>         mysql_auto_reconnect => 1
>     }
> );

Yes, that works, just as a regular my $dbh = DBI->connect() inside the
loop, before the SELECT.

The problem is, in reality, my real code doesnt sleep in the loop, and
reconnecting each time would be quite intensive.

FYI, I found that when using DBD::Sybase, the problem does not exist.

Should I take this over to the mysql-perl list ?

Thanks!

Jeremy Kister
http://jeremy.kister.net./

It is also not a good solution since you can't have a transaction last
over the fork.  I don't know if MySQL support temporary tables, but
they would disappear into thin air as well.  The mysql-perl list is
definitely a good place to ask the question.  Also the perl-dbi* list.

* http://lists.cpan.org/showlist.cgi?name=dbi-users

--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/


Reply via email to