mirror of
https://github.com/MariaDB/server.git
synced 2025-01-31 19:11:46 +01:00
bug#at - testNdbApi WaitUntilReady, MaxNdb
fix delete of dictionary before connection has been established
This commit is contained in:
parent
e9edf3cfb9
commit
f63f994b73
1 changed files with 22 additions and 16 deletions
|
@ -596,26 +596,32 @@ static int f_dictionary_count = 0;
|
||||||
NdbDictionaryImpl::~NdbDictionaryImpl()
|
NdbDictionaryImpl::~NdbDictionaryImpl()
|
||||||
{
|
{
|
||||||
NdbElement_t<NdbTableImpl> * curr = m_localHash.m_tableHash.getNext(0);
|
NdbElement_t<NdbTableImpl> * curr = m_localHash.m_tableHash.getNext(0);
|
||||||
while(curr != 0){
|
if(m_globalHash){
|
||||||
m_globalHash->lock();
|
while(curr != 0){
|
||||||
m_globalHash->release(curr->theData);
|
m_globalHash->lock();
|
||||||
m_globalHash->unlock();
|
m_globalHash->release(curr->theData);
|
||||||
|
m_globalHash->unlock();
|
||||||
|
|
||||||
|
curr = m_localHash.m_tableHash.getNext(curr);
|
||||||
|
}
|
||||||
|
|
||||||
curr = m_localHash.m_tableHash.getNext(curr);
|
m_globalHash->lock();
|
||||||
|
if(--f_dictionary_count == 0){
|
||||||
|
delete NdbDictionary::Column::FRAGMENT;
|
||||||
|
delete NdbDictionary::Column::ROW_COUNT;
|
||||||
|
delete NdbDictionary::Column::COMMIT_COUNT;
|
||||||
|
NdbDictionary::Column::FRAGMENT= 0;
|
||||||
|
NdbDictionary::Column::ROW_COUNT= 0;
|
||||||
|
NdbDictionary::Column::COMMIT_COUNT= 0;
|
||||||
|
}
|
||||||
|
m_globalHash->unlock();
|
||||||
|
} else {
|
||||||
|
assert(curr == 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
m_globalHash->lock();
|
|
||||||
if(--f_dictionary_count == 0){
|
|
||||||
delete NdbDictionary::Column::FRAGMENT;
|
|
||||||
delete NdbDictionary::Column::ROW_COUNT;
|
|
||||||
delete NdbDictionary::Column::COMMIT_COUNT;
|
|
||||||
NdbDictionary::Column::FRAGMENT= 0;
|
|
||||||
NdbDictionary::Column::ROW_COUNT= 0;
|
|
||||||
NdbDictionary::Column::COMMIT_COUNT= 0;
|
|
||||||
}
|
|
||||||
m_globalHash->unlock();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#if 0
|
#if 0
|
||||||
bool
|
bool
|
||||||
NdbDictionaryImpl::setTransporter(class TransporterFacade * tf)
|
NdbDictionaryImpl::setTransporter(class TransporterFacade * tf)
|
||||||
|
|
Loading…
Add table
Reference in a new issue