Re: [Lxr-dev] DB connection bug
Brought to you by:
ajlittoz
|
From: <pe...@kl...> - 2001-08-04 15:24:51
|
Malcolm Box <ma...@br...> writes:
> I have a possible fix that I'm testing out at the moment with Mysql.pm
> (I don't have Postgres installed yet). This is to make the $dbh handle
> local to each Mysql object ie $self->{dbh} rather than a package
> variable. I've also made all the sql statements object variables rather
> than package ones.
>
> This then lets the connection be closed via a DESTROY subroutine
> whenever the index object goes out of scope.
Wow, what syncronicity.
I've done the same thing with Postgres. While this solves the problem
seen with genxref, I now get complaints about not being able to call
commit during global gc or destruction or something (I don't recall
the exact message) during execution of the source script. I haven't
quite figured that out yet.
...Peder...
--
Cogito ergo panta rei.
|