Skip to Content.
Sympa Menu

freetds - Re: [freetds] dbsetnull changed

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: "ZIGLIO, Frediano, VF-IT" <Frediano.Ziglio AT vodafone.com>
  • To: "FreeTDS Development Group" <freetds AT lists.ibiblio.org>
  • Subject: Re: [freetds] dbsetnull changed
  • Date: Mon, 3 Dec 2007 10:45:03 +0100

>
> The nightly snapshot will contain changes you might want to
> know about.
>

Good.

> I rewrote dbsetnull() this weekend, and added to dbconvert
> the ability to
> use user-defined null representations. So, if you want
> SYBCHAR columns to
> appear as "<NULL>" instead of "\0", that's now your choice.
>
> Overall there were some 400 lines removed and added,
> according to CVS.
> Everything *seems* to work, except for Frediano's new null unit tests
> (which were failing before). I haven't looked into that.
> But the code is
> new and the real world inevitably turns up use cases the programmer
> doesn't foresee, so be warned.
>

Lately I write tests before fixing the problem. Yes, null and null2
tests fail.
And I would add that the new setnull test fails too (see
http://freetds.cvs.sourceforge.net/freetds/freetds/src/dblib/unittests/s
etnull.c?view=markup)
dbsetnull ignore bindlen if bindtype != CHARBIND and BINARYBIND so any
values for other bindtypes are valid. I have to say that you added
bindlen for all types but it's needed for only two... yes, optimization
it's not so important but you know I'm too paranoid :)

> The work goes some distance toward addressing the issue Simon Talbot
> raised last week. To fix it fully, I think dbbind() needs a little
> attention.
>

Yes, I think null2 test should incorporate other types.

freddy77




Archive powered by MHonArc 2.6.24.

Top of Page