@@ -99,12 +99,7 @@ static bool njsResultSet_closeAsync(njsBaton *baton)
99
99
{
100
100
njsResultSet * rs = (njsResultSet * ) baton -> callingInstance ;
101
101
102
- // implicit result sets cannot be closed, but releasing the reference to
103
- // the statements will allow the parent result set to be closed
104
- if (rs -> dependsOnHandle ) {
105
- dpiStmt_release (rs -> dependsOnHandle );
106
- rs -> dependsOnHandle = NULL ;
107
- } else if (dpiStmt_close (baton -> dpiStmtHandle , NULL , 0 ) < 0 ) {
102
+ if (dpiStmt_close (baton -> dpiStmtHandle , NULL , 0 ) < 0 ) {
108
103
njsBaton_setErrorDPI (baton );
109
104
rs -> handle = baton -> dpiStmtHandle ;
110
105
baton -> dpiStmtHandle = NULL ;
@@ -165,10 +160,6 @@ static void njsResultSet_finalize(napi_env env, void *finalizeData,
165
160
dpiStmt_release (rs -> handle );
166
161
rs -> handle = NULL ;
167
162
}
168
- if (rs -> dependsOnHandle ) {
169
- dpiStmt_release (rs -> dependsOnHandle );
170
- rs -> dependsOnHandle = NULL ;
171
- }
172
163
free (rs );
173
164
}
174
165
@@ -235,10 +226,6 @@ static bool njsResultSet_getRowsAsync(njsBaton *baton)
235
226
if ((!ok || !moreRows ) && rs -> autoClose ) {
236
227
dpiStmt_release (rs -> handle );
237
228
rs -> handle = NULL ;
238
- if (rs -> dependsOnHandle ) {
239
- dpiStmt_release (rs -> dependsOnHandle );
240
- rs -> dependsOnHandle = NULL ;
241
- }
242
229
}
243
230
244
231
return ok ;
@@ -402,8 +389,7 @@ static bool njsResultSet_getRowsProcessArgs(njsBaton *baton, napi_env env,
402
389
// connection.
403
390
//-----------------------------------------------------------------------------
404
391
bool njsResultSet_new (njsBaton * baton , napi_env env , dpiStmt * handle ,
405
- dpiStmt * dependsOnHandle , njsVariable * vars , uint32_t numVars ,
406
- bool autoClose , napi_value * rsObj )
392
+ njsVariable * vars , uint32_t numVars , bool autoClose , napi_value * rsObj )
407
393
{
408
394
napi_value connObj ;
409
395
njsResultSet * rs ;
@@ -421,15 +407,8 @@ bool njsResultSet_new(njsBaton *baton, napi_env env, dpiStmt *handle,
421
407
NJS_CHECK_NAPI (env , napi_set_named_property (env , * rsObj , "_connection" ,
422
408
connObj ))
423
409
424
- // if this result set depends on another ODPI-C statement remaining open,
425
- // add a referene to it to make sure it doesn't get closed (used by
426
- // implicit results)
427
- if (dependsOnHandle && dpiStmt_addRef (dependsOnHandle ) < 0 )
428
- return njsBaton_setErrorDPI (baton );
429
-
430
410
// perform some initializations
431
411
rs -> handle = handle ;
432
- rs -> dependsOnHandle = dependsOnHandle ;
433
412
rs -> conn = (njsConnection * ) baton -> callingInstance ;
434
413
rs -> numQueryVars = numVars ;
435
414
rs -> queryVars = vars ;
0 commit comments