[unixODBC-support] Is the unixodbc driver MT safe.

Nick Gorham nick.gorham at easysoft.com
Thu Mar 17 23:15:36 GMT 2005


Aditya Bhasin wrote:

> Question, is the driver MT safe ?
>
>  
>
> I run my program with a single thread and it works fine. Run it with 
> 50 and it cores.
>
>  
>
> Here is the stack trace
>
>  
>
> Program terminated with signal 11, Segmentation fault.
>
> (gdb) where
>
> #0  0x00fd3bf6 in thread_protect () from /usr/lib/libodbc.so.1
>
> #1  0x00faa438 in SQLError () from /usr/lib/libodbc.so.1
>
> #2  0x0804a935 in TQuery::printError (this=0xbffe77d0, log=
>
>       {fp = 0x0, logLevel = 4}, rc=0, henv=0x87ace18, hdbc=0x8839e60,
>
>     hstmt=0x8bd4ab0) at query.cpp:346
>
> #3  0x0804a3c1 in TQuery::execWrite (this=0xbffe77d0, henv=0x87ace18,
>
>     hdbc=0x8839e60, log={fp = 0x0, logLevel = 4},
>
>  
>
AFAIK, yes, it is thread safe, what thread lib is it built with ?

The function that you are seeing a seg fault in, does little other than 
pass through mutex's to ensure the internal structures are threda safe.

What version of unixODBC do you have?

Are you sure there is no other corruption going on?

-- 
Nick



More information about the unixODBC-support mailing list