Opened 10 years ago

Closed 10 years ago

Last modified 7 years ago

#3336 closed defect (fixed)

ODBC Code type mismatch on 64-bit builds

Reported by: gaige Owned by: warmerdam
Priority: high Milestone:
Component: default Version: unspecified
Severity: normal Keywords: odbc
Cc:

Description

CPLODBCStatement::CollectResultsInfo?() allocates space for column information. Unfortunately, it does so with some assumptions about the data types that are in error when compiling for 64-bit machines and 64-bit ODBC. These are easily remedied by using the SQL types.

In particular m_panColValueLengths allocates sizeof(integer) instead of sizeof(SQLLEN).

Approximately line 431-439 in trunk and 1.6, and again at 1236-1250. Diffs attached.

Thanks, -Gaige

Attachments (1)

cpl_odbc.cpp-diff (4.1 KB) - added by gaige 10 years ago.
Diff of my cpl_odbc.cpp against trunk

Download all attachments as: .zip

Change History (3)

Changed 10 years ago by gaige

Attachment: cpl_odbc.cpp-diff added

Diff of my cpl_odbc.cpp against trunk

comment:1 Changed 10 years ago by warmerdam

Keywords: odbc added
Milestone: 1.6.4
Resolution: fixed
Status: newclosed

I have applied a slight variation on the patch that did not attempt to rename _SQLLEN to SQLLEN in trunk (r18585). This will make it into 1.7.0RC1.

Same patch applied in 1.6 branch (r18586).

Thanks!

comment:2 Changed 7 years ago by Even Rouault

Milestone: 1.6.4

Milestone 1.6.4 deleted

Note: See TracTickets for help on using tickets.