[freetds] nightly tests

ZIGLIO, Frediano, VF-IT Frediano.Ziglio at vodafone.com
Mon Mar 27 04:01:14 EST 2006


> ZIGLIO, Frediano, VF-IT wrote:
> > I uploaded utilities I wrote and use on 
> freetds.sourceforge.net, I hope
> > to find a proper space ASAP.
> 
> I added a link to your test results page to the website. 
> 

Fine, can you update link to http://freetds.sourceforge.net/ instead of
http://freetds.sourceforge.net/out/test/vgtest65.html ?

> Regarding the RPC test, I've looked for the origin of:
> 
> Syscall param socketcall.send(msg) points to uninitialised byte(s)
>    at 0xC4A511: send (in /lib/tls/libc-2.3.6.so)
>    by 0x406C19E: tds_write_packet (net.c:691)
>    by 0x4048A3C: tds_flush_packet (write.c:296)
>    by 0x4056FD9: tds_query_flush_packet (query.c:170)
>    by 0x405D12A: tds_submit_rpc (query.c:1821)
>    by 0x4024F5B: dbrpcsend (rpc.c:285)
>    by 0x8049F3D: main (rpc.c:227)
> 
> without luck.  
> 

The problem was (src/dblib/rpc.c, dbrpcparam)

/* validate datalen parameter */

if (is_fixed_type(type)) {
	datalen = -1; 
} else {	/* Sybooks: "Passing datalen as -1 for any of these
[non-fixed] datatypes results 
		 * in the DBPROCESS referenced by dbproc being marked as
"dead," or unusable."
		 */
	DBPERROR_RETURN(datalen < 0, SYBERPIL);
}

datalen == 0 for fixed types (ie null for SYBINT4) was not supported. I
changed to 

/* validate datalen parameter */

if (is_fixed_type(type)) {
	if (datalen != 0)
		datalen = -1; 
} else {	/* Sybooks: "Passing datalen as -1 for any of these
[non-fixed] datatypes results 
		 * in the DBPROCESS referenced by dbproc being marked as
"dead," or unusable."
		 */
	DBPERROR_RETURN(datalen < 0, SYBERPIL);
}

freddy77



More information about the FreeTDS mailing list