Skip to Content.
Sympa Menu

freetds - Re: killer query

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: "Bill Thompson" <thompbil AT exchange.uk.ml.com>
  • To: freetds AT franklin.oit.unc.edu
  • Subject: Re: killer query
  • Date: Mon, 24 Jun 2002 05:18:58 -0400


Jim,

I'll own up to the "bit" problem , which must have crept in with some of
my code "rationalisations" :-)

The problem is here :

int tds_get_varint_size(int datatype)
{
switch(datatype) {
case SYBTEXT:
case SYBNTEXT:
case SYBIMAGE:
case SYBVARIANT:
return 4;
case SYBVOID:
case SYBINT1:
case SYBBIT:
case SYBINT2:
case SYBINT4:
case SYBDATETIME4:
case SYBREAL:
case SYBMONEY:
case SYBDATETIME:
case SYBFLT8:
case SYBBITN: /* REMOVE this line */
case SYBMONEY4:
case SYBINT8:
return 0;
case XSYBNCHAR:
case XSYBNVARCHAR:
case XSYBCHAR:
case XSYBVARCHAR:
case XSYBBINARY:
case XSYBVARBINARY:
return 2;
default:
return 1;
}
}

SYBBITN should have a "varint" size of 1. Removing the commented line
above will correct the problem.

Bill




Archive powered by MHonArc 2.6.24.

Top of Page