Extend rollback-on-connection-release heuristic for 11g Oracle Clients
This commit is contained in:
parent
bc1fdf5c8a
commit
693d716b7d
|
@ -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;
|
||||
|
|
|
@ -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 );
|
||||
|
|
|
@ -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 ();
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue