apr-bugs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 50690] New: apr dbd oracle driver does not work under AIX/ppc and Solaris/sparc
Date Sun, 30 Jan 2011 10:33:47 GMT

           Summary: apr dbd oracle driver does not work under AIX/ppc and
           Product: APR
           Version: 1.3.9
          Platform: Other
        OS/Version: AIX
            Status: NEW
          Keywords: PatchAvailable
          Severity: normal
          Priority: P2
         Component: APR-util
        AssignedTo: bugs@apr.apache.org
        ReportedBy: sr@myarm.com

Created an attachment (id=26577)
 --> (https://issues.apache.org/bugzilla/attachment.cgi?id=26577)
changed OCIAttrGet(OCI_ATTR_STMT_TYPE) output parameter from int to

The apr dbd oracle driver works fine under Linux/x86, Solaris/x86 and Windows
x86. However under AIX/ppc and Solaris/sparc the check connection select fails.
Oracle returns the error "ORA-24374: define not done before fetch or execute
and fetch".

This bug is caused by an inproper use of OCIAttrGet(OCI_ATTR_STMT_TYPE). The
out parameter for the statement type should be an 16-bit integer, but its
currently just an int (normally 32-bit). Under x86 systems the correct type is
returned and the following if() statement is executed:

if (stmt->type == OCI_STMT_SELECT) {
    ret = outputParams(sql, stmt);

But under ppc or sparc (big-endian) the returned statement type is wrong and
therefore outputParams() is not called which will result in the ORA-24374 when
trying to fetch the result of the SELECT.

The attached patch uses an apr_int16_t variable to retrieve the statement type
and it works find under AIX.

Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

To unsubscribe, e-mail: bugs-unsubscribe@apr.apache.org
For additional commands, e-mail: bugs-help@apr.apache.org

View raw message