Added a check to report an error when the DB is not reporting an error in DML RETURNING statements.
This commit is contained in:
parent
9dff2f4a1d
commit
aa7a43794e
|
@ -2,6 +2,9 @@
|
||||||
|
|
||||||
## node-oracledb v1.2.0 (DD Mon YYYY)
|
## node-oracledb v1.2.0 (DD Mon YYYY)
|
||||||
|
|
||||||
|
- Added a check to return an NJS error when an invalid DML RETURN statement
|
||||||
|
does not give an ORA error.
|
||||||
|
|
||||||
- Added support for RAW data type.
|
- Added support for RAW data type.
|
||||||
|
|
||||||
- Fixed intermittent crash while setting `fetchAsString`, and incorrect output while reading the value.
|
- Fixed intermittent crash while setting `fetchAsString`, and incorrect output while reading the value.
|
||||||
|
|
|
@ -931,6 +931,20 @@ void Connection::Async_Execute (uv_work_t *req)
|
||||||
executeBaton->dpistmt->execute(1, executeBaton->autoCommit);
|
executeBaton->dpistmt->execute(1, executeBaton->autoCommit);
|
||||||
executeBaton->rowsAffected = executeBaton->dpistmt->rowsAffected();
|
executeBaton->rowsAffected = executeBaton->dpistmt->rowsAffected();
|
||||||
|
|
||||||
|
// Check whether indicators were allocated as part of callback
|
||||||
|
if ( executeBaton->stmtIsReturning )
|
||||||
|
{
|
||||||
|
for ( unsigned int b = 0; b < executeBaton->binds.size (); b++ )
|
||||||
|
{
|
||||||
|
if ( executeBaton->binds[b]->isOut && !executeBaton->binds[b]->ind)
|
||||||
|
{
|
||||||
|
executeBaton->error = NJSMessages::getErrorMsg (
|
||||||
|
errSQLSyntaxError );
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/* Check to see if the string buffer size is good in case of
|
/* Check to see if the string buffer size is good in case of
|
||||||
* DML Returning.
|
* DML Returning.
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -60,6 +60,7 @@ static const char *errMsg[] =
|
||||||
"NJS-024: memory allocation failed",
|
"NJS-024: memory allocation failed",
|
||||||
"NJS-025: overflow when calculating results area size",
|
"NJS-025: overflow when calculating results area size",
|
||||||
"NJS-026: maxRows must be greater than zero",
|
"NJS-026: maxRows must be greater than zero",
|
||||||
|
"NJS-027: unexpected SQL parsing error",
|
||||||
"NJS-027: raw database type is not supported with DML Returning statements",
|
"NJS-027: raw database type is not supported with DML Returning statements",
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -59,6 +59,7 @@ typedef enum
|
||||||
errInsufficientMemory,
|
errInsufficientMemory,
|
||||||
errResultsTooLarge,
|
errResultsTooLarge,
|
||||||
errInvalidmaxRows,
|
errInvalidmaxRows,
|
||||||
|
errSQLSyntaxError,
|
||||||
errBufferReturningInvalid,
|
errBufferReturningInvalid,
|
||||||
|
|
||||||
// New ones should be added here
|
// New ones should be added here
|
||||||
|
|
Loading…
Reference in New Issue