OCIStmtFetch2 problem in multi-threaded C++ environment on Solaris
The problem occurs with single column queries returning one number.
When the application is only light loaded (no simultaneous threads) we get correct data back from OCIStmtFetch2.
When the application is heavily loaded (multiple simultaneous threads), the buffer previously defined with OCDefineByPos remains unchanged for some of the calls.
Until now we have workarounded the problem by mutex-protecting the Execute and Fetch phases in our queries, but now we would like to take full benefit of the multi-threaded environment.
We can also bypass the problem by inserting sleep pauses or other extra code before OCIDefineByPos.