Re: Oddity when creating DB handles

[email protected] (Elizabeth Mattijsen)
Newsgroups perl.ithreads
Message-ID <p05111b00bb8e8a4b52ff@[192.168.56.4]>
At 21:21 +0100 9/17/03, Nick Djurovich wrote:
>I have a test perl script that opens a connection to a db. I was just
>playing with threads to see if I could get 10 workers each with
>their own db connection.
>
>The problem is that if just the threads instantiate a DB instance
>its okay, if the main script instantiates a db handle beforehand,
>it throws an error ;

This is probably because the DBI driver builds some internal 
data-structures that can't stand being CLONEd when threads are 
started.

You will need a DBD::Mysql driver that can stand being CLONEd.  I 
have no idea about the state of that.  Check the dbi-dev mailing list.


Hope this helps.


Liz
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.