| List: | MySQL and Perl | « Previous MessageNext Message » | |
| From: | Jochen Wiedmann | Date: | July 21 2001 10:11am |
| Subject: | Re: multiples statement handlers ($sth) together | ||
| View as plain text | |||
Robert Goff wrote: >>Extending it a little bit (more DBI related than mysql-modules >>now). If I am running it in a multithreaded app (e.g. perl with threads), >>How can I be sure that $DBI::errstr refers to my thread, or I >>can't without flaging it before using? >> > > DBI is not thread safe. Any DBI handles that you create are valid only in > the current thread. You can't use a single DBI handle for multiple threads. Thats not completely true. DBI can be compiled to be thread safe, in which case it serializes operations. (This is *not* the default and can *not* be enabled at run time.) However, using one $dbh per thread is definitely recommended. In particular with MySQL, where connect and disconnect are extremely fast, compared to Oracle and similar engines.
| Thread | ||
|---|---|---|
| • multiples statement handlers ($sth) together | Raul Dias | 20 Jul |
| • RE: multiples statement handlers ($sth) together | Robert Goff | 20 Jul |
| • Re: multiples statement handlers ($sth) together | Jochen Wiedmann | 21 Jul |
| • RE: multiples statement handlers ($sth) together | Robert Goff | 22 Jul |
| • Re: multiples statement handlers ($sth) together | Jochen Wiedmann | 21 Jul |
| • Re: multiples statement handlers ($sth) together | Raul Dias | 21 Jul |
| • RE: multiples statement handlers ($sth) together | Robert Goff | 22 Jul |
| • Re: multiples statement handlers ($sth) together | Jochen Wiedmann | 23 Jul |
| • connection pool via connect_cached | Rajeev Rumale | 26 Jul |
| • Re: connection pool via connect_cached | Jochen Wiedmann | 26 Jul |
| • Re: multiples statement handlers ($sth) together | Raul Dias | 24 Jul |
