From: Date: September 15 2006 11:18am Subject: bk commit into 5.0 tree (jonas:1.2249) BUG#21535 List-Archive: http://lists.mysql.com/commits/11998 X-Bug: 21535 Message-Id: <20060915091820.EBC8F4711FE@perch.ndb.mysql.com> Below is the list of changes that have just been committed into a local 5.0 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, 2006-09-15 11:18:17+02:00, jonas@stripped +1 -0 ndb - bug#21535 review, Fix also master being "old" version ndb/src/kernel/blocks/dblqh/DblqhMain.cpp@stripped, 2006-09-15 11:18:15+02:00, jonas@stripped +22 -17 Fix also master being "old" version # 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/50-work --- 1.95/ndb/src/kernel/blocks/dblqh/DblqhMain.cpp 2006-09-15 11:18:20 +02:00 +++ 1.96/ndb/src/kernel/blocks/dblqh/DblqhMain.cpp 2006-09-15 11:18:20 +02:00 @@ -9098,6 +9098,7 @@ const CopyFragReq * const copyFragReq = (CopyFragReq *)&signal->theData[0]; tabptr.i = copyFragReq->tableId; ptrCheckGuard(tabptr, ctabrecFileSize, tablerec); + Uint32 i; const Uint32 fragId = copyFragReq->fragId; const Uint32 copyPtr = copyFragReq->userPtr; const Uint32 userRef = copyFragReq->userRef; @@ -9111,11 +9112,18 @@ Uint32 key = fragptr.p->fragDistributionKey = copyFragReq->distributionKey; + Uint32 checkversion = NDB_VERSION >= MAKE_VERSION(5,1,0) ? + NDBD_UPDATE_FRAG_DIST_KEY_51 : NDBD_UPDATE_FRAG_DIST_KEY_50; + Uint32 nodeCount = copyFragReq->nodeCount; - Uint32 nodeList[MAX_REPLICAS]; - ndbrequire(nodeCount <= MAX_REPLICAS); - memcpy(nodeList, copyFragReq->nodeList, 4*nodeCount); - + NdbNodeBitmask nodemask; + if (getNodeInfo(refToNode(userRef)).m_version >= checkversion) + { + ndbrequire(nodeCount <= MAX_REPLICAS); + for (i = 0; inodeList[i]); + } + if (DictTabInfo::isOrderedIndex(tabptr.p->tableType)) { jam(); /** @@ -9189,25 +9197,22 @@ req->savePointId = tcConnectptr.p->savePointId; sendSignal(tcConnectptr.p->tcAccBlockref, GSN_ACC_SCANREQ, signal, AccScanReq::SignalLength, JBB); - - Uint32 i; - NdbNodeBitmask mask; - ndbrequire(mask.get(getOwnNodeId())); - ndbrequire(mask.get(nodeId)); // cpy dest - if (!mask.isclear()) + + if (! nodemask.isclear()) { - UpdateFragDistKeyOrd* ord =(UpdateFragDistKeyOrd*)signal->getDataPtrSend(); + ndbrequire(nodemask.get(getOwnNodeId())); + ndbrequire(nodemask.get(nodeId)); // cpy dest + nodemask.clear(getOwnNodeId()); + nodemask.clear(nodeId); + + UpdateFragDistKeyOrd* + ord = (UpdateFragDistKeyOrd*)signal->getDataPtrSend(); ord->tableId = tabptr.i; ord->fragId = fragId; ord->fragDistributionKey = key; i = 0; - while ((i = mask.find(i+1)) != NdbNodeBitmask::NotFound) + while ((i = nodemask.find(i+1)) != NdbNodeBitmask::NotFound) { -#ifdef NDB_VERSION >= MAKE_VERSION(5,1,0) - Uint32 checkversion = NDBD_UPDATE_FRAG_DIST_KEY_51; -#elif NDB_VERSION >= MAKE_VERSION(5,0,0) - Uint32 checkversion = NDBD_UPDATE_FRAG_DIST_KEY_50; -#endif if (getNodeInfo(i).m_version >= checkversion) sendSignal(calcLqhBlockRef(i), GSN_UPDATE_FRAG_DIST_KEY_ORD, signal, UpdateFragDistKeyOrd::SignalLength, JBB);