diff options
author | unknown <joreland@mysql.com> | 2005-02-24 19:01:36 +0100 |
---|---|---|
committer | unknown <joreland@mysql.com> | 2005-02-24 19:01:36 +0100 |
commit | 185a811e8e149bc6bc27a1c3a85f1aed20f49806 (patch) | |
tree | 95a992b9e60942bbacc3b5a1a250b3ba7c6ca5e4 /ndb/src/ndbapi/NdbDictionaryImpl.cpp | |
parent | ee27d6a69b004a8ff20feb36f24336e92812ea0a (diff) | |
parent | 6b38100d6146cae344aaf90d77c0f4475ea30bb8 (diff) | |
download | mariadb-git-185a811e8e149bc6bc27a1c3a85f1aed20f49806.tar.gz |
Merge mysql.com:/home/jonas/src/fix
into mysql.com:/home/jonas/src/mysql-5.0
ndb/src/kernel/blocks/dbdict/Dbdict.cpp:
Auto merged
ndb/src/ndbapi/NdbDictionaryImpl.cpp:
Auto merged
ndb/src/ndbapi/ndb_cluster_connection.cpp:
Auto merged
sql/ha_ndbcluster.cc:
Auto merged
Diffstat (limited to 'ndb/src/ndbapi/NdbDictionaryImpl.cpp')
-rw-r--r-- | ndb/src/ndbapi/NdbDictionaryImpl.cpp | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/ndb/src/ndbapi/NdbDictionaryImpl.cpp b/ndb/src/ndbapi/NdbDictionaryImpl.cpp index 8c3f238404f..88a04c9e7d8 100644 --- a/ndb/src/ndbapi/NdbDictionaryImpl.cpp +++ b/ndb/src/ndbapi/NdbDictionaryImpl.cpp @@ -1008,6 +1008,12 @@ NdbDictInterface::dictSignal(NdbApiSignal* signal, if(m_waiter.m_state == WAIT_NODE_FAILURE) continue; + if(m_waiter.m_state == WST_WAIT_TIMEOUT) + { + m_error.code = 4008; + DBUG_RETURN(-1); + } + if ( (temporaryMask & m_error.code) != 0 ) { continue; } @@ -2185,8 +2191,8 @@ int NdbDictInterface::createIndex(NdbApiSignal* signal, LinearSectionPtr ptr[3]) { - const int noErrCodes = 1; - int errCodes[noErrCodes] = {CreateIndxRef::Busy}; + const int noErrCodes = 2; + int errCodes[noErrCodes] = {CreateIndxRef::Busy, CreateIndxRef::NotMaster}; return dictSignal(signal,ptr,2, 1 /*use masternode id*/, 100, @@ -2210,6 +2216,8 @@ NdbDictInterface::execCREATE_INDX_REF(NdbApiSignal * signal, { const CreateIndxRef* const ref = CAST_CONSTPTR(CreateIndxRef, signal->getDataPtr()); m_error.code = ref->getErrorCode(); + if(m_error.code == ref->NotMaster) + m_masterNodeId= ref->m_errorNode; m_waiter.signal(NO_WAIT); } @@ -2306,8 +2314,8 @@ NdbDictInterface::dropIndex(const NdbIndexImpl & impl, int NdbDictInterface::dropIndex(NdbApiSignal* signal, LinearSectionPtr ptr[3]) { - const int noErrCodes = 1; - int errCodes[noErrCodes] = {DropIndxRef::Busy}; + const int noErrCodes = 2; + int errCodes[noErrCodes] = {DropIndxRef::Busy, DropIndxRef::NotMaster}; int r = dictSignal(signal,NULL,0, 1/*Use masternode id*/, 100, @@ -2334,6 +2342,8 @@ NdbDictInterface::execDROP_INDX_REF(NdbApiSignal * signal, { const DropIndxRef* const ref = CAST_CONSTPTR(DropIndxRef, signal->getDataPtr()); m_error.code = ref->getErrorCode(); + if(m_error.code == ref->NotMaster) + m_masterNodeId= ref->m_errorNode; m_waiter.signal(NO_WAIT); } |