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: "James K. Lowden" <jklowden AT schemamania.org>
  • To: FreeTDS Development Group <freetds AT lists.ibiblio.org>
  • Subject: Re: [freetds] freebcp text column width limit is 4090
  • Date: Tue, 11 Mar 2003 00:24:46 -0500

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




Archive powered by MHonArc 2.6.24.

Top of Page