[unixODBC-dev] ODBC on 64 bit linux - test64

Nick Gorham nick.gorham at easysoft.com
Mon Jan 21 16:03:56 GMT 2008


ZIGLIO, Frediano, VF-IT wrote:

>Sebastien just reported to me log from tests ran under win64. test64
>return
>
>start test test64.exe  
>odbctest
>--------
>
>connection parameters:
>server:   'egServer80'
>user:     'f4gl'
>password: '????'
>database: 'testdb'
>use testdb
>create table #tmp1 (i int)
>INSERT INTO #tmp1(i) VALUES(?)
>INSERT INTO #tmp1(i) VALUES(?)
>INSERT INTO #tmp1(i) VALUES(?)
>SELECT DISTINCT i FROM #tmp1
>SELECT DISTINCT i FROM #tmp1
>SELECT DISTINCT i FROM #tmp1
>ok test test64.exe 
>
>Well... what's test64 and what does this result mean??
>
>test64 tests (currently) SQL_DESC_ROWS_PROCESSED_PTR. This pointer holds
>the pointer to how many rows are returned/processed. I wrote test cause
>this pointer is bound to many attributes. The test demonstrate that
>indipendently from how you set this pointer it's always SQLULEN (that is
>64bit on 64bit platforms). So
>- SQLSetStmtAttr SQL_ATTR_PARAMS_PROCESSED_PTR
>- SQLSetDescField SQL_DESC_ROWS_PROCESSED_PTR (both IPD and IRD)
>- SQLSetStmtAttr SQL_ATTR_PARAMS_PROCESSED_PTR
>- parameter pirow of SQLParamOptions
>- parameter RowCountPtr of SQLExtendedFetch
>are SQLULEN* under 64bit!
>This is not well stated at http://support.microsoft.com/kb/298678 !!
>For this reason SQLROWSETSIZE unixODBC type should be SQLULEN not
>SQLUINTEGER !!
>  
>

We have been round this several times now. The default in 2.2.12 is for 
SQLULEN to be 2 byte on 64 bit platforms, as that was how MS defined it 
in the past, and how most unix apps were built. Now MS have redefined it 
to 64 bit, so in the 2.2.13 in CVS the default is 4 byte.

You can change the default from two to 4 in 2,2,12 by defining 
BUILD_REAL_64_BIT_MODE and rebuilding.

I am not looking forward to all the reports of all the broken apps when 
2.2.13 is released :-(.

-- 
Nick Gorham
Easysoft Limited
http://www.easysoft.com, http://www.unixODBC.org




More information about the unixODBC-dev mailing list