Skip to Content.
Sympa Menu

freetds - RE: [freetds] BCP performance

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: "Lowden, James K" <LowdenJK AT bernstein.com>
  • To: "'freetds AT lists.ibiblio.org'" <freetds AT lists.ibiblio.org>
  • Subject: RE: [freetds] BCP performance
  • Date: Fri, 7 Feb 2003 11:45:30 -0500

> From: Craig A. Berry [mailto:craigberry AT mac.com]
> Sent: February 6, 2003 6:21 PM
> At 4:55 PM -0500 2/5/03, Lowden, James K wrote:
> >
> >The assert should express:
> >
> > if host_term is not null then host_termlen >= 0
> > if host_term is null, then host_termlen == -1
> >
> >But if host_termlen is -1 the value of host_term is moot,
> really. Perhaps:
> >
> > assert ((host_termlen >= 0)? (host_term != NULL) : (host_term ==
> >-1));
> >
> >expresses it better.
>
> In your revised assert(), when host_termlen == 0, host_term is
> required to be non-null, but if I understood your explanation, that's
> the normal state of affairs for Microsoft servers when host_term is
> not present. I *think* what you need is this (or some less verbose
> expression of the same logic):

Ah, the error turns out to be in t0017.c. It's passing a zero for the
term_len, Microsoft-style. It shouldn't do that unless "#ifdef MSDBLIB" is
true (see src/dblib/bcp.c:265).

I haven't fixed the code yet.

--jkl



>
> --- src/dblib/bcp.c;-0 Wed Feb 5 13:17:08 2003
> +++ src/dblib/bcp.c Thu Feb 6 17:15:28 2003
> @@ -309,7 +309,10 @@
> return FAIL;
>
> /* if there's a valid terminator, it needs a nonzero
> length. If there's no terminator, its length should show that. */
> - assert ((host_term != NULL && host_termlen >= 0) ||
> (host_term == NULL && host_termlen == -1));
> + assert ((host_term != NULL)
> + ? (host_termlen > 0)
> + : ((host_termlen == -1) /* Sybase says
> no terminator */
> + || (host_termlen == 0))); /* Microsoft
> says no terminator */
>
> hostcol = dbproc->host_columns[host_colnum - 1];
>
> [end of patch]
>
> t0017 stops blowing up for me when I do that.
>
> --
> ________________________________________
> Craig A. Berry
> mailto:craigberry AT mac.com
>
> "... getting out of a sonnet is much more
> difficult than getting in."
> Brad Leithauser
> _______________________________________________
> FreeTDS mailing list
> FreeTDS AT lists.ibiblio.org
> http://lists.ibiblio.org/mailman/listinfo/freetds
>


The information contained in this transmission may contain privileged and
confidential information and is intended only for the use of the person(s)
named above. If you are not the intended recipient, or an employee or agent
responsible for delivering this message to the intended recipient, any
review, dissemination, distribution or duplication of this communication is
strictly prohibited. If you are not the intended recipient, please contact
the sender immediately by reply e-mail and destroy all copies of the
original message. Please note that we do not accept account orders and/or
instructions by e-mail, and therefore will not be responsible for carrying
out such orders and/or instructions.






Archive powered by MHonArc 2.6.24.

Top of Page