Skip to Content.
Sympa Menu

freetds - [freetds] tdspool lock handling

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: "cui yanxin" <cuiyanxin AT hotmail.com>
  • To: FreeTDS AT lists.ibiblio.org
  • Subject: [freetds] tdspool lock handling
  • Date: Wed, 14 Dec 2005 02:06:46 +0000

I am using latest freetds freetds-0.64.dev.20051213, it seems tdspool does not handle lock very well.


Test case 1:
'tdspool mypool' is running, 2 applications connecting to sql server 7 throught odbc using the pool.
step1:Application A: using one connection, doing "select * from employees with(updlock)", before doing commit, waiting key press...
step 2:Application B: using one connection, doing "select * from employees with(updlock)"
The normal behavior for Application B should be waiting for locks being unlocked from application A, but application B retrieves the records!!!
step 3: run tsql>select * from employees with(updlock);
tsql behaves correctly, it waits for the lock being released from application A.
step 4: exit application A and B, they both disconnects and frees handles.
tsql select statement still does not return!!!
step 5: kill tdspool
tsql select statement returns back.


Test case 2:
'tdspool mypool' is running, 1 application connecting to sql server 7 throught odbc using the pool.
step 1:Application A: using two connections, one doing "select * from employees with(updlock)", the other doing "update employee set firstname='qqq' where employeeid=1", then application commits on both connections, close handles and exit.
step 2: run tsql>select * from employees;
it does not return!!! it hangs.
step 3: kill tdspool
tsql select statement returns back.

It seem tdspool is not handling locks properly? Should I avoid doing 'select ... with(updlock)' and 'update' if I use tdspool?

Thanks a lot.

Yanxin

_________________________________________________________________
Express yourself instantly with MSN Messenger! Download today it's FREE! http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/





Archive powered by MHonArc 2.6.24.

Top of Page