File tree Expand file tree Collapse file tree 4 files changed +24
-1
lines changed Expand file tree Collapse file tree 4 files changed +24
-1
lines changed Original file line number Diff line number Diff line change @@ -75,6 +75,9 @@ Thin Mode Changes
75
75
Thick Mode Changes
76
76
+++++++++++++++++++
77
77
78
+ #) Fixed an issue with privileges that prevented the startup() function from
79
+ bringing up the database.
80
+
78
81
#) Tightened code to avoid possible unexpected runtime errors during token
79
82
callback.
80
83
Original file line number Diff line number Diff line change @@ -124,14 +124,23 @@ function _initializeThinDriver() {
124
124
// Returns a boolean indicating if the supplied value is a valid privilege.
125
125
//---------------------------------------------------------------------------
126
126
function _isPrivilege ( value ) {
127
+ // Privileges are mutually exclusive and cannot be specified together
128
+ // except SYSPRELIM, which cannot be specified alone, it is specified in a
129
+ // combo with SYSOPER or SYSDBA. SYSPRELIM is used only for
130
+ // startup/shutdown
131
+
132
+ // If SYSPRELIM specified, clear the bit
133
+ if ( value & constants . SYSPRELIM ) {
134
+ value = value ^ constants . SYSPRELIM ;
135
+ }
136
+
127
137
return (
128
138
value === constants . SYSASM ||
129
139
value === constants . SYSBACKUP ||
130
140
value === constants . SYSDBA ||
131
141
value === constants . SYSDG ||
132
142
value === constants . SYSKM ||
133
143
value === constants . SYSOPER ||
134
- value === constants . SYSPRELIM ||
135
144
value === constants . SYSRAC
136
145
) ;
137
146
}
Original file line number Diff line number Diff line change @@ -362,6 +362,16 @@ describe('1. connection.js', function() {
362
362
await pool . close ( 0 ) ;
363
363
} ) ;
364
364
365
+ it ( '1.7.6 negative test case SYSPRELIM & SYSASM' , async function ( ) {
366
+ const credential = { ...dbConfig ,
367
+ privilege : oracledb . SYSASM | oracledb . SYSPRELIM
368
+ } ;
369
+ await assert . rejects (
370
+ async ( ) => await oracledb . getConnection ( credential ) ,
371
+ / O R A - 0 1 0 3 1 : /
372
+ ) ;
373
+ } ) ;
374
+
365
375
} ) ; // 1.7
366
376
367
377
describe ( '1.8 Ping method' , function ( ) {
Original file line number Diff line number Diff line change @@ -24,6 +24,7 @@ Overview of node-oracledb functional tests
24
24
1.7.3 Negative value - random constants
25
25
1.7.4 Negative value - NaN
26
26
1.7.5 gets ignored when acquiring a connection from Pool
27
+ 1.7.6 negative test case SYSPRELIM & SYSASM
27
28
1.8 Ping method
28
29
1.8.1 ping() checks the connection is usable
29
30
1.8.2 closed connection
You can’t perform that action at this time.
0 commit comments