Skip to content

Commit 4a03ecf

Browse files
committed
Error update for invalid POOL_BOUNDARY value with Implicit Connection Pooling
1 parent 9df01ab commit 4a03ecf

File tree

6 files changed

+1
-35
lines changed

6 files changed

+1
-35
lines changed

lib/errors.js

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,6 @@ const ERR_VECTOR_FORMAT_NOT_SUPPORTED = 144;
144144
const ERR_VECTOR_VERSION_NOT_SUPPORTED = 145;
145145
const ERR_OBJECT_IS_NOT_A_COLLECTION = 146;
146146
const ERR_CURSOR_HAS_BEEN_CLOSED = 147;
147-
const ERR_INVALID_POOL_BOUNDARY = 148;
148147
const ERR_DML_RETURNING_DUP_BINDS = 149;
149148

150149
// Oracle Net layer errors start from 500
@@ -191,7 +190,6 @@ adjustErrorXref.set("ORA-00600", ERR_CONNECTION_CLOSED);
191190
adjustErrorXref.set("ORA-24338", ERR_INVALID_REF_CURSOR);
192191
adjustErrorXref.set("ORA-25708", ERR_TOKEN_HAS_EXPIRED);
193192
adjustErrorXref.set("ORA-24344", WRN_COMPILATION_CREATE);
194-
adjustErrorXref.set("ORA-24545", ERR_INVALID_POOL_BOUNDARY);
195193

196194
// define mapping for error messages
197195
const messages = new Map();
@@ -423,8 +421,6 @@ messages.set(ERR_OBJECT_IS_NOT_A_COLLECTION, // NJS-146
423421
'object %s is not a collection');
424422
messages.set(ERR_CURSOR_HAS_BEEN_CLOSED, // NJS-147
425423
'cursor has been closed by the database');
426-
messages.set(ERR_INVALID_POOL_BOUNDARY, // NJS-148
427-
'invalid value of POOL_BOUNDARY in connect string');
428424
messages.set(ERR_DML_RETURNING_DUP_BINDS, // NJS-149
429425
'the bind variable placeholder "%s" cannot be used both before and after the RETURNING clause in a DML RETURNING statement');
430426

@@ -819,7 +815,6 @@ module.exports = {
819815
ERR_VECTOR_VERSION_NOT_SUPPORTED,
820816
ERR_OBJECT_IS_NOT_A_COLLECTION,
821817
ERR_CURSOR_HAS_BEEN_CLOSED,
822-
ERR_INVALID_POOL_BOUNDARY,
823818
ERR_DML_RETURNING_DUP_BINDS,
824819
ERR_CONNECTION_CLOSED_CODE: `${ERR_PREFIX}-${ERR_CONNECTION_CLOSED}`,
825820
WRN_COMPILATION_CREATE,

lib/thin/connection.js

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -632,7 +632,6 @@ class ThinConnectionImpl extends ConnectionImpl {
632632
this._drcpEnabled = false;
633633
this.serviceName = '';
634634
this.remoteAddress = '';
635-
this.implicitPoolBoundary = null;
636635
this.comboKey = null; // used in changePassword API
637636

638637
this.nscon = new nsi();
@@ -650,13 +649,9 @@ class ThinConnectionImpl extends ConnectionImpl {
650649
this.serviceName = this.nscon.getOption(sqlNetConstants.SVCNAME);
651650
this.sid = this.nscon.getOption(sqlNetConstants.SID);
652651
this.purity = this.nscon.getOption(sqlNetConstants.PURITY) | constants.PURITY_DEFAULT;
653-
this.implicitPoolBoundary = this.nscon.getOption(sqlNetConstants.POOLBOUNDARY);
654652
}
655653
if (serverType) {
656654
this._drcpEnabled = serverType.toLowerCase() === 'pooled';
657-
if (this._drcpEnabled) {
658-
thinUtil.validateImplicitPoolBoundary(this.implicitPoolBoundary);
659-
}
660655
}
661656
this.remoteAddress = this.nscon.getOption(sqlNetConstants.REMOTEADDR);
662657
this.connectionClass = params.connectionClass;

lib/thin/pool.js

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -128,12 +128,6 @@ class ThinPoolImpl extends PoolImpl {
128128
this._generateConnectionClass();
129129
}
130130

131-
// validate pool boundary for implicit pooling
132-
this._implicitPoolBoundary = this._userConfig._connInfo[6];
133-
if (this._isDRCPEnabled) {
134-
thinUtil.validateImplicitPoolBoundary(this._implicitPoolBoundary);
135-
}
136-
137131
// create a background task. It will create minimum connections in the pool
138132
// and expand the pool as required.
139133
this.bgThreadFunc();

lib/thin/sqlnet/constants.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,6 @@ module.exports = {
197197
CONNCLASS: 7, // Connection Class
198198
PURITY: 8, // Purity
199199
SID: 9, // SID
200-
POOLBOUNDARY: 10, // Pool Boundary for implicit pooling
201200

202201
/* FLAGS */
203202
NSNOBLOCK: 0x0001, // Do not block

lib/thin/sqlnet/networkSession.js

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -58,9 +58,8 @@ async function getConnectionInfo(userConfig) {
5858
const svcname = findValue(nvpair, ["DESCRIPTION", "CONNECT_DATA", "SERVICE_NAME"]);
5959
const sid = findValue(nvpair, ["DESCRIPTION", "CONNECT_DATA", "SID"]);
6060
const poolPurity = findValue(nvpair, ["DESCRIPTION", "CONNECT_DATA", "POOL_PURITY"]);
61-
const poolBoundary = findValue(nvpair, ["DESCRIPTION", "CONNECT_DATA", "POOL_BOUNDARY"]);
6261

63-
return [serverVal, connClass, svcname, poolPurity, sid, addressNode, poolBoundary];
62+
return [serverVal, connClass, svcname, poolPurity, sid, addressNode];
6463
}
6564

6665
/**
@@ -599,9 +598,6 @@ class NetworkSession {
599598
case constants.HEALTHCHECK: /* Is connection healthy */
600599
return (this.connected && this.ntAdapter.connected && !this.ntAdapter.err);
601600

602-
case constants.POOLBOUNDARY: /* Pool Boundary */
603-
return findValue(this.cDataNVPair, ["DESCRIPTION", "CONNECT_DATA", "POOL_BOUNDARY"]);
604-
605601
default:
606602
errors.throwErr(errors.ERR_INTERNAL, "getOption not supported for opcode " + opcode);
607603
}

lib/thin/util.js

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -238,18 +238,6 @@ function checkCredentials(params) {
238238
}
239239
}
240240

241-
//---------------------------------------------------------------------------
242-
// validateImplicitPoolBoundary()
243-
//
244-
// validate POOL_BOUNDARY parameter value
245-
//---------------------------------------------------------------------------
246-
function validateImplicitPoolBoundary(value) {
247-
if (value != null && String(value.toLowerCase()) !== 'statement' &&
248-
String(value.toLowerCase()) !== 'transaction') {
249-
errors.throwErr(errors.ERR_INVALID_POOL_BOUNDARY);
250-
}
251-
}
252-
253241
//---------------------------------------------------------------------------
254242
// normalizePrivateKey()
255243
//
@@ -267,5 +255,4 @@ module.exports = {
267255
checkProxyUserValidity,
268256
checkCredentials,
269257
normalizePrivateKey,
270-
validateImplicitPoolBoundary
271258
};

0 commit comments

Comments
 (0)