freetds AT lists.ibiblio.org
Subject: FreeTDS Development Group
List archive
- From: "James K. Lowden" <jklowden AT freetds.org>
- To: FreeTDS Development Group <freetds AT lists.ibiblio.org>
- Subject: Re: [freetds] dbsetnull changed
- Date: Mon, 3 Dec 2007 23:57:29 -0500
ZIGLIO, Frediano, VF-IT wrote:
> > 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.
Very clever. You're making me work. ;-)
> And I would add that the new setnull test fails too
Not any more. :-)
> dbsetnull ignore bindlen if bindtype != CHARBIND and BINARYBIND so any
> values for other bindtypes are valid.
Thank you for pointing that out. Fixed.
> 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 :)
Well, yes, but I made the code smaller. I took out 75 lines; you took out
100 lines, and we added functionality. That's good! _set_null_value()
and dbgetnull() are basically table lookups, except that for padded
columns we need to know the column size and allocate the memory.
(Actually, combining those functions would simplify the logic further. I
started out thinking dbsetnull() should have an inverse, but in the end I
wound up with one job split over two functions.)
Regards,
--jkl
-
[freetds] dbsetnull changed,
James K. Lowden, 12/02/2007
-
Re: [freetds] dbsetnull changed,
ZIGLIO, Frediano, VF-IT, 12/03/2007
- Re: [freetds] dbsetnull changed, James K. Lowden, 12/03/2007
-
Re: [freetds] dbsetnull changed,
ZIGLIO, Frediano, VF-IT, 12/03/2007
Archive powered by MHonArc 2.6.24.