[unixODBC-support] pthread and unixODBC problem

José M. Puyal josemaria.puyal at dialcom.com
Thu Oct 13 16:27:14 BST 2005


Hi Nick,

We have found the problem,

In our pthreads we have defined 

pthread_attr_setstacksize( &tAttr, 16384 ); 

With this attribute for the stack size the aplication fails when the
thread creates a new connection or database handle, maybe because the
memory space needed to allocate the handle (we are not sure). If we
comment that line all works fine, but we can only create about 300
threads, after that no new threads can be created.

¿Do you know anything about this?

Thanks in advance and regards.

Josemari  


El jue, 13-10-2005 a las 11:18 +0100, Nick Gorham escribió:
> José M. Puyal wrote:
> 
> >Hi Nick,
> >
> >The thread works fine with the database if we pass it a connection
> >already created, but it faults if is the thread who creates the
> >connection.
> >
> >  
> >
> Try the debugger to see if its failing in the driver or the driver manager.
> 
> Any idea whats causing this
> 
> [ODBC][10691][SQLSetConnectAttr.c][295]Error: SQL_INVALID_HANDLE
> 
> AFAIK, it all works ok with threads, so I would suspect either a bug of 
> some sort in your code or in the driver. The DM doesn't do that much in 
> that area. I could always be wrong though.
> 





More information about the unixODBC-support mailing list