Commit fe7e8788 authored by joreland@mysql.com's avatar joreland@mysql.com

Let blobs use committedRead, this is always correct as

as read lock is held on primary table
parent ea21d7c9
...@@ -867,7 +867,7 @@ NdbBlob::readParts(char* buf, Uint32 part, Uint32 count) ...@@ -867,7 +867,7 @@ NdbBlob::readParts(char* buf, Uint32 part, Uint32 count)
while (n < count) { while (n < count) {
NdbOperation* tOp = theNdbCon->getNdbOperation(theBlobTable); NdbOperation* tOp = theNdbCon->getNdbOperation(theBlobTable);
if (tOp == NULL || if (tOp == NULL ||
tOp->readTuple() == -1 || tOp->committedRead() == -1 ||
setPartKeyValue(tOp, part + n) == -1 || setPartKeyValue(tOp, part + n) == -1 ||
tOp->getValue((Uint32)3, buf) == NULL) { tOp->getValue((Uint32)3, buf) == NULL) {
setErrorCode(tOp); setErrorCode(tOp);
...@@ -1144,7 +1144,7 @@ NdbBlob::preExecute(ExecType anExecType, bool& batch) ...@@ -1144,7 +1144,7 @@ NdbBlob::preExecute(ExecType anExecType, bool& batch)
// add operation before this one to read head+inline // add operation before this one to read head+inline
NdbOperation* tOp = theNdbCon->getNdbOperation(theTable, theNdbOp); NdbOperation* tOp = theNdbCon->getNdbOperation(theTable, theNdbOp);
if (tOp == NULL || if (tOp == NULL ||
tOp->readTuple() == -1 || tOp->committedRead() == -1 ||
setTableKeyValue(tOp) == -1 || setTableKeyValue(tOp) == -1 ||
getHeadInlineValue(tOp) == -1) { getHeadInlineValue(tOp) == -1) {
setErrorCode(tOp); setErrorCode(tOp);
...@@ -1163,7 +1163,7 @@ NdbBlob::preExecute(ExecType anExecType, bool& batch) ...@@ -1163,7 +1163,7 @@ NdbBlob::preExecute(ExecType anExecType, bool& batch)
Uint32 pkAttrId = theAccessTable->getNoOfColumns() - 1; Uint32 pkAttrId = theAccessTable->getNoOfColumns() - 1;
NdbOperation* tOp = theNdbCon->getNdbOperation(theAccessTable, theNdbOp); NdbOperation* tOp = theNdbCon->getNdbOperation(theAccessTable, theNdbOp);
if (tOp == NULL || if (tOp == NULL ||
tOp->readTuple() == -1 || tOp->committedRead() == -1 ||
setAccessKeyValue(tOp) == -1 || setAccessKeyValue(tOp) == -1 ||
tOp->getValue(pkAttrId, theKeyBuf.data) == NULL) { tOp->getValue(pkAttrId, theKeyBuf.data) == NULL) {
setErrorCode(tOp); setErrorCode(tOp);
...@@ -1172,7 +1172,7 @@ NdbBlob::preExecute(ExecType anExecType, bool& batch) ...@@ -1172,7 +1172,7 @@ NdbBlob::preExecute(ExecType anExecType, bool& batch)
} else { } else {
NdbOperation* tOp = theNdbCon->getNdbIndexOperation(theAccessTable->m_index, theTable, theNdbOp); NdbOperation* tOp = theNdbCon->getNdbIndexOperation(theAccessTable->m_index, theTable, theNdbOp);
if (tOp == NULL || if (tOp == NULL ||
tOp->readTuple() == -1 || tOp->committedRead() == -1 ||
setAccessKeyValue(tOp) == -1 || setAccessKeyValue(tOp) == -1 ||
getTableKeyValue(tOp) == -1) { getTableKeyValue(tOp) == -1) {
setErrorCode(tOp); setErrorCode(tOp);
...@@ -1184,7 +1184,7 @@ NdbBlob::preExecute(ExecType anExecType, bool& batch) ...@@ -1184,7 +1184,7 @@ NdbBlob::preExecute(ExecType anExecType, bool& batch)
// add op before this one to read head+inline via index // add op before this one to read head+inline via index
NdbIndexOperation* tOp = theNdbCon->getNdbIndexOperation(theAccessTable->m_index, theTable, theNdbOp); NdbIndexOperation* tOp = theNdbCon->getNdbIndexOperation(theAccessTable->m_index, theTable, theNdbOp);
if (tOp == NULL || if (tOp == NULL ||
tOp->readTuple() == -1 || tOp->committedRead() == -1 ||
setAccessKeyValue(tOp) == -1 || setAccessKeyValue(tOp) == -1 ||
getHeadInlineValue(tOp) == -1) { getHeadInlineValue(tOp) == -1) {
setErrorCode(tOp); setErrorCode(tOp);
......
...@@ -528,7 +528,6 @@ NdbConnection::executeAsynchPrepare( ExecType aTypeOfExec, ...@@ -528,7 +528,6 @@ NdbConnection::executeAsynchPrepare( ExecType aTypeOfExec,
tLastOp->theCommitIndicator = 1; tLastOp->theCommitIndicator = 1;
}//if }//if
} else { } else {
if (aTypeOfExec == Commit) {
if (aTypeOfExec == Commit && !theSimpleState) { if (aTypeOfExec == Commit && !theSimpleState) {
/********************************************************************** /**********************************************************************
* A Transaction have been started and no more operations exist. * A Transaction have been started and no more operations exist.
......
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