Extend rollback-on-connection-release heuristic for 11g Oracle Clients

This commit is contained in:
Christopher Jones 2015-12-21 22:34:39 +11:00
parent bc1fdf5c8a
commit 693d716b7d
3 changed files with 2 additions and 12 deletions

View File

@ -166,8 +166,6 @@ public:
// If NJS layer doesn't set any value, default prefetch is done by OCI.
virtual void prefetchRows ( unsigned int prefetchRows ) = 0;
virtual bool isDML() const = 0 ;
virtual bool isReturning() = 0 ;
virtual DPI_SZ_TYPE rowsAffected() const = 0;

View File

@ -349,7 +349,8 @@ void StmtImpl::execute (int numIterations, bool autoCommit)
errh_ );
#if OCI_MAJOR_VERSION < 12
if ( isDML () && !conn_->hasTxn () )
// Rollback on connection release for all non-select transactions.
if ( ( stmtType_ != DpiStmtSelect ) && !conn_->hasTxn () )
{
/* Not to be reset, till thread safety is ensured in NJS */
conn_->hasTxn (true );

View File

@ -96,15 +96,6 @@ public:
virtual unsigned int getState ();
// Is the SQL statement DML or not ?
virtual inline bool isDML () const
{
return ( ( stmtType_ == DpiStmtInsert ) ||
( stmtType_ == DpiStmtUpdate ) ||
( stmtType_ == DpiStmtDelete ) );
}
virtual bool isReturning ();