freetds AT lists.ibiblio.org
Subject: FreeTDS Development Group
List archive
- From: "Eric Deutsch" <edeutsch AT systemsbiology.org>
- To: "TDS Development Group" <freetds AT franklin.oit.unc.edu>
- Subject: Re: prerelease delayed by documentation
- Date: Wed, 4 Sep 2002 13:39:45 -0700
Thanks Brian, that's exactly the right place! I started hacking at that
part and ended up with the attached diff. It's not *right* but it
causes things to work much better. If someone who understands the code
can make similar but more appropriate changes, that would go a long way
toward fixing this.
I have two more challenges. I wans't able to get a hack to work for the
TEXT datatype. I still get in the tdsdump.log file:
2002-09-04 13:02:44 processing row. column is 7 varint size = 4
2002-09-04 13:02:44 processing row. column size is 532
2002-09-04 13:02:44 clearing column 7 NULL bit
...
convert_tds2sql: src is 35 dest = 1
convert_tds2sql: outputting character data destlen = 81
It's trying to force a 532 character long TEXT field into a destlen of
81. I couldn't figure out why.
One final item that I noticed upon careful inspection: when the data
come back to me in Perl, instead of, e.g., for an int "1", I'm getting
"1\x00\x00\x00\x00\x00\x00\x00\x00", i.e. the full length is returned
padded with zeros.
Thanks,
Eric
> -----Original Message-----
> From: Brian Bruns [mailto:camber AT ais.org]
> Sent: Wednesday, September 04, 2002 12:33 PM
> To: TDS Development Group
> Subject: [freetds] Re: prerelease delayed by documentation
>
>
> > Hi, I upgraded to the latest DBI and DBD::ODBC and that had no
effect on
> > the ODBC problems I was having. I did a little more investigating,
and
> > here's a better problem report.
> >
> > Here's the output of my test program:
> >
> > [QUERY]: SELECT test_id,intfield,charfield,floatfield FROM
> > testdb.dbo.dbaccesstests
> > 0 (test_id): 4 --> int
> > 1 (intfield): 4 --> int
> > 2 (charfield): 12 --> 12
> > 3 (floatfield): 8 --> 8
> > =3D1|20|butter?|3=3D
> > =3D2|25|milk|2=3D
> > =3D3|30|swamp gas|1=3D
> > =3D4|35|pillow|-=3D
> > =3D5|50|chicken|1=3D
> > Segmentation fault (core dumped)
> >
> > The last column of type FLOAT only returns the first digit.
> >
> > As I look through the tdsdump.log file (attached), I notice the
final
> > gasp is:
> >
> > odbc:SQLGetConnectOption: Statement option 102 not implemented
> >
> > Perhaps that's one problem that is easily fixed.
> >
> > Another obvious problem is that for the last column, the column size
is
> > 8. But then in convert_tds2sql(), it says:
> >
> > convert_tds2sql: outputting character data destlen =3D 1
> >
> > destlen shouldn't 1 here, I don't think. For a float it should be
much
> > bigger. This would seem to explain why only the first character
shows
> > up. Why would it assume a destlen of 1?
>
> i would assume that this is originally coming from SQLColAttributes()
> probably option SQL_COLUMN_DISPLAY_SIZE, which....(looking)....seems
to be
> missing floats, reals, and several other types.
>
> Might be an easy one. Add:
>
> case SQL_FLOAT:
> case SQL_REAL:
> case SQL_DOUBLE:
> *pfDesc = 16; /* what makes sense here? */
> break;
>
> after:
>
> case SQL_COLUMN_DISPLAY_SIZE:
> switch
> (odbc_get_client_type(colinfo->column_type,colinfo->column_size))
> {
>
> in odbc.c and see what gives. Don't know why this should segfault
though.
> I agree with Freddy, time for some unittests in ODBC so we aren't
> constantly regressing.
>
>
> ---
> You are currently subscribed to freetds as:
> [edeutsch AT exchange.systemsbiology.org]
> To unsubscribe, forward this message to leave-freetds-
> 149102K AT franklin.oit.unc.edu
Attachment:
odbc.patch
Description: odbc.patch
-
Re: prerelease delayed by documentation
, (continued)
- Re: prerelease delayed by documentation, Eric Deutsch, 09/03/2002
- Re: prerelease delayed by documentation, Frediano Ziglio, 09/04/2002
- Re: prerelease delayed by documentation, Brian Bruns, 09/04/2002
- Re: prerelease delayed by documentation, Thompson, Bill D (London), 09/04/2002
- Re: prerelease delayed by documentation, Mark J. Lilback, 09/04/2002
- Re: prerelease delayed by documentation, Eric Deutsch, 09/04/2002
- Re: prerelease delayed by documentation, Frediano Ziglio, 09/04/2002
- Re: prerelease delayed by documentation, Eric Deutsch, 09/04/2002
- Re: prerelease delayed by documentation, Brian Bruns, 09/04/2002
- Re: prerelease delayed by documentation, Frediano Ziglio, 09/04/2002
- Re: prerelease delayed by documentation, Eric Deutsch, 09/04/2002
- Re: prerelease delayed by documentation, Brian Bruns, 09/04/2002
- Re: prerelease delayed by documentation, Brian Bruns, 09/05/2002
- Re: prerelease delayed by documentation, Frediano Ziglio, 09/05/2002
- Re: prerelease delayed by documentation, Eric Deutsch, 09/05/2002
- Re: prerelease delayed by documentation, Brian Bruns, 09/05/2002
- Re: prerelease delayed by documentation, Frediano Ziglio, 09/05/2002
- Re: prerelease delayed by documentation, Brian Bruns, 09/06/2002
Archive powered by MHonArc 2.6.24.