mirror of
https://github.com/MariaDB/server.git
synced 2025-01-19 13:32:33 +01:00
bug, releaseTableObject called twice
bug, whole bucket removed if delete first element in bucket
This commit is contained in:
parent
4b2aa105b1
commit
7602703478
2 changed files with 4 additions and 9 deletions
|
@ -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);
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue