[Mimedefang] mysql problem
Steffen Kaiser
skmimedefang at smail.inf.fh-bonn-rhein-sieg.de
Tue Aug 5 09:48:00 EDT 2003
On Tue, 5 Aug 2003, B. Tolka wrote:
> I have a sub routine called should_check_for_spam ($). This either
> returns a 1 or a 0. 1 means filter will check for spam 0 means its
> disabled. In my test environment everything works fine. However when I
> implement it in higher volume production box, it seems to retain the
> variables from the database in memory. I have tried to do a
What does this paragraphe mean? The $dbh and $sth variables are not local
to the function, hence, they must "retain in memory".
> $sth->finish; and $dbh->disconnect. Below is a copy of the subroutine.
> Any help or ideas is very appreciated.
Also:
You disconnect from your database, but never connect to it.
Also:
What's the point in disconnecting from the database and dropping the
prepared SELECT statements anyway, does mySQL not support placeholders
there? David posted some nice connect/reconnect-on-error function for this
purpose.
If you want to destroy the database handle, simply assign undef to it.
The same applies to $sth (but making them local aka "my" does this for
you automatically).
Bye,
--
Steffen Kaiser
More information about the MIMEDefang
mailing list