From: Harri P. <har...@tr...> - 2002-09-11 00:15:44
|
On Tuesday 10 September 2002 02:31, Dave Cole wrote: > >>>>> "Kevin" =3D=3D Kevin Jacobs <ja...@pe...> wri= tes: > > Kevin> On 9 Sep 2002, Peter Hopfgartner wrote: > >> I'm trying to use the Sybase module from a Debian Linux 3.0 system > >> (Python 2.1.3, FreeTDS 0.53). > >> > >> I've set up some Python code in order to create ASCII file > >> containing the database scheme, functions and stored > >> procedures. The code runs fine when connecting through ODBC from a > >> Windows computer. It crashes when connecting from the Linux client, > >> as soon as the 2nd query is run. > >> > >> Has there already been some work done on it, both from the FreeTDS > >> side (version 0.60rc1 came out these days, should I install it?) > >> and the Sybase module side. Can I help in debugging the problem? > > Kevin> All I can suggest is that you use the _very_ lastest FreeTDS > Kevin> library. The last released version had some rather nasty bugs > Kevin> in it. > > >> As soon as I have again the chance to connect to the SQL Server > >> (it's at a customers place) I will paste you the exact message > >> (something about threads and relesing a lock that has not been > >> set). > > Kevin> Ah! I've run into this myself. I'll dig up my patches that > Kevin> re-work the Sybase module locking code that fixes it (though > Kevin> I'm not sure if I'm just working around errors in the FreeTDS > Kevin> LibCT implementation or unsafe assumptions that David Cole made > Kevin> about Sybase's implementation). > > I am very keen to get the module working with FreeTDS. I think the > future of the module is largely tied to the success of FreeTDS. > I also played with the Sybase module + FreeTDS combo, using FreeTDS curre= nt=20 snapshot. I ran into some problems where the equivalent code that ran against a Syb= ase=20 db would halt with some error message when running against MS-SQL server.= =20 Some things I was able to sort out just by closing and reallocating a cu= rsor=20 prior to continuing. Note that I've had similar problems with Sybase mod= ule=20 against Sybase DB, where I need to read all the result sets from a cursor= =20 before I can successfully run a stored procedure. With Sybase+FreeTDS I then had the next problem with some threading asser= ts=20 failing. As I'm not using threads in my script, I boldly removed all=20 threading and locking support from Sybase.py, and everything I was doing=20 starting working. Now the only remaining problem I have is that some sto= red=20 procedure calls are segfaulting. I heard a rumour the FreeTDS does not have support for on the wire proced= ure=20 calls / parameter binding. If that is true, so it may not be at the leve= l=20 off Sybase libs for some time. -Harri |