Skip to Content.
Sympa Menu

freetds - Re: [freetds] 0.64RC2 problem with return status

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: "ZIGLIO, Frediano, VF-IT" <Frediano.Ziglio AT vodafone.com>
  • To: "FreeTDS Development Group" <freetds AT lists.ibiblio.org>
  • Subject: Re: [freetds] 0.64RC2 problem with return status
  • Date: Thu, 29 Jun 2006 08:44:52 +0200

>
> > From: Lowden, James K
> > Sent: Wednesday, June 28, 2006 11:04 AM
> >
> > > From: ZIGLIO, Frediano, VF-IT Sent: Wednesday, June 28, 2006 8:23
> > > AM
> > >
> > > > I'm getting an invalid cursor state error trying to fetch data
> > > > from a stored procedure using prepare/execute from DBD::ODBC.
> > > > It looks like DBD::ODBC thinks there is more than one result
> > > > set and is trying to get column descriptors when there are no
> > > > metadata.
> >
> > > James, can you post jkl script source ?
>
> Simpler still, src/odbc/unittests/funccall.c fails:
>
> =================
> $ tsql -C | grep Ver; isql --version; cat typescript
> Version: freetds v0.64.dev.20060127

0.64.dev.20060127 ??? This is not RC2...

> unixODBC 2.2.6
> Script started on Wed Jun 28 14:35:54 2006
> $ pwd; ident src/funccall.c; make funccall && ./funccall
> /usr/users/home/jklowden/projects/freetds.cvs/freetds/build/sr
> c/odbc/uni
> ttests
> src/funccall.c:
> $Id: funccall.c,v 1.11 2004/10/28 13:16:18 freddy77 Exp $
> `funccall' is up to date.
> odbctest
> --------
>
> connection parameters:
> server: 'mpquant'
> user: 'ProductDevelopmentWeb'
> password: '????'
> database: 'testdb'
> use testdb
> drop proc simpleresult
> Unable to execute statement
> create proc simpleresult @i int as begin return @i end
> DECLARE @i INT
> drop proc simpleresult
> drop proc simpleresult2
> create proc simpleresult2 @i int, @x int output, @y varchar(20) output
> as begin select @x = 6789 select @y = 'test foo' return @i end
> drop proc simpleresult2
> Unable to execute statement
> SQL error 24000 -- [unixODBC][Driver Manager]Invalid cursor state
> =================
>
> That made me wonder about the rest of the unit tests. 8
> failed, please
> see below.
>
> $ rm nohup.out; nohup make check; grep -E 'FAIL|tests failed'
> nohup.out
> sending output to nohup.out
> FAIL: funccall
> FAIL: params
> FAIL: raiserror
> FAIL: genparams
> FAIL: const_params
> FAIL: cursor1
> FAIL: scroll
> FAIL: describecol
> 8 of 42 tests failed
>

42 tests, cursor1 and describecol... you are using CVS HEAD, not 0.64
branch.

> This is with CVS HEAD and unixODBC 2.2.6 (and a hack on genparams to
> avoid W types). Is there another combination I should try?
>
> Log follows. Please note the stderr output comes *before* the stdout
> output for each test, due to buffering.
>
> --jkl
>
...

I think a unixODBC upgrade will fix all above. I recently updated
raiserror test to relax test if DM present.
Do you think that a setbuf(stdout, NULL) in common.c:Connect could
help??
Consider classifier utility from
http://freddy77.tripod.com/shtunnel.html, it can help to diversify
stdout from stderr.

freddy77





Archive powered by MHonArc 2.6.24.

Top of Page