My favorites | Sign in
Project Logo
             
New issue | Search
for
| Advanced search | Search tips
Issue 23: Issue with 64-bit Linux
1 person starred this issue and may be notified of changes. Back to list
Status:  Investigating
Owner:  ----
Type-Defect
Priority-Medium


Sign in to add a comment
 
Reported by axel.b.k...@web.de, Jan 08, 2009
On my 64-bit Kubuntu Linux box I enyounter the following problem:

Decimal-values with NULL-value produce an exception when reading. This
happens because in src/getdata.cpp, function GetDataDecimal, the variable
cbFetched is of type SQLLEN which is 64 bits long. The return value -1 for
a NULL value is a 32 bit number, so it is not -1 in 64 bits and the
function tries to convert the empty string '' to a decimal which raises an
exception.

Possible solution to the problem: cbFetched must be of a 32-bit type,
regardless of the systems bit size. I am sorry, but I don't know, which
type could be the right one for this.

Regards, Axel
Comment 1 by mkleehammer, Mar 18, 2009
I'm at a loss here: cbFetched really needs to be a SQLLEN -- we're passing a pointer
to a 8-bytes of memory (SQLLEN*) so it would be bad if the memory only contained 4-bytes.

I assume you are using unixODBC?  It allows you to set SIZEOF_LONG, so if the driver
and the driver-manager were compiled with different values, you might see this
behavior.  (Incidentally, what kind of whacked out option is that, changing the size
of long? ;)

What version of unixODBC are you using?  I'll look through their header files and see
what we can do.
Status: Investigating
Comment 2 by axel.b.k...@web.de, Mar 21, 2009
I am using unixODBC 2.2.11-16build2  on Kubuntu 8.10.

Regards, Axel
Sign in to add a comment

Hosted by Google Code