Turn off caching on the server side.
authorshort <>
Thu, 14 Oct 2004 23:38:01 +0000 (23:38 +0000)
committershort <>
Thu, 14 Oct 2004 23:38:01 +0000 (23:38 +0000)
 - Prevent: MySQL server has gone away

perlmail-submit

index d01bc39..4711b74 100755 (executable)
@@ -38,6 +38,9 @@ use POSIX qw(mktime);
 use Fcntl qw(:flock);
 
 
+my $DBI_CACHE=0;       # Cache DBI requests - may cause: MySQL server has gone away
+
+
 open DBI_PWD,$DBI_pwd or die "open \"$DBI_pwd\": $!";
 $DBI_pwd=<DBI_PWD>;
 close DBI_PWD or warn "close DBI_pwd: $!";
@@ -46,7 +49,7 @@ chomp $DBI_pwd;
 my $DBI;
 sub DBI
 {
-       return $DBI if $DBI;
+       return $DBI if $DBI_CACHE && $DBI;
        $DBI=DBI->connect("DBI:mysql:database=$DBI_database;host=","$DBI_user",$DBI_pwd,{
                "PrintError"=>0,        # handled by "RaiseError" below
                "RaiseError"=>1,