On Thu, Oct 07, 2004 at 11:00:01AM +0100, Steve Hay wrote:
> Not sure if this is a DBI fault or a DBD-mysql fault (or even a Perl
> fault, but I doubt it):
>
> Running this program:
>
> my $t = threads->new(\&dbsub);
> $t->join();
> sub dbsub {
> my $dbh = DBI->connect($dsn, $usr, $pwd);
> $dbh->disconnect();
> }
>
> crashes with this error:
>
> Free to wrong pool 232770 not c0102 during global destruction.
>
> on Windows. I'm running perl-5.8.5, DBI-1.45, DBD-mysql-2.9004,
> mysql-4.1.3.
>
> I've had this for a while now and never got to the bottom of it. I
> thought I'd give it a retry now since DBI-1.45's Changes file mentions
> fixing a "Free to wrong pool" error, but, as you see, it didn't fix this
> one :(
No. You're using threads and that's a whole new (big) can or worms.
Search the perl5-porters archive for "Free to wrong pool" to see what I mean.
> What can I do to resolve this?
Don't use threads.
Tim.