diff options
author | unknown <jonas@perch.ndb.mysql.com> | 2006-04-09 09:35:20 +0200 |
---|---|---|
committer | unknown <jonas@perch.ndb.mysql.com> | 2006-04-09 09:35:20 +0200 |
commit | dbb1511631286e84a188fbea657b39b7ea1034b1 (patch) | |
tree | 961e9940401fbcb208ea14c0681938349aadbc77 | |
parent | 2e385bcbab0d7408927c2127779a12c7de91ae70 (diff) | |
parent | b536875132f9b4accf20974ea5a5bb1777345e05 (diff) | |
download | mariadb-git-dbb1511631286e84a188fbea657b39b7ea1034b1.tar.gz |
Merge perch.ndb.mysql.com:/home/jonas/src/mysql-5.1-new-ndb
into perch.ndb.mysql.com:/home/jonas/src/mysql-5.1-new
libmysql/libmysql.c:
Auto merged
mysql-test/mysql-test-run.pl:
Auto merged
sql-common/client.c:
Auto merged
-rw-r--r-- | storage/ndb/src/ndbapi/NdbDictionaryImpl.cpp | 7 | ||||
-rw-r--r-- | storage/ndb/src/ndbapi/NdbLinHash.hpp | 13 |
2 files changed, 16 insertions, 4 deletions
diff --git a/storage/ndb/src/ndbapi/NdbDictionaryImpl.cpp b/storage/ndb/src/ndbapi/NdbDictionaryImpl.cpp index faf52b65cee..52cd85571ca 100644 --- a/storage/ndb/src/ndbapi/NdbDictionaryImpl.cpp +++ b/storage/ndb/src/ndbapi/NdbDictionaryImpl.cpp @@ -1789,9 +1789,14 @@ NdbDictInterface::getTable(const BaseString& name, bool fullyQualifiedNames) // Copy name to m_buffer to get a word sized buffer m_buffer.clear(); - m_buffer.grow(namelen_words*4); + m_buffer.grow(namelen_words*4+4); m_buffer.append(name.c_str(), namelen); +#ifndef IGNORE_VALGRIND_WARNINGS + Uint32 pad = 0; + m_buffer.append(&pad, 4); +#endif + LinearSectionPtr ptr[1]; ptr[0].p= (Uint32*)m_buffer.get_data(); ptr[0].sz= namelen_words; diff --git a/storage/ndb/src/ndbapi/NdbLinHash.hpp b/storage/ndb/src/ndbapi/NdbLinHash.hpp index 05670534c95..0655e81ce9d 100644 --- a/storage/ndb/src/ndbapi/NdbLinHash.hpp +++ b/storage/ndb/src/ndbapi/NdbLinHash.hpp @@ -427,19 +427,26 @@ NdbLinHash<C>::getNext(NdbElement_t<C> * curr){ return curr->next; int dir = 0, seg = 0; - - if(curr != 0){ + int counts; + if(curr != 0) + { getBucket(curr->hash, &dir, &seg); + counts = seg + 1; + } + else + { + counts = 0; } for(int countd = dir; countd < DIRECTORYSIZE;countd++ ){ if (directory[countd] != 0) { - for(int counts = seg + 1; counts < SEGMENTSIZE; counts++ ){ + for(; counts < SEGMENTSIZE; counts++ ){ if (directory[countd]->elements[counts] != 0) { return directory[countd]->elements[counts]; } } } + counts = 0; } return 0; |