Skip to Content.
Sympa Menu

freetds - RE: [freetds] ODBC unit tests "funccall" and "transaction"

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: RE: [freetds] ODBC unit tests "funccall" and "transaction"
  • Date: Fri, 09 Jan 2004 23:24:34 -0000

Il ven, 2004-01-09 alle 23:29, Castellano, Nicholas ha scritto:
> > From: Frediano Ziglio [mailto:freddyz77 AT tin.it]
> > Sent: Friday, January 09, 2004 3:57 PM
> >
> > However funccall is expected to work !!! I put a
> > SQLCloseCursor(Statement) after "drop proc simpleresult2",
> > this should be the problem (it seems there is already a
> > simpleresult2 procedure, perhaps a previous test)...
>
> I installed unixODBC-2.2.6 and updated my source to get your simpleresult2
> change. The funccall test still fails. All the other test were successful
> though, so we're getting closer. Any more ideas what might be going wrong
> with funccall? I think the statement it is unable to execute may actually
> be later than the last one displayed below (there are a few places where it
> can print "Unable to execute statement", perhaps some different messages
> would be useful?)
>
> bash-2.05$ export TDSDUMP=tdsdump.log
> bash-2.05$ ./funccall
> odbctest
> --------
>
> connection parameters:
> server: 'mtreports'
> user: 'scbdp'
> password: '????'
> database: 'reportdb'
> use reportdb
> 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
> Unable to execute statement
>

...



Received header @ 17:24:22.180357
0000 04 01 00 11 00 38 01 00- |.....8..|


Received packet @ 17:24:22.180581
0000 fd 00 00 de 00 00 00 00-00 |........ .|


17:24:22.180761 processing result tokens. marker is fd(DONE)
17:24:22.180857 tds_process_end: more_results = 0
was_cancelled = 0
error = 0
done_count_valid = 0
17:24:22.181048 tds_process_end() state set to TDS_IDLE
17:24:22.181152 tds_process_result_tokens() state is COMPLETED
sql2tds.c:123 type=4
sql2tds.c:129
sql2tds.c:257
sql2tds.c:123 type=4
sql2tds.c:129
17:24:22.181565 setting column 1 NULL bit
sql2tds.c:123 type=12
sql2tds.c:129

>From this part of log I can see problem is related to sql2tds (there is
no NULL setting). Problem is that indicator was read even on output
parameter leading to this nasty BUG only using some uninitialized
data... I fixed this problem hoping this solve funccall even on your
machine... I updated sql2tds.c and funccall.c (just to show error even
on my machine). Attached updates files.

freddy77

Attachment: fix.tar.gz
Description: GNU Zip compressed data




Archive powered by MHonArc 2.6.24.

Top of Page