Skip to Content.
Sympa Menu

freetds - Re: [freetds] bcp broken

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: "James K. Lowden" <jklowden AT freetds.org>
  • To: FreeTDS Development Group <freetds AT lists.ibiblio.org>
  • Subject: Re: [freetds] bcp broken
  • Date: Wed, 21 Nov 2007 11:50:57 -0500

James K. Lowden wrote:
> bcp is broken for NULL character data. I don't know when that happened
> or if it ever worked. Our unit test is more of a smoke test; it doesn't
> ensure the data make a happy round trip.

Correction: bcp is broken for TDS 5.0. TDS 7.0+ works.

I modified the test to make the problem somewhat clearer. With 7.0, the
final query produces:

col nrows len value
---------------- ----------- ----------- ----------
nullable_char 11 NULL NULL
nullable_char 6 6 a char
nullable_int 11 NULL NULL
nullable_int 6 4 1234
nullable_varchar 11 NULL NULL
nullable_varchar 6 9 a varchar

With 5.0:

col nrows len value
---------------- ----------- ----------- ----------
nullable_char 1 NULL NULL
nullable_char 10 4
nullable_char 6 6 a char
nullable_int 11 NULL NULL
nullable_int 6 4 1234
nullable_varchar 1 NULL NULL
nullable_varchar 10 4
nullable_varchar 6 9 a varchar

--jkl




Archive powered by MHonArc 2.6.24.

Top of Page