[freetds] dblib bcp, t0017 broken

James K. Lowden jklowden at freetds.org
Sat Jan 28 13:57:41 EST 2006


Frediano Ziglio wrote:
> Il giorno ven, 27/01/2006 alle 15.10 -0500, Lowden, James K ha scritto:
> > 
> > Output:
> > 
> > 	bcp_exec... DB-LIBRARY error (severity 3, dberr 20070, oserr 0,
> > dberrstr I/O error while reading bcp datafile, oserrstr Undefined
> > error: 0):
> > 	done
> > 
> 
> Mmm... here there should be no error, probably bcp.c detect eof like
> error.

There shouldn't be an error if the eof is normal -- when we're looking for
column 1 data.  If we hit eof while reading data in the middle of a row,
it's an error.  I haven't looked at t0017.in carefully, but if the file
doesn't match the table, it's quite common to hit eof unexpectedly (even
with the vendors' bcp).  

> > Normally I agree.  The problem is that unit test errors can be
> > confusing.  
> 
> This has to to with buffering using setbuf(stdout, NULL); setbuf(stderr,
> NULL) will fix this problem. 

OK.  I knew it was caused by buffering.  We can set stdout to be
unbuffered in the unit tests.  That way the errors will show up where they
belong.  

> I think is better to release an RC1 with a known problem (native bcp).

Agreed.  

Regards, 

--jkl



More information about the FreeTDS mailing list