Opened 14 years ago

Closed 14 years ago

Last modified 11 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 14 years ago.
Diff of my cpl_odbc.cpp against trunk

Download all attachments as: .zip

Change History (3)

by gaige, 14 years ago

Attachment: cpl_odbc.cpp-diff added

Diff of my cpl_odbc.cpp against trunk

comment:1 by warmerdam, 14 years ago

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 by Even Rouault, 11 years ago

Milestone: 1.6.4

Milestone 1.6.4 deleted

Note: See TracTickets for help on using tickets.