Skip to Content.
Sympa Menu

freetds - [freetds] done_handling

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: Frediano Ziglio <freddyz77 AT tin.it>
  • To: FreeTDS Development Group <freetds AT lists.ibiblio.org>
  • Subject: [freetds] done_handling
  • Date: Thu, 06 Jul 2006 21:14:33 +0200

This is the results of done_handling "test" using a sybase 11.9.2 server

compiled with

gcc -O0 -g -I/opt/sybase-11.9.2/include -I../../../include
-DHAVE_CONFIG_H -I. -L/opt/sybase-11.9.2/lib -o test common.c ctype.c
-lsybdb done_handling.c



found freddy.tempdb for sa in "../../../PWD"
Msg 5701, Level 0, State 2

Changed database context to 'master'.
Msg 5703, Level 0, State 1

Changed language setting to 'us_english'.
query: create table #dummy (s char(10))
query: insert into #dummy values('xxx')
query: drop proc done_test
Msg 3701, Level 11, State 1

Cannot drop the procedure 'done_test', because it doesn't exist
in the system catalogs.
DB-Library error (severity 5):
General SQL Server error: Check messages from the SQL Server.
query: create proc done_test @a varchar(10) output as select * from
#dummy
query: create proc done_test2 as select * from #dummy where s = 'aaa'
select * from #dummy
test query select * from #dummy
sqlexec State
nextrow State
nextrow State
results State COLS(1)
nextrow State COLS(1) ROWS(1) IDLE
nextrow State IDLE
results
State
nextrow State
results
State
State
query: set nocount on
test query select * from #dummy
sqlexec State
nextrow State
nextrow State
results State COLS(1)
nextrow State COLS(1)
nextrow State COLS(1)
results
State COLS(1)
State COLS(1)
query: set nocount off
test query select * from #dummy where 0=1
sqlexec State
nextrow State
nextrow State
results State COLS(1) ROWS(0)
nextrow State COLS(1) ROWS(0)
nextrow State COLS(1) ROWS(0)
results
State COLS(1) ROWS(0)
State COLS(1) ROWS(0)
test query select dklghdlgkh from #dummy
sqlexec Msg 207, Level 16, State 2

Invalid column name 'dklghdlgkh'.
DB-Library error (severity 5):
General SQL Server error: Check messages from the SQL Server.
State
nextrow State
nextrow State
results State
nextrow State
nextrow State
results
State
State
test query declare @s varchar(10) exec done_test @s output
sqlexec State
nextrow State
nextrow State
results State COLS(1)
nextrow State COLS(1) ROWS(1) PARAMS
nextrow State COLS(1) ROWS(1) PARAMS
results
State COLS(1) ROWS(1) PARAMS
State COLS(1) ROWS(1) PARAMS
test query declare @i int
sqlexec State
nextrow State
nextrow State
results State
nextrow State
nextrow State
results
State
State
test query exec done_test2
sqlexec State
nextrow State
nextrow State
results State COLS(1) ROWS(0)
nextrow State COLS(1) ROWS(0)
nextrow State COLS(1) ROWS(0)
results
State COLS(1)
nextrow State COLS(1) ROWS(1)
results
State COLS(1) ROWS(1)
State COLS(1) ROWS(1)
test query declare @i int
sqlexec State
nextrow State
nextrow State
results State
nextrow State
nextrow State
results
State
State
query: drop proc done_test
query: drop proc done_test2



This is the same test compiled with FreeTDS



found local.tempdb for sa in "../../../PWD"
Msg 5701, Level 10, State 2

Changed database context to 'master'.

query: create table #dummy (s char(10))
query: insert into #dummy values('xxx')
query: drop proc done_test
Msg 3701, Level 11, State 1

Cannot drop the procedure 'done_test', because it doesn't exist
in the system catalogs.

DB-Library error (severity 5):
General SQL Server error: Check messages from the SQL Server.
query: create proc done_test @a varchar(10) output as select * from
#dummy
query: create proc done_test2 as select * from #dummy where s = 'aaa'
select * from #dummy
test query select * from #dummy
sqlexec State
nextrow State
nextrow State
results State COLS(1)
nextrow State COLS(1) IDLE
nextrow State IDLE
results
State
nextrow State
results
State
State
query: set nocount on
test query select * from #dummy
sqlexec State
nextrow State
nextrow State
results State COLS(1)
nextrow State COLS(1)
nextrow State COLS(1)
results
State
State
query: set nocount off
test query select * from #dummy where 0=1
sqlexec State
nextrow State
nextrow State
results State COLS(1) ROWS(0)
nextrow State COLS(1) ROWS(0)
nextrow State COLS(1) ROWS(0)
results
State ROWS(0)
State ROWS(0)
test query select dklghdlgkh from #dummy
sqlexec Msg 207, Level 16, State 2

Invalid column name 'dklghdlgkh'.

DB-Library error (severity 5):
General SQL Server error: Check messages from the SQL Server.
State
nextrow State
nextrow State
results State
nextrow State
nextrow State
results
State
State
test query declare @s varchar(10) exec done_test @s output
sqlexec State
nextrow State
nextrow State
results State COLS(1)
nextrow State COLS(1) PARAMS
nextrow State COLS(1) PARAMS
results
State
State
test query declare @i int
sqlexec State
nextrow State
nextrow State
results State
nextrow State
nextrow State
results
State
State
test query exec done_test2
sqlexec State
nextrow State
nextrow State
results State COLS(1) ROWS(0)
nextrow State COLS(1) ROWS(0)
nextrow State COLS(1) ROWS(0)
results
State COLS(1)
nextrow State COLS(1)
results
DB-Library error (severity 7):
Attempt to initiate a new Adaptive Server operation with results
pending
Operating-system error:
Success
State COLS(1)
State COLS(1)
test query declare @i int
sqlexec State
nextrow State
nextrow State
results State
nextrow State
nextrow State
results
State
State
query: drop proc done_test
query: drop proc done_test2



As you can note is quite different... is seems that there are some ROWS
and PARAMS less using FreeTDS...

Let's take the first one

sybase
select * from #dummy
test query select * from #dummy
sqlexec State
nextrow State
nextrow State
results State COLS(1)
nextrow State COLS(1) ROWS(1) IDLE
nextrow State IDLE
results
State
nextrow State
results
State
State

our
test query select * from #dummy
sqlexec State
nextrow State
nextrow State
results State COLS(1)
nextrow State COLS(1) IDLE
nextrow State IDLE
results
State
nextrow State
results
State
State

It seems that we are not able to read rows after last nextrow. In this
case testing for IDLE reset rows. This happen cause proprietary
libraries seems to read DONE asap, not at next dbnextrow.
Well, this seems very broken but it works for most programs...

freddy77





  • [freetds] done_handling, Frediano Ziglio, 07/06/2006

Archive powered by MHonArc 2.6.24.

Top of Page