[freetds] Fw: FreeTDS vs Threads

Nick Kew niq at apache.org
Fri Jun 29 05:35:39 EDT 2007

From the FAQ:

  Is FreeTDS thread safe?
  Different threads may all use separate connections without interfering
  with each other. Threads may not share a DBPROCESS or CS_CONNECTION
  without controlling access via a mutex.

I took that as a hint that
 (a) threads *can* share a DBPROCESS provided Thread 1 cleans up any
     cursors (or transactions) before Thread 2 uses it.
 (b) A process can keep a pool of DBPROCESSes, and threads can use
     different DBPROCESSes in parallel.

Now I have a report of intermittent failures (a SELECT statement
returning FAIL) that smells of a possible thread-related issue.
Can someone confirm that my assumptions are (or should be) safe
and I need to be looking elsewhere for a bug?

Nick Kew

Application Development with Apache - the Apache Modules Book

More information about the FreeTDS mailing list