From: Date: January 18 2006 11:08am Subject: bk commit into 5.1 tree (tomas:1.1967) BUG#15682 List-Archive: http://lists.mysql.com/internals/33358 X-Bug: 15682 Message-Id: <20060118100819.6CDF31F3212@poseidon.mysql.com> Below is the list of changes that have just been committed into a local 5.1 repository of tomas. When tomas 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 1.1967 06/01/18 11:08:07 tomas@stripped[tomas] +4 -0 BUG#15682 storage/ndb/src/ndbapi/ndberror.c 1.45 06/01/18 11:05:56 tomas@stripped[tomas] +1 -1 BUG#15682 storage/ndb/src/kernel/vm/SimulatedBlock.cpp 1.24 06/01/18 11:05:56 tomas@stripped[tomas] +8 -2 BUG#15682 storage/ndb/src/kernel/blocks/dbtc/DbtcMain.cpp 1.95 06/01/18 11:05:56 tomas@stripped[tomas] +16 -1 BUG#15682 storage/ndb/src/kernel/blocks/dbtc/Dbtc.hpp 1.33 06/01/18 11:05:56 tomas@stripped[tomas] +2 -0 BUG#15682 # 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: tomas # Host: poseidon.ndb.mysql.com # Root: /home/tomas/wl2325-alcatel --- 1.32/storage/ndb/src/kernel/blocks/dbtc/Dbtc.hpp 2005-10-07 01:06:19 +02:00 +++ 1.33/storage/ndb/src/kernel/blocks/dbtc/Dbtc.hpp 2006-01-18 11:05:56 +01:00 @@ -141,6 +141,8 @@ #define ZALREADYEXIST 630 #define ZINCONSISTENTHASHINDEX 892 #define ZNOTUNIQUE 893 + +#define ZINVALID_KEY 290 #endif class Dbtc: public SimulatedBlock { --- 1.94/storage/ndb/src/kernel/blocks/dbtc/DbtcMain.cpp 2005-12-20 10:05:43 +01:00 +++ 1.95/storage/ndb/src/kernel/blocks/dbtc/DbtcMain.cpp 2006-01-18 11:05:56 +01:00 @@ -2313,7 +2313,10 @@ { keyPartLenPtr = keyPartLen; dstPos = xfrm_key(tabPtrI, src, dst, sizeof(Tmp) >> 2, keyPartLenPtr); - ndbrequire(dstPos); + if (unlikely(dstPos == 0)) + { + goto error; + } } else { @@ -2334,6 +2337,10 @@ dstHash[1] = tmp[1]; } return true; // success + +error: + terrorCode = ZINVALID_KEY; + return false; } /* @@ -2941,7 +2948,15 @@ UintR tnoOfStandby; UintR tnodeinfo; + terrorCode = 0; + hash(signal); /* NOW IT IS TIME TO CALCULATE THE HASH VALUE*/ + + if (unlikely(terrorCode)) + { + releaseAtErrorLab(signal); + return; + } CacheRecord * const regCachePtr = cachePtr.p; TcConnectRecord * const regTcPtr = tcConnectptr.p; --- 1.23/storage/ndb/src/kernel/vm/SimulatedBlock.cpp 2005-10-07 10:58:06 +02:00 +++ 1.24/storage/ndb/src/kernel/vm/SimulatedBlock.cpp 2006-01-18 11:05:56 +01:00 @@ -1902,7 +1902,10 @@ AttributeDescriptor::getType(keyAttr.attributeDescriptor); Uint32 lb, len; bool ok = NdbSqlUtil::get_var_length(typeId, srcPtr, srcBytes, lb, len); - ndbrequire(ok); + if (unlikely(!ok)) + { + return 0; + } Uint32 xmul = cs->strxfrm_multiply; if (xmul == 0) xmul = 1; @@ -1914,7 +1917,10 @@ Uint32 dstLen = xmul * (srcBytes - lb); ndbrequire(dstLen <= ((dstSize - dstPos) << 2)); int n = NdbSqlUtil::strnxfrm_bug7284(cs, dstPtr, dstLen, srcPtr + lb, len); - ndbrequire(n != -1); + if (unlikely(n == -1)) + { + return 0; + } while ((n & 3) != 0) { dstPtr[n++] = 0; --- 1.44/storage/ndb/src/ndbapi/ndberror.c 2005-10-14 11:55:29 +02:00 +++ 1.45/storage/ndb/src/ndbapi/ndberror.c 2006-01-18 11:05:56 +01:00 @@ -233,6 +233,7 @@ { 277, DMEC, IE, "277" }, { 278, DMEC, IE, "278" }, { 287, DMEC, IE, "Index corrupted" }, + { 290, DMEC, IE, "Corrupt key in TC, unable to xfrm" }, { 631, DMEC, IE, "631" }, { 632, DMEC, IE, "632" }, { 702, DMEC, IE, "Request to non-master" }, @@ -300,7 +301,6 @@ { 4608, DMEC, AE, "You can not takeOverScan unless you have used openScanExclusive"}, { 4609, DMEC, AE, "You must call nextScanResult before trying to takeOverScan"}, { 4232, DMEC, AE, "Parallelism can only be between 1 and 240" }, - { 290, DMEC, AE, "Scan not started or has been closed by kernel due to timeout" }, /** * Event schema errors