Fixed AIX-specific REF CURSOR related failures

This commit is contained in:
Christopher Jones 2015-09-25 17:22:45 +10:00
parent be5de21565
commit 29d3b8092f
5 changed files with 9 additions and 7 deletions

View File

@ -2,6 +2,8 @@
## node-oracledb v1.2.0 (DD Mon YYYY)
- Fixed AIX-specific REF CURSOR related failures.
- Optimized CLOB memory allocation to account for different database-to-client character set expansions.
- Fixed a crash while reading a LOB from a closed connection

View File

@ -198,7 +198,7 @@ public:
virtual OCIError *getError () = 0;
virtual unsigned long getState () = 0;
virtual unsigned int getState () = 0;
virtual ~Stmt(){};

View File

@ -729,15 +729,15 @@ bool StmtImpl::isReturning ()
One of the possible values DpiStmtState
(DpiStmtStateInitialized, DpiStmtStateExecute, DpiStmtEndOfFetch)
*/
unsigned long StmtImpl::getState ()
unsigned int StmtImpl::getState ()
{
if ( state_ == DPI_STMT_STATE_UNDEFINED )
{
ociCall (OCIAttrGet (stmth_, OCI_HTYPE_STMT, (ub4*)&state_, NULL,
ociCall (OCIAttrGet (stmth_, OCI_HTYPE_STMT, &state_, NULL,
OCI_ATTR_STMT_STATE, errh_ ), errh_ );
}
return state_;
return ( unsigned int ) state_;
}

View File

@ -94,7 +94,7 @@ public:
virtual OCIError * getError () { return errh_; }
virtual unsigned long getState ();
virtual unsigned int getState ();
// Is the SQL statement DML or not ?
@ -137,7 +137,7 @@ private:
bool isReturning_; // Does the stmt has RETURNING INTO clause?
bool isReturningSet_; // Has isReturning_ flag queried & set.
bool refCursor_; // refCursor or not.
unsigned long state_; // OCI Stmt State
ub4 state_; // OCI Stmt State
};

View File

@ -943,7 +943,7 @@ void Connection::Async_Execute (uv_work_t *req)
/* Here bind->isOut is expected to be TRUE, and is checked earlier */
if ( bind->type == dpi::DpiRSet )
{
unsigned long state = ((Stmt*)bind->value)->getState ();
unsigned int state = ((Stmt*)bind->value)->getState ();
if ( state == DPI_STMT_STATE_EXECUTED )
{