Skip to Content.
Sympa Menu

freetds - Re: [freetds] ct_param differences between 0.62 and 0.63

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] ct_param differences between 0.62 and 0.63
  • Date: Tue, 26 Jul 2005 14:28:48 +0100

Thanks Freddy,

> tds_build_param_def_from_query and tds_build_param_def_from_params are
> too similar, is better to reuse code.

You're possibly right. Common, reusable code is obviously a good thing,
but sometimes it can make the resulting code more difficult to
understand/maintain.

> tds_submit_query_params was used only by ctlib so there is no reason
> for a tds_submit_query_params_ct

I didn't realise that. good spot.

> also IMO tds_submit_query_params_ct should
> support named and no named parameters (even using TDS7)

I didn't fancy writing a SQL parser, which AFAICT is the only way
to achieve this.

> I removed a test for TDS_SP_EXECUTE (token.c) that would change result
> from TDS_DONEPROC_RESULT to TDS_DONE_RESULT, it break an odbc test

Now there was a good reason I changed that.
Can't remember what it was though...


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: 26 July 2005 14:12
To: FreeTDS Development Group
Subject: Re: [freetds] ct_param differences between 0.62 and 0.63


>
> Hi Iain,
>
> Your diagnosis is correct.
> This functionality did regress somewhere between 0.62 and 0.63,
> as a result of improvements to the "query with ?
> placeholders" logic for
> both ODBC and ct-library (ct_dynamic)
>
> I have fixed and improved this now.
> A patch will be on its way to freetds this week.
>
> Bill
>

Patch accepted and committed however I'd discuss some part.

tds_build_param_def_from_query and tds_build_param_def_from_params are
too similar, is better to reuse code.

tds_submit_query_params was used only by ctlib so there is no reason for
a tds_submit_query_params_ct, also IMO tds_submit_query_params_ct should
support named and no named parameters (even using TDS7). I removed code
to test for tds version (lang_ct_param.c and ct.c).

I removed a test for TDS_SP_EXECUTE (token.c) that would change result
from TDS_DONEPROC_RESULT to TDS_DONE_RESULT, it break an odbc test
(removing that change do not break any ctlib test).

I also added a test for lang_ct_param to test real insertion of row, see
output using mssql at
http://freetds.sourceforge.net/out/test/test27.html.

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