Commit 9497ee2f authored by joreland@mysql.com's avatar joreland@mysql.com

testBasic -n NoCommit626

Handle commit of zero operations
parent 57612c47
...@@ -5107,27 +5107,15 @@ void Dbtc::execLQHKEYREF(Signal* signal) ...@@ -5107,27 +5107,15 @@ void Dbtc::execLQHKEYREF(Signal* signal)
*---------------------------------------------------------------------*/ *---------------------------------------------------------------------*/
regApiPtr->lqhkeyreqrec--; regApiPtr->lqhkeyreqrec--;
if (regApiPtr->lqhkeyconfrec == regApiPtr->lqhkeyreqrec) { if (regApiPtr->lqhkeyconfrec == regApiPtr->lqhkeyreqrec) {
if ((regApiPtr->lqhkeyconfrec == 0) &&
(regApiPtr->apiConnectstate == CS_START_COMMITTING)) {
if(abort == TcKeyReq::IgnoreError){
jam();
regApiPtr->returnsignal = RS_NO_RETURN;
abort010Lab(signal);
return;
}
/*----------------------------------------------------------------
* Not a single operation was successful.
* This we report as an aborted transaction
* to avoid performing a commit of zero operations.
*----------------------------------------------------------------*/
TCKEY_abort(signal, 54);
return;
}//if
if (regApiPtr->apiConnectstate == CS_START_COMMITTING) { if (regApiPtr->apiConnectstate == CS_START_COMMITTING) {
if(regApiPtr->lqhkeyconfrec) {
jam(); jam();
diverify010Lab(signal); diverify010Lab(signal);
} else {
jam();
sendtckeyconf(signal, 1);
regApiPtr->apiConnectstate = CS_CONNECTED;
}
return; return;
} else if (regApiPtr->tckeyrec > 0 || regApiPtr->m_exec_flag) { } else if (regApiPtr->tckeyrec > 0 || regApiPtr->m_exec_flag) {
jam(); jam();
......
This diff is collapsed.
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