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: patches committed, changes afoot
- Date: Mon, 10 Jun 2002 15:54:57 -0400
> Here a bug report for tsql, triggered by the very first query I tried
> against it:
>
> 1> select count(*) from all_docs
> 2> go
>
> Attempting to convert unknown source type 38
Interesting. Sybase returns a type of INT4 from count(*) because count()
can never be NULL. MS returns an INTN instead, not sure of the reason.
In either case it is an error to call tds_convert() on a nullable type, so
here is the fix: replace the call to tds_convert in tsql.c with:
int ctype = tds_get_conversion_type(
tds->res_info->columns[i]->column_type,
tds->res_info->columns[i]->column_size);
tds_convert(NULL,ctype,
&tds->res_info->current_row[tds->res_info->columns[i]->column_offset],
tds->res_info->columns[i]->column_size,
SYBVARCHAR,tmpbuf,-1);
I'll check it in a little later today.
Brian
-
patches committed, changes afoot,
James K . Lowden, 06/09/2002
- <Possible follow-up(s)>
- Re: patches committed, changes afoot, Brian Bruns, 06/09/2002
- Re: patches committed, changes afoot, Bill Thompson, 06/10/2002
- Re: patches committed, changes afoot, Brian Bruns, 06/10/2002
- Re: patches committed, changes afoot, Bill Thompson, 06/10/2002
- Re: patches committed, changes afoot, Bob Kline, 06/10/2002
- Re: patches committed, changes afoot, Brian Bruns, 06/10/2002
- Re: patches committed, changes afoot, Bob Kline, 06/10/2002
Archive powered by MHonArc 2.6.24.