Skip to Content.
Sympa Menu

freetds - Re: [freetds] FreeTDS (CVS version) hangs on reading column data larger than 256 bytes

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] FreeTDS (CVS version) hangs on reading column data larger than 256 bytes
  • Date: Sun, 13 Apr 2003 23:28:01 -0400

On Sun, 13 Apr 2003 17:10:40 -0700 (PDT), Chad Wagner <vdr781 AT yahoo.com>
wrote:
> Attached is a patch which appears to fix this problem.
> A good test for it is "SELECT @@version", when the
> column data exceeds the temp space the routine needs
> to loop twice to do the conversion, but in_left is
> adjusted to 0 by iconv routines, which then in_left
> would need to be adjusted to the remaining data on the
> wire to do the final conversion on remaining data.

Thanks, Chad!

I read your message nodding my head (uh-huh, yup...) because it so happens
I worked on that very loop today. It also had a problem if the character
set didn't use an even byte/char ratio (as, say, would be the case with
UTF-8). If the byte sequence of the last "character" didn't completely
fit in temp[], tds_iconv() would refuse to convert it, and it would be
discarded.

I changed the logic to retain a partial-character sequence, move it to the
front of temp[], and continue. It's rather heavily logged atm; we can
lighten up when we're sure it's OK.

Please tell us about anything else you find. I'm gaining confidence that
we're now once more able to handle server-side UCS-2 and ISO-8859*, and I
think we've got client-side UTF-8 working within libtds. Have to focus on
the client libraries next.

--jkl




Archive powered by MHonArc 2.6.24.

Top of Page