summaryrefslogtreecommitdiff
path: root/ndb
diff options
context:
space:
mode:
authorunknown <tomas@poseidon.(none)>2004-09-24 08:47:46 +0000
committerunknown <tomas@poseidon.(none)>2004-09-24 08:47:46 +0000
commita366d6eefc1a52dc3c4097faff18787c91363d5e (patch)
treeb75cadc9eff39077d3111e5721d38905a830da3a /ndb
parent8090516c5250f1d1873adf5f312fc16e70e3f6be (diff)
downloadmariadb-git-a366d6eefc1a52dc3c4097faff18787c91363d5e.tar.gz
bug, releaseTableObject called twice
bug, whole bucket removed if delete first element in bucket ndb/src/kernel/blocks/dbdict/Dbdict.cpp: bug, releaseTableObject called twice ndb/src/ndbapi/NdbLinHash.hpp: bug, whole bucket removed if delete first element in bucket
Diffstat (limited to 'ndb')
-rw-r--r--ndb/src/kernel/blocks/dbdict/Dbdict.cpp2
-rw-r--r--ndb/src/ndbapi/NdbLinHash.hpp11
2 files changed, 4 insertions, 9 deletions
diff --git a/ndb/src/kernel/blocks/dbdict/Dbdict.cpp b/ndb/src/kernel/blocks/dbdict/Dbdict.cpp
index b214538bce0..1de5cd08a01 100644
--- a/ndb/src/kernel/blocks/dbdict/Dbdict.cpp
+++ b/ndb/src/kernel/blocks/dbdict/Dbdict.cpp
@@ -2868,7 +2868,6 @@ Dbdict::execALTER_TABLE_REQ(Signal* signal)
jam();
c_opCreateTable.release(alterTabPtr);
parseRecord.tablePtr.p->tabState = TableRecord::NOT_DEFINED;
- releaseTableObject(parseRecord.tablePtr.i, false);
alterTableRef(signal, req,
(AlterTableRef::ErrorCode) parseRecord.errorCode,
aParseRecord);
@@ -3054,7 +3053,6 @@ Dbdict::execALTER_TAB_REQ(Signal * signal)
jam();
c_opCreateTable.release(alterTabPtr);
parseRecord.tablePtr.p->tabState = TableRecord::NOT_DEFINED;
- releaseTableObject(parseRecord.tablePtr.i, false);
alterTabRef(signal, req,
(AlterTableRef::ErrorCode) parseRecord.errorCode,
aParseRecord);
diff --git a/ndb/src/ndbapi/NdbLinHash.hpp b/ndb/src/ndbapi/NdbLinHash.hpp
index f786600607f..f245a261a04 100644
--- a/ndb/src/ndbapi/NdbLinHash.hpp
+++ b/ndb/src/ndbapi/NdbLinHash.hpp
@@ -287,17 +287,14 @@ NdbLinHash<C>::deleteKey ( const char* str, Uint32 len){
NdbElement_t<C> **chainp = &directory[dir]->elements[seg];
for(NdbElement_t<C> * chain = *chainp; chain != 0; chain = chain->next){
if(chain->len == len && !memcmp(chain->str, str, len)){
+ C *data= chain->theData;
if (oldChain == 0) {
- C *data= chain->theData;
- delete chain;
- * chainp = 0;
- return data;
+ * chainp = chain->next;
} else {
- C *data= chain->theData;
oldChain->next = chain->next;
- delete chain;
- return data;
}
+ delete chain;
+ return data;
} else {
oldChain = chain;
}