From: Date: May 7 2007 1:48pm Subject: bk commit into 5.1 tree (jonas:1.2506) BUG#28276 List-Archive: http://lists.mysql.com/commits/26209 X-Bug: 28276 Message-Id: <20070507114833.5EA5C1EE25@perch.ndb.mysql.com> Below is the list of changes that have just been committed into a local 5.1 repository of jonas. When jonas does a push these changes will be propagated to the main repository and, within 24 hours after the push, to the public repository. For information on how to access the public repository see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html ChangeSet@stripped, 2007-05-07 13:48:27+02:00, jonas@stripped +2 -0 ndb - bug#28276 Fix DeleteRead in multi-operation Dont use setup_read, as it will (correctly) find that tuple is deleted storage/ndb/src/kernel/blocks/dbtup/DbtupExecQuery.cpp@stripped, 2007-05-07 13:48:24+02:00, jonas@stripped +11 -10 Fix multi-op DeleteRead storage/ndb/test/ndbapi/testBasic.cpp@stripped, 2007-05-07 13:48:24+02:00, jonas@stripped +25 -11 Fix multi-op DeleteRead # This is a BitKeeper patch. What follows are the unified diffs for the # set of deltas contained in the patch. The rest of the patch, the part # that BitKeeper cares about, is below these diffs. # User: jonas # Host: perch.ndb.mysql.com # Root: /home/jonas/src/mysql-5.1-new-ndb --- 1.64/storage/ndb/src/kernel/blocks/dbtup/DbtupExecQuery.cpp 2007-05-07 13:48:33 +02:00 +++ 1.65/storage/ndb/src/kernel/blocks/dbtup/DbtupExecQuery.cpp 2007-05-07 13:48:33 +02:00 @@ -1491,6 +1491,7 @@ goto error; } memcpy(dst, org, regTabPtr->total_rec_size << 2); + req_struct->m_tuple_ptr = (Tuple_header*)dst; } else { @@ -1528,18 +1529,18 @@ return 0; } - if (setup_read(req_struct, regOperPtr, regFragPtr, regTabPtr, disk)) + if (regTabPtr->need_expand(disk)) + prepare_read(req_struct, regTabPtr, disk); + + Uint32 RlogSize; + int ret= handleReadReq(signal, regOperPtr, regTabPtr, req_struct); + if (ret == 0 && (RlogSize= req_struct->log_size)) { - Uint32 RlogSize; - int ret= handleReadReq(signal, regOperPtr, regTabPtr, req_struct); - if (ret == 0 && (RlogSize= req_struct->log_size)) - { - jam(); - sendLogAttrinfo(signal, RlogSize, regOperPtr); - } - return ret; + jam(); + sendLogAttrinfo(signal, RlogSize, regOperPtr); } - + return ret; + error: tupkeyErrorLab(signal); return -1; --- 1.22/storage/ndb/test/ndbapi/testBasic.cpp 2007-05-07 13:48:33 +02:00 +++ 1.23/storage/ndb/test/ndbapi/testBasic.cpp 2007-05-07 13:48:33 +02:00 @@ -1290,17 +1290,7 @@ NdbTransaction* pTrans = pNdb->startTransaction(); NdbOperation* pOp = pTrans->getNdbOperation(tab->getName()); pOp->deleteTuple(); - for(a = 0; agetNoOfColumns(); a++) - { - if (tab->getColumn(a)->getPrimaryKey() == true) - { - if(tmp.equalForAttr(pOp, a, 0) != 0) - { - ERR(pTrans->getNdbError()); - return NDBT_FAILED; - } - } - } + tmp.equalForRow(pOp, loops); // Define attributes to read for(a = 0; agetNoOfColumns(); a++) @@ -1313,6 +1303,30 @@ pTrans->execute(Commit); pTrans->close(); + + pTrans = pNdb->startTransaction(); + pOp = pTrans->getNdbOperation(tab->getName()); + pOp->insertTuple(); + tmp.setValues(pOp, loops, 0); + + pOp = pTrans->getNdbOperation(tab->getName()); + pOp->deleteTuple(); + tmp.equalForRow(pOp, loops); + for(a = 0; agetNoOfColumns(); a++) + { + if((row.attributeStore(a) = pOp->getValue(tab->getColumn(a)->getName())) == 0) + { + ERR(pTrans->getNdbError()); + return NDBT_FAILED; + } + } + if (pTrans->execute(Commit) != 0) + { + ERR(pTrans->getNdbError()); + return NDBT_FAILED; + } + + pTrans->close(); } return NDBT_OK;