Skip to Content.
Sympa Menu

freetds - Re: [freetds] Multithreaded ODBC SP call locking problem

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: "James K. Lowden" <jklowden AT freetds.org>
  • To: freetds AT lists.ibiblio.org
  • Subject: Re: [freetds] Multithreaded ODBC SP call locking problem
  • Date: Thu, 17 Feb 2011 06:31:08 -0500

On Wed, 16 Feb 2011 12:55:25 +0000
Matthew Gates <MGates AT redplc.com> wrote:

> We can see SQL Server sending the output parameter over the network, so
> we're sure the SP is complete, but the program doesn't seem to send back
> the SQLEndTran request.

What does "send back the SQLEndTran request" mean? That the function never
returns (even though the protocol trace seems to indicate it should)?

> freetds-0.62.4 (I know, I'm sorry, it's very old. Not my choice!)

One thing I can tell you is that the network timeout logic was re-written
since then to make cancels work. I'm not saying upgrading will solve all
your troubles, but that would be in the same vicinity.

Look at src/odbc/odbc.c::change_transaction, which is called by SQLEndTran().
Consider the impact of the thread-safety issues there. Maybe add some log
instrumentation. It's also clear the current implementation (and surely 0.62
too) masks errors by not returning SQL_SUCCESS_WITH_INFO when it should.

HTH.

--jkl




Archive powered by MHonArc 2.6.24.

Top of Page