Skip to Content.
Sympa Menu

freetds - RE: [freetds] freebcp text column width limit is 4090

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: "Thompson, Bill D (London)" <ThompBil AT exchange.uk.ml.com>
  • To: "'FreeTDS Development Group'" <freetds AT lists.ibiblio.org>
  • Subject: RE: [freetds] freebcp text column width limit is 4090
  • Date: Tue, 11 Mar 2003 06:19:12 -0000

Well thanks james,

I've pondered that particular issue many times over the last year or so.
However my only (feeble) attempt at overcoming it was to increase the size
of the aforementioned buffer from 256 to 4096 bytes!

Sounds like you've got a good solution.

Bill


> -----Original Message-----
> From: James K. Lowden [SMTP:jklowden AT schemamania.org]
> Sent: Tuesday, March 11, 2003 5:25 AM
> To: FreeTDS Development Group
> Subject: Re: [freetds] freebcp text column width limit is 4090
>
> On Mon, 10 Mar 2003 14:08:10 -0500, "Lowden, James K"
> <LowdenJK AT bernstein.com> wrote:
> >
> > I have a table with a text column. Attempting to load it, freebcp
> > segfaults if the column's data are more than 4090 bytes.
>
> _bcp_get_term_data is passed a buffer into which it places a column's
> worth of data. It is not told how big the buffer is, and the caller
> allocates only 4096 bytes, statically.
>
> I changed the signature to accept an array of pointers, the first of which
> is allocated by the caller. If _bcp_get_term_data requires more room, it
> allocates subsequent members of the array in 1 MB chunks. The array has
> 1000 pointers; if it's exhausted, we need more address space. The caller
> knows from the returned size how many buffers (if any) were allocated.
>
> I haven't committed yet because it doesn't work yet. I just wanted you to
> know I've isolated the problem and solved it, in principle.
>
> --jkl
> _______________________________________________
> FreeTDS mailing list
> FreeTDS AT lists.ibiblio.org
> http://lists.ibiblio.org/mailman/listinfo/freetds




Archive powered by MHonArc 2.6.24.

Top of Page