[prev in list] [next in list] [prev in thread] [next in thread]
List: freetds
Subject: Re: [freetds] 0.64rc2 Debian prerelease packages available
From: Steve Langasek <vorlon () dodds ! net>
Date: 2006-04-01 20:46:47
Message-ID: 20060401204647.GB15862 () mauritius ! dodds ! net
[Download RAW message or body]
On Sat, Apr 01, 2006 at 10:27:35AM +0200, Frediano Ziglio wrote:
> Mmmm... from MS documentation it seems that row numbers, data length
> pointer and offsets became 64-bit on 64-bit platforms so from sqltypes.h
> #if (SIZEOF_LONG == 8)
> #ifndef BUILD_REAL_64_BIT_MODE
> typedef int SQLINTEGER;
> typedef unsigned int SQLUINTEGER;
> #define SQLLEN SQLINTEGER
> #define SQLULEN SQLUINTEGER
> #define SQLSETPOSIROW SQLUSMALLINT
> typedef SQLULEN SQLROWCOUNT;
> typedef SQLULEN SQLROWSETSIZE;
> typedef SQLULEN SQLTRANSID;
> typedef SQLLEN SQLROWOFFSET;
> #else
> typedef int SQLINTEGER;
> typedef unsigned int SQLUINTEGER;
> typedef long SQLLEN;
> typedef unsigned long SQLULEN;
> typedef unsigned long SQLSETPOSIROW;
> /*
> * These are not supprted on 64bit ODBC according to MS
> * typedef SQLULEN SQLTRANSID;
> */
> typedef SQLULEN SQLROWCOUNT;
> typedef SQLUINTEGER SQLROWSETSIZE;
> typedef SQLLEN SQLROWOFFSET;
> #endif
> #else
> I don't agree SQLROWSETSIZE is 32 bit on clean 64 bit, should be
> SQLULEN, not SQLUINTEGER
Well, that still means the current FreeTDS isn't compatible with UnixODBC
2.2.11 when building in 64-bit mode, right? The typedefs of SQLROWOFFSET
and SQLROWSETSIZE in UnixODBC may not match the MS 64-bit spec, but it looks
like SQLExtendedFetch() is still supposed to *use* SQLROWOFFSET and
SQLROWSETSIZE, so there's a (minor) bug in FreeTDS wrt the spec. :)
> Also note that pirow argument of SQLParamOptions is used for a pointer
> to row number so even this should be 64 bit so declaration in sqlext.h
> should be
> SQLRETURN SQL_API SQLParamOptions(
> SQLHSTMT hstmt,
> SQLULEN crow,
> SQLULEN *pirow);
That explains why the pirow argument might need to be SQLULEN*, but it
doesn't explain why crow would? It's only the difference in the size of
crow that breaks the ABI, AFAICS.
> So I think that unixODBC should be fixed instead of FreeTDS (unixODBC
> 2.2.12 already contains this change). Changing only FreeTDS declaration
> fix compile problems but lead to data corruptions or possible cores so I
> think is better to fix the problem in a definitive way...
> You can get unixODBC 2.2.12 (which is not a release!!) at
> ftp://ftp.easysoft.com/pub/unixODBC/
Hrm. Well, I'm not happy with the idea of freetds 0.64's ODBC driver only
being compatible with 64-bit systems when using an unreleased version of
unixodbc; but if this ABI change has already been made in unixodbc 2.2.12, I
guess we'd be better off making this same ABI change in Debian sooner rather
than later.
Thanks,
--
Steve Langasek Give me a lever long enough and a Free OS
Debian Developer to set it on, and I can move the world.
vorlon@debian.org http://www.debian.org/
_______________________________________________
FreeTDS mailing list
FreeTDS@lists.ibiblio.org
http://lists.ibiblio.org/mailman/listinfo/freetds
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic