in reply to share MySQL resources among threads

Upgrade?
MULTITHREADING The multithreading capabilities of DBD::mysql depend completely on the underlying C libraries: The modules are working with handle data only, no global variables are accessed or (to the best of my knowledge) thread unsafe functions are called. Thus DBD::mysql is believed to be completely thread safe, if the C libraries are thread safe and you don't share handles among threads. The obvious question is: Are the C libraries thread safe? In the case of MySQL the answer is "mostly" and, in theory, you should be able to get a "yes", if the C library is compiled for being thread safe (By default it isn't.) by passing the option -with-thread-safe-client to configure. See the section on *How to make a threadsafe client* in the manual.
  • Comment on Re: share MySQL resources among threads

Replies are listed 'Best First'.
Re^2: share MySQL resources among threads
by moritz (Cardinal) on Sep 06, 2007 at 11:33 UTC
    Thus DBD::mysql is believed to be completely thread safe, if the C libraries are thread safe and you don't share handles among threads.

    But that's exactly what happend in jeanluca's example

      You cannot determine if he's using old DBD::mysql or libmysql.
      The obvious question is: Are the C libraries thread safe? In the case of MySQL the answer is "mostly" and, in theory, you should be able to get a "yes", if the C library is compiled for being thread safe (By default it isn't.) by passing the option -with-thread-safe-client to configure. See the section on *How to make a threadsafe client* in the manual.