[unixODBC-support] Multi-thread testing

Nick Gorham nick at lurcher.org
Fri Aug 19 16:12:19 BST 2011


On 19/08/11 16:05, Brian Reynolds wrote:
> Resending in plain-text ...
>
>
>
> Hi Folks,
>
> I'm doing some tests to simulate concurrent user load, and hitting 
> some problems. I'm seeing very inconsistent behaviour, and I need to 
> help to figure it out.
>
> Firstly, my setup -:
> + OS : openSuSE 11.4
> + Compiler : gcc version 4.5.1 20101208 [gcc-4_5-branch revision 
> 167585] (SUSE Linux)
> + unixODBC : 2.3.0 ( ./configure --prefix=/home/brian/cvsdev/unixODBC/ 
> --disable-gui )
> + MySQL Ver 14.14 Distrib 5.1.53, for suse-linux-gnu (i686) using 
> readline 6.1
> + MyODBC 5.1.8 ( ./configure 
> --with-unixODBC=/home/brian/cvsdev/unixODBC/ 
> --prefix=/home/brian/cvsdev/MyODBC_518/ --disable-gui )
>
> and I've simplified my problem down to one C program. The program does 
> a SQLAllocHandle and SQLSetEnvAttr in the main to allocate a 
> environment handle - the handle is declared globally. It then creates 
> 64 threads (using pthread_create) which will, SQLAllocHandle (for 
> DBC), SQLConnect, SQLAllocHandle (for STMT) , SQLFreeHandle (for 
> STMT), SQLDisconnect, SQLFreeHandle for the DBC, and then 
> pthread_exit. Nothing too complex.

Can you send the code, I will see if I can reproduce it here.

-- 
Nick


More information about the unixODBC-support mailing list