Skip to Content.
Sympa Menu

freetds - Re: patches committed, changes afoot

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: Bob Kline <bkline AT rksystems.com>
  • To: TDS Development Group <freetds AT franklin.metalab.unc.edu>
  • Subject: Re: patches committed, changes afoot
  • Date: Mon, 10 Jun 2002 16:17:59 -0400 (EDT)


On Mon, 10 Jun 2002, Brian Bruns wrote:

> > 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.

Excellent, thanks! If only we could get bug fixes from Microsoft so
quickly!

--
Bob Kline
mailto:bkline AT rksystems.com
http://www.rksystems.com





Archive powered by MHonArc 2.6.24.

Top of Page