[DB-SIG] Sybase module

Peter Godman pgodman@halcyon.com
Fri, 29 May 1998 11:39:16 -0700 (PDT)


On Fri, 29 May 1998, Harri PASANEN wrote:

> Hi,
> 
> 
> I'm having slight problems with Peter Godman's sybase module
> on Windows NT, with Sybase server being on Sparc-Solaris 2.6.
> 
> The same Python program works every time on Solaris, but
> on NT it occasionally hangs, always in the same place on
> cursor.execute().  Looks like there is something
> locking the cursor, as sp_lock always then gives:
> 
>  fid    spid   locktype                     table_id    page       
> dbname          class                         
> context                     
>  ------ ------ ---------------------------- ----------- -----------
> --------------- 
>       0     20 Sh_intent                       16003088           0
> fk4_0           Cursor Id 1310912
>       0     20 Sh_page                         16003088        6944
> fk4_0           Cursor Id 1310912
> 

Hmmm.  It's been a long time now, but doesn't the page 0 Sh_intent mean
that it's trying to escalate a lock to a table lock?  If this were the
case, this would mean that Sybase is not realizing that the escalation is
unimpeded.  This is quite strange.

If you only use one cursor, have you tried the program using connection
methods rather than cursor methods, i.e. using the execute method of the
connection rather than creating a cursor?  I'd be interested to see
whether it happens there.  Can you provide a sequence of DBAPI calls, or
some python code?  

If all else fails, we'll have to turn on state debugging, I guess.

Cheers
Pete


> 
> I only have one python cursor, which I open in the beginning of program
> and close at the end, so it must be something in the sybase C-api level. 
> 
> I just wonder if anyone has a clue, before I dive in the sources head
> first?  
> (ActuallyI already took a quick look, but could not really put my 
> finger on it... ;-( )
> 
> 
> Thanks,
> 
> Harri
> 
> _______________________________________________
> DB-SIG maillist  -  DB-SIG@python.org
> http://www.python.org/mailman/listinfo/db-sig
>