Commit 1fb7783d authored by unknown's avatar unknown

Fix bug for TCKEYREF's when using IgnoreError


ndb/src/ndbapi/NdbConnection.cpp:
  When using IgnoreError always wait for TCKEYCONF
parent 73770db3
...@@ -1477,6 +1477,17 @@ from other transactions. ...@@ -1477,6 +1477,17 @@ from other transactions.
theGlobalCheckpointId = tGCI; theGlobalCheckpointId = tGCI;
} else if ((tNoComp >= tNoSent) && } else if ((tNoComp >= tNoSent) &&
(theLastExecOpInList->theCommitIndicator == 1)){ (theLastExecOpInList->theCommitIndicator == 1)){
if (m_abortOption == IgnoreError && theError.code != 0){
/**
* There's always a TCKEYCONF when using IgnoreError
*/
#ifdef VM_TRACE
ndbout_c("Not completing transaction 2");
#endif
return -1;
}
/**********************************************************************/ /**********************************************************************/
// We sent the transaction with Commit flag set and received a CONF with // We sent the transaction with Commit flag set and received a CONF with
// no Commit flag set. This is clearly an anomaly. // no Commit flag set. This is clearly an anomaly.
...@@ -1720,6 +1731,16 @@ NdbConnection::OpCompleteFailure() ...@@ -1720,6 +1731,16 @@ NdbConnection::OpCompleteFailure()
if (theSimpleState == 1) { if (theSimpleState == 1) {
theCommitStatus = NdbConnection::Aborted; theCommitStatus = NdbConnection::Aborted;
}//if }//if
if (m_abortOption == IgnoreError){
/**
* There's always a TCKEYCONF when using IgnoreError
*/
#ifdef VM_TRACE
ndbout_c("Not completing transaction");
#endif
return -1;
}
return 0; // Last operation received return 0; // Last operation received
} else if (tNoComp > tNoSent) { } else if (tNoComp > tNoSent) {
setOperationErrorCodeAbort(4113); // Too many operations, setOperationErrorCodeAbort(4113); // Too many operations,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment