File tree Expand file tree Collapse file tree 4 files changed +19
-0
lines changed
Expand file tree Collapse file tree 4 files changed +19
-0
lines changed Original file line number Diff line number Diff line change 22
33## node-oracledb v1.2.0 (DD Mon YYYY)
44
5+ - Added a check to return an NJS error when an invalid DML RETURN statement
6+ does not give an ORA error.
7+
58- Added support for RAW data type.
69
710- Fixed intermittent crash while setting ` fetchAsString ` , and incorrect output while reading the value.
Original file line number Diff line number Diff line change @@ -931,6 +931,20 @@ void Connection::Async_Execute (uv_work_t *req)
931931 executeBaton->dpistmt ->execute (1 , executeBaton->autoCommit );
932932 executeBaton->rowsAffected = executeBaton->dpistmt ->rowsAffected ();
933933
934+ // Check whether indicators were allocated as part of callback
935+ if ( executeBaton->stmtIsReturning )
936+ {
937+ for ( unsigned int b = 0 ; b < executeBaton->binds .size (); b++ )
938+ {
939+ if ( executeBaton->binds [b]->isOut && !executeBaton->binds [b]->ind )
940+ {
941+ executeBaton->error = NJSMessages::getErrorMsg (
942+ errSQLSyntaxError );
943+ return ;
944+ }
945+ }
946+ }
947+
934948 /* Check to see if the string buffer size is good in case of
935949 * DML Returning.
936950 */
Original file line number Diff line number Diff line change @@ -60,6 +60,7 @@ static const char *errMsg[] =
6060 " NJS-024: memory allocation failed" ,
6161 " NJS-025: overflow when calculating results area size" ,
6262 " NJS-026: maxRows must be greater than zero" ,
63+ " NJS-027: unexpected SQL parsing error" ,
6364 " NJS-027: raw database type is not supported with DML Returning statements" ,
6465};
6566
Original file line number Diff line number Diff line change @@ -59,6 +59,7 @@ typedef enum
5959 errInsufficientMemory,
6060 errResultsTooLarge,
6161 errInvalidmaxRows,
62+ errSQLSyntaxError,
6263 errBufferReturningInvalid,
6364
6465 // New ones should be added here
You can’t perform that action at this time.
0 commit comments