freetds AT lists.ibiblio.org
Subject: FreeTDS Development Group
List archive
- From: Frediano Ziglio <freddyz77 AT tin.it>
- To: TDS Development Group <freetds AT franklin.oit.unc.edu>
- Subject: Re: Convert patches...
- Date: 02 Aug 2002 21:02:34 +0200
Il ven, 2002-08-02 alle 17:30, ZIGLIO Frediano ha scritto:
> >
> > > ctlib/dblib specification document that buffer is unchanged
> > if text exceed
> > > destlen ?
> > > I not I don't see the problem.
> > >
> >
> > they don't say, but practically that is what happens...
> >
>
> Cruncking...
>
> - conversion from fixed size type to fixed size type can be handled by
> tds_convert without problem
> - conversion from variable size type (char/binary/text/varchar/image/blob
> and others) to fixed size type can be handled by tds_convert too
>
> So problem are conversion to variable size.
> - conversion from variable size to variable size can be handled directly
> from libraries (they are merely binary copy).
> - conversion from fixed size to variable size must be passed to tds_convert
> but cannot be copied to destination by tds_convert. So pasing back to
> library convert is a solution, but require allocate buffer and put back to
> library. Alternative solution is the old solution (tds_convert know all
> method to pass back data to library, but implementation) and a callback
> solution (tds_convert call at and a library supplied function to do the
> final conversion...)
>
I reply to myself.. some conversion from variable to variable (binary to
char, ntext to text, etc) require additional work. So they require to
know how fill final buffer or allocation of a new buffer (as in current
implementation).
A fix for this problem is pass an additional flag, copy data if
overlapped, that should solve also all API problems. But I think before
is time to test conversion.
freddy77
-
Convert patches...,
ZIGLIO Frediano, 08/02/2002
- <Possible follow-up(s)>
- Re: Convert patches..., Bill Thompson, 08/02/2002
- Re: Convert patches..., ZIGLIO Frediano, 08/02/2002
- Re: Convert patches..., Bill Thompson, 08/02/2002
- Re: Convert patches..., ZIGLIO Frediano, 08/02/2002
- Re: Convert patches..., Bill Thompson, 08/02/2002
- Re: Convert patches..., ZIGLIO Frediano, 08/02/2002
- Re: Convert patches..., Frediano Ziglio, 08/02/2002
Archive powered by MHonArc 2.6.24.