Bug 518623 - busted sizes for SQLBIGINT and ODBCINT64 etc
Summary: busted sizes for SQLBIGINT and ODBCINT64 etc
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: unixODBC
Version: 12
Hardware: All
OS: Linux
low
medium
Target Milestone: ---
Assignee: Tom Lane
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2009-08-21 10:59 UTC by Caolan McNamara
Modified: 2013-07-03 03:23 UTC (History)
3 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2010-04-08 10:05:33 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
get the defines into the headers (982 bytes, patch)
2009-08-21 10:59 UTC, Caolan McNamara
no flags Details | Diff

Description Caolan McNamara 2009-08-21 10:59:18 UTC
Created attachment 358225 [details]
get the defines into the headers

Description of problem:


Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:
#include <sqltypes.h>
#include <stdio.h>

int main(void)
{
        fprintf(stderr, "size is %d\n", sizeof(SQLBIGINT));
        return 0;
}
  
Actual results:
size is 4

Expected results:
I strongly suspect it should be 8

Additional info:
This comes about because /usr/include/unixodbc_conf_platform.h has just
#define ODBCINT64
which comes from odbc_config --header, it should be
#define ODBCINT64 "something"

A fix attached, which is basically derived from head unixODBC cvs. Quite possibly technically anything that built against our unixODBC headers is busted.

Comment 1 Caolan McNamara 2009-08-21 13:52:24 UTC
yeah, should be 8 not 4.

back in F-10 with unixODBC-2.2.12-9.fc10 we get 8
unix-ODBC-2.2.11 on debian gives 8

so it just looks like unixODBC-2.2.14 in F-11/rawhide that gives the incorrect 4

Comment 2 Tom Lane 2009-08-21 19:05:30 UTC
Hmm.  Anything that mentioned ODBCINT64 directly would probably fail to compile, but it seems like gcc doesn't object to "typedef SQLBIGINT;" and treats it as implicitly int.  So code referencing SQLBIGINT or SQLUBIGINT is at risk.

I will fix this in HEAD ... I am not sure if it's bright to back-patch into F-11, but on the other hand it's unlikely that could make things worse.

Comment 3 Fedora Update System 2009-08-21 21:11:10 UTC
unixODBC-2.2.14-6.fc11 has been submitted as an update for Fedora 11.
http://admin.fedoraproject.org/updates/unixODBC-2.2.14-6.fc11

Comment 4 Tom Lane 2009-08-21 21:13:34 UTC
Fix pushed into rawhide, also in F-11 testing.

Comment 5 Fedora Update System 2009-08-25 04:30:15 UTC
unixODBC-2.2.14-6.fc11 has been pushed to the Fedora 11 testing repository.  If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with 
 su -c 'yum --enablerepo=updates-testing update unixODBC'.  You can provide feedback for this update here: http://admin.fedoraproject.org/updates/F11/FEDORA-2009-8919

Comment 6 Jesse Keating 2009-10-21 23:06:57 UTC
This has been fixed for F12, dropping it from the blocker.

Comment 7 Bug Zapper 2009-11-16 11:35:31 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 12 development cycle.
Changing version to '12'.

More information and reason for this action is here:
http://fedoraproject.org/wiki/BugZappers/HouseKeeping

Comment 8 Caolan McNamara 2010-04-08 10:05:33 UTC
lets mark this as closed, as fixed since F-12


Note You need to log in before you can comment on or make changes to this bug.