Skip to content

Upgrade bundled ODPI-C from 4.2.1 to 6.0.0 - #44

Open
ahjulstad wants to merge 1 commit into
felipenoris:masterfrom
ahjulstad:feature/odpi-6.0.0
Open

ahjulstad wants to merge 1 commit into
felipenoris:masterfrom
ahjulstad:feature/odpi-6.0.0

Conversation

@ahjulstad

Copy link
Copy Markdown

AI-written.... I saw there were several bugs in the ODPI-C release notes that I didn't want to be bothered by, hence this PR.

I have only tested on Ubuntu 26.04 against the free Oracle database.


ODPI-C 6.0.0 drops support for Oracle Client libraries before 19c, so bump the version requested from dpiContext_createWithParams to 6.0 and note the new client requirement in the docs.

Several C structs gained members across 5.x and 6.0; mirror them so the sizeof assertions in init hold:

dpiCommonCreateParams + accessToken
dpiConnCreateParams + outNewSession
dpiPoolCreateParams + maxSessionsPerShard, accessTokenCallback,
accessTokenCallbackContext
dpiDataTypeInfo + isJson, domainSchema, domainName,
annotations, isOson and the VECTOR members;
fsPrecision is uint8_t, not int16_t
dpiStmtInfo + sqlId, sqlIdLength
dpiObjectTypeInfo + packageName, packageNameLength

Also extend the type enumerations. This matters for correctness beyond the new values: 2030 used to be DPI_ORACLE_TYPE_MAX and is now DPI_ORACLE_TYPE_UROWID, so a UROWID column would previously have been misread, and codes above it failed to convert at all.

Verified against Oracle Database 23.26 with client 23.26: the upstream test suite passes, including the Lob, Bind, Variables, Cursor and ObjectType sets.

ODPI-C 6.0.0 drops support for Oracle Client libraries before 19c, so
bump the version requested from dpiContext_createWithParams to 6.0 and
note the new client requirement in the docs.

Several C structs gained members across 5.x and 6.0; mirror them so the
sizeof assertions in __init__ hold:

  dpiCommonCreateParams  + accessToken
  dpiConnCreateParams    + outNewSession
  dpiPoolCreateParams    + maxSessionsPerShard, accessTokenCallback,
                           accessTokenCallbackContext
  dpiDataTypeInfo        + isJson, domainSchema, domainName,
                           annotations, isOson and the VECTOR members;
                           fsPrecision is uint8_t, not int16_t
  dpiStmtInfo            + sqlId, sqlIdLength
  dpiObjectTypeInfo      + packageName, packageNameLength

Also extend the type enumerations. This matters for correctness beyond
the new values: 2030 used to be DPI_ORACLE_TYPE_MAX and is now
DPI_ORACLE_TYPE_UROWID, so a UROWID column would previously have been
misread, and codes above it failed to convert at all.

Verified against Oracle Database 23.26 with client 23.26: the upstream
test suite passes, including the Lob, Bind, Variables, Cursor and
ObjectType sets.
@codecov

codecov Bot commented Aug 24, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 0% with 3 lines in your changes missing coverage. Please review.
✅ Project coverage is 5.85%. Comparing base (21fb4e0) to head (fe34be2).
⚠️ Report is 62 commits behind head on master.

Files with missing lines Patch % Lines
src/connection.jl 0.00% 2 Missing ⚠️
src/pool.jl 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff            @@
##           master     #44      +/-   ##
=========================================
+ Coverage    4.73%   5.85%   +1.12%     
=========================================
  Files          20      23       +3     
  Lines        1649    1846     +197     
=========================================
+ Hits           78     108      +30     
- Misses       1571    1738     +167     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant