freetds AT lists.ibiblio.org
Subject: FreeTDS Development Group
List archive
- From: "Brian Bruns" <camber AT ais.org>
- To: freetds AT franklin.oit.unc.edu
- Subject: Re: prerelease delayed by documentation
- Date: Wed, 4 Sep 2002 15:32:36 -0400
> 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.
-
Re: prerelease delayed by documentation
, (continued)
- Re: prerelease delayed by documentation, Lowden, James K, 09/03/2002
- Re: prerelease delayed by documentation, Brian Bruns, 09/03/2002
- 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.