[unixODBC-support] Multi-thread testing
nick at lurcher.org
Fri Aug 19 16:19:56 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
> --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.
Well, for what its worth (and not much) I just ran that using our
(Easysoft) SQL Server driver on Ubuntu, and it runs through fine. I
would check that the configure of unixODBC found the thread libs, so
built with mutex protection about its structures.
More information about the unixODBC-support