Skip to content

Commit

Permalink
Fixed segmentation fault issue when getting connection from the pool …
Browse files Browse the repository at this point in the history
…for external authentication
  • Loading branch information
sharadraju committed Dec 18, 2024
1 parent 76a1108 commit e5062e9
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 1 deletion.
3 changes: 3 additions & 0 deletions doc/src/release_notes.rst
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ node-oracledb `v6.7.1 <https://github.com/oracle/node-oracledb/compare/v6.7.0...
Common Changes
++++++++++++++

#) Fixed the issue causing segmentation fault while getting connection from
pool for external authentication.

#) Fixed SyntaxError with Bun runtime.
See `Issue #1707 <https://github.com/oracle/node-oracledb/issues/1707>`__.

Expand Down
3 changes: 2 additions & 1 deletion src/njsModule.h
Original file line number Diff line number Diff line change
Expand Up @@ -578,7 +578,8 @@ struct njsPool {
uint32_t stmtCacheSize;
int32_t poolPingInterval;
int32_t poolPingTimeout;
bool sodaMetadataCache;
bool sodaMetadataCache;
bool externalAuth;
njsTokenCallback *accessTokenCallback;
dpiErrorInfo warningInfo;
};
Expand Down
2 changes: 2 additions & 0 deletions src/njsPool.c
Original file line number Diff line number Diff line change
Expand Up @@ -300,6 +300,7 @@ static bool njsPool_createPostAsync(njsBaton *baton, napi_env env,
baton->dpiPoolHandle = NULL;

// perform other initializations
pool->externalAuth = baton->externalAuth;
pool->poolMax = baton->poolMax;
pool->poolMaxPerShard = baton->poolMaxPerShard;
pool->poolMin = baton->poolMin;
Expand Down Expand Up @@ -399,6 +400,7 @@ static bool njsPool_getConnectionAsync(njsBaton *baton)
params.connectionClassLength = (uint32_t) baton->connectionClassLength;
params.tag = baton->tag;
params.tagLength = (uint32_t) baton->tagLength;
params.externalAuth = pool->externalAuth;

// Sharding
params.shardingKeyColumns = baton->shardingKeyColumns;
Expand Down

0 comments on commit e5062e9

Please sign in to comment.