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 2
2
3
3
## node-oracledb v1.2.0 (DD Mon YYYY)
4
4
5
+ - Added a check to return an NJS error when an invalid DML RETURN statement
6
+ does not give an ORA error.
7
+
5
8
- Added support for RAW data type.
6
9
7
10
- 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)
931
931
executeBaton->dpistmt ->execute (1 , executeBaton->autoCommit );
932
932
executeBaton->rowsAffected = executeBaton->dpistmt ->rowsAffected ();
933
933
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
+
934
948
/* Check to see if the string buffer size is good in case of
935
949
* DML Returning.
936
950
*/
Original file line number Diff line number Diff line change @@ -60,6 +60,7 @@ static const char *errMsg[] =
60
60
" NJS-024: memory allocation failed" ,
61
61
" NJS-025: overflow when calculating results area size" ,
62
62
" NJS-026: maxRows must be greater than zero" ,
63
+ " NJS-027: unexpected SQL parsing error" ,
63
64
" NJS-027: raw database type is not supported with DML Returning statements" ,
64
65
};
65
66
Original file line number Diff line number Diff line change @@ -59,6 +59,7 @@ typedef enum
59
59
errInsufficientMemory,
60
60
errResultsTooLarge,
61
61
errInvalidmaxRows,
62
+ errSQLSyntaxError,
62
63
errBufferReturningInvalid,
63
64
64
65
// New ones should be added here
You can’t perform that action at this time.
0 commit comments