diff options
author | unknown <jani@hundin.mysql.fi> | 2005-12-14 12:32:58 +0200 |
---|---|---|
committer | unknown <jani@hundin.mysql.fi> | 2005-12-14 12:32:58 +0200 |
commit | 2d40e252310f491abc744eced6b20c4648f42fcf (patch) | |
tree | 16050e4a24373a5d3679f1a4cc7197f3bf72769d /storage | |
parent | f150f86dd39b63f6c2f51700b7c695713ff6862a (diff) | |
parent | c5ebeb7969a3f68f9b15b909438392121fde668d (diff) | |
download | mariadb-git-2d40e252310f491abc744eced6b20c4648f42fcf.tar.gz |
Merge jamppa@bk-internal.mysql.com:/home/bk/mysql-5.1-new
into hundin.mysql.fi:/home/jani/mysql-5.1-new
storage/ndb/src/kernel/blocks/dbtc/DbtcMain.cpp:
Auto merged
Diffstat (limited to 'storage')
-rw-r--r-- | storage/ndb/src/kernel/blocks/dbtc/Dbtc.hpp | 2 | ||||
-rw-r--r-- | storage/ndb/src/kernel/blocks/dbtc/DbtcMain.cpp | 17 | ||||
-rw-r--r-- | storage/ndb/src/ndbapi/ndberror.c | 2 |
3 files changed, 19 insertions, 2 deletions
diff --git a/storage/ndb/src/kernel/blocks/dbtc/Dbtc.hpp b/storage/ndb/src/kernel/blocks/dbtc/Dbtc.hpp index 1270e56de56..5e9f6f6e6ba 100644 --- a/storage/ndb/src/kernel/blocks/dbtc/Dbtc.hpp +++ b/storage/ndb/src/kernel/blocks/dbtc/Dbtc.hpp @@ -141,6 +141,8 @@ #define ZALREADYEXIST 630 #define ZINCONSISTENTHASHINDEX 892 #define ZNOTUNIQUE 893 + +#define ZINVALID_KEY 290 #endif class Dbtc: public SimulatedBlock { diff --git a/storage/ndb/src/kernel/blocks/dbtc/DbtcMain.cpp b/storage/ndb/src/kernel/blocks/dbtc/DbtcMain.cpp index 6d66f5c9aad..2645075abd9 100644 --- a/storage/ndb/src/kernel/blocks/dbtc/DbtcMain.cpp +++ b/storage/ndb/src/kernel/blocks/dbtc/DbtcMain.cpp @@ -2314,7 +2314,10 @@ Dbtc::handle_special_hash(Uint32 dstHash[4], Uint32* src, Uint32 srcLen, { keyPartLenPtr = keyPartLen; dstPos = xfrm_key(tabPtrI, src, dst, sizeof(Tmp) >> 2, keyPartLenPtr); - ndbrequire(dstPos); + if (unlikely(dstPos == 0)) + { + goto error; + } } else { @@ -2335,6 +2338,10 @@ Dbtc::handle_special_hash(Uint32 dstHash[4], Uint32* src, Uint32 srcLen, dstHash[1] = tmp[1]; } return true; // success + +error: + terrorCode = ZINVALID_KEY; + return false; } /* @@ -2944,7 +2951,15 @@ void Dbtc::tckeyreq050Lab(Signal* signal) 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; diff --git a/storage/ndb/src/ndbapi/ndberror.c b/storage/ndb/src/ndbapi/ndberror.c index fc166445555..73f08e8ac77 100644 --- a/storage/ndb/src/ndbapi/ndberror.c +++ b/storage/ndb/src/ndbapi/ndberror.c @@ -236,6 +236,7 @@ ErrorBundle ErrorCodes[] = { { 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" }, @@ -303,7 +304,6 @@ ErrorBundle ErrorCodes[] = { { 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 |