Skip to Content.
Sympa Menu

freetds - RE: [freetds] stored proc parameters

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: "Thompson, Bill D (London)" <bill_d_thompson AT ml.com>
  • To: "FreeTDS Development Group" <freetds AT lists.ibiblio.org>
  • Subject: RE: [freetds] stored proc parameters
  • Date: Fri, 3 Dec 2004 14:54:23 -0000

I'd say we two bugs:

1) we DONT ignore the value parameter if datalen = 0, viz:

src/dblib/rpc.c : dbrpcparam() :

/* sanity */
if (dbproc == NULL || value == NULL)
return FAIL;

2) it looks like we are not be handling NULL input parameters correctly:

from Josh's log (assuming he DID set datalen to 0 on the dbrpcparam
call...)

11:02:39.413329 tds_put_data_info putting param_name
11:02:39.413343 tds_put_data_info putting status
11:02:39.413354 tds_put_data: is_null = 0, colsize = 0
11:02:39.413364 tds_put_data: not null param varint_size = 2

...Notice "is_null = 0"

I haven't time to look at it yet. Next week ?

Bill

-----Original Message-----
From: freetds-bounces AT lists.ibiblio.org
[mailto:freetds-bounces AT lists.ibiblio.org] On Behalf Of ZIGLIO,
Frediano, VF-IT
Sent: 03 December 2004 13:50
To: FreeTDS Development Group
Subject: RE: [freetds] stored proc parameters


>
> Freddy,
>
> when you say it IS documented, I take it you mean this piece:
>
> "If the value of the RPC parameter is NULL, pass datalen as 0,
> even if type is a fixed-length datatype."
>
> I don't read that to say you can pass a NULL pointer for the value
> parameter.
>
> I read that as saying:
>
> "If you want to send a NULL RPC parameter, you should set
> datalen to 0, for both fixed or variable data types."
>
> Bill
>

Oppps.... ok! :)
Don't apply the patch as is, it shouldn't handle NULL value...

freddy77
_______________________________________________
FreeTDS mailing list
FreeTDS AT lists.ibiblio.org
http://lists.ibiblio.org/mailman/listinfo/freetds
--------------------------------------------------------

If you are not an intended recipient of this e-mail, please notify the
sender, delete it and do not read, act upon, print, disclose, copy, retain or
redistribute it. Click here for important additional terms relating to this
e-mail. http://www.ml.com/email_terms/
--------------------------------------------------------





Archive powered by MHonArc 2.6.24.

Top of Page