[freetds] request to implement dbmorecmds for dblib

James K. Lowden jklowden at schemamania.org
Thu May 1 00:47:51 EDT 2003


On Wed, 30 Apr 2003 15:50:32 -0400, Bill Stewart <bstewart at verio.net>
wrote:
> James,
> 
> Here is the test script for dbmorecmds. I set it up so it was the next 
> in sequence in dblib/unittests t0024, hope that's ok. I pasted the 
> entire program because I wasn't sure about attachments, plus its small.

Thanks, Bill.  I made trivial changes and added it as
src/dblib/unittests/dbmorecmds.c.  (We've started naming the unit tests
after their functionality.  One day, I'll rename the lot, but that never
seems to reach the top of the TODO, you know?)  

> I was not able to run it on my system because the underlying command seg
> 
> faults, but the behavior of dbmorecmds should be correct for the given 
> queries.

Working with current CVS -- modulo my uncommitted charset changes -- my
experiece was quite different:

$ ./dbmorecmds
found JDBC.tempdb for guest in "../../../PWD"
Start
About to logon
after bread crumb
after dblogin
About to open [sybase][guest]
After second bread crumb
After dbopen [JDBC]
About to dbuse [tempdb]
After dbuse [tempdb]
Dropping table
Msg 3701, Level 11, State 1
Server 'JDBC', Line 1
Cannot drop the table '#dblib0024', because it doesn't exist in the system
catalogs.

creating table
insert
insert into #dblib0024 values (0, 'row 000')
insert into #dblib0024 values (1, 'row 001')
insert into #dblib0024 values (2, 'row 002')
insert into #dblib0024 values (3, 'row 003')
insert into #dblib0024 values (4, 'row 004')
insert into #dblib0024 values (5, 'row 005')
insert into #dblib0024 values (6, 'row 006')
insert into #dblib0024 values (7, 'row 007')
insert into #dblib0024 values (8, 'row 008')
insert into #dblib0024 values (9, 'row 009')
select 1
DB-LIBRARY error (severity 7, dberr 20019, oserr -1, dberrstr Attempt to
initiate a new SQL Server operation with results pending., oserrstr
OpenClient):
Was expecting more_count = 0.

It's getting a little late in the evening for me to debug things
successfully, and Frediano just touched our DONE token handling (and state
management).  I don't know if it's dbmorecmds() or what that's at fault. 
Or it could be something in my uncommitted code, perfect though it be.... 


I'm going to bed, hoping he or someone else finds your new unit test
helpful when the sun comes up in Italy.  :-)

> Let me know what else I might do to get dbmorecmds moving forward.

You've done exactly the needed thing: provided a clear test case.  I think
you'll have a working function by Monday.  It's just a question of which
Monday.  

> Thanks again for all your support.

My pleasure.  

--jkl



More information about the FreeTDS mailing list