Commit bcc1773c authored by unknown's avatar unknown

Merge perch.ndb.mysql.com:/home/jonas/src/50-work

into  perch.ndb.mysql.com:/home/jonas/src/50-jonas


ndb/src/kernel/blocks/dbdih/DbdihMain.cpp:
  Auto merged
parents 978c18b6 5bdf4ce4
...@@ -88,12 +88,13 @@ Backup::execREAD_CONFIG_REQ(Signal* signal) ...@@ -88,12 +88,13 @@ Backup::execREAD_CONFIG_REQ(Signal* signal)
c_nodePool.setSize(MAX_NDB_NODES); c_nodePool.setSize(MAX_NDB_NODES);
Uint32 noBackups = 0, noTables = 0, noAttribs = 0; Uint32 noBackups = 0, noTables = 0, noAttribs = 0, noFrags = 0;
ndbrequire(!ndb_mgm_get_int_parameter(p, CFG_DB_DISCLESS, &m_diskless)); ndbrequire(!ndb_mgm_get_int_parameter(p, CFG_DB_DISCLESS, &m_diskless));
ndb_mgm_get_int_parameter(p, CFG_DB_PARALLEL_BACKUPS, &noBackups); ndb_mgm_get_int_parameter(p, CFG_DB_PARALLEL_BACKUPS, &noBackups);
// ndbrequire(!ndb_mgm_get_int_parameter(p, CFG_DB_NO_TABLES, &noTables)); // ndbrequire(!ndb_mgm_get_int_parameter(p, CFG_DB_NO_TABLES, &noTables));
ndbrequire(!ndb_mgm_get_int_parameter(p, CFG_DICT_TABLE, &noTables)); ndbrequire(!ndb_mgm_get_int_parameter(p, CFG_DICT_TABLE, &noTables));
ndbrequire(!ndb_mgm_get_int_parameter(p, CFG_DB_NO_ATTRIBUTES, &noAttribs)); ndbrequire(!ndb_mgm_get_int_parameter(p, CFG_DB_NO_ATTRIBUTES, &noAttribs));
ndbrequire(!ndb_mgm_get_int_parameter(p, CFG_DIH_FRAG_CONNECT, &noFrags));
noAttribs++; //RT 527 bug fix noAttribs++; //RT 527 bug fix
...@@ -102,9 +103,7 @@ Backup::execREAD_CONFIG_REQ(Signal* signal) ...@@ -102,9 +103,7 @@ Backup::execREAD_CONFIG_REQ(Signal* signal)
c_tablePool.setSize(noBackups * noTables); c_tablePool.setSize(noBackups * noTables);
c_attributePool.setSize(noBackups * noAttribs); c_attributePool.setSize(noBackups * noAttribs);
c_triggerPool.setSize(noBackups * 3 * noTables); c_triggerPool.setSize(noBackups * 3 * noTables);
c_fragmentPool.setSize(noBackups * noFrags);
// 2 = no of replicas
c_fragmentPool.setSize(noBackups * 2 * NO_OF_FRAG_PER_NODE * noTables);
Uint32 szMem = 0; Uint32 szMem = 0;
ndb_mgm_get_int_parameter(p, CFG_DB_BACKUP_MEM, &szMem); ndb_mgm_get_int_parameter(p, CFG_DB_BACKUP_MEM, &szMem);
......
...@@ -1109,9 +1109,14 @@ NdbDictInterface::getTable(const BaseString& name, bool fullyQualifiedNames) ...@@ -1109,9 +1109,14 @@ NdbDictInterface::getTable(const BaseString& name, bool fullyQualifiedNames)
// Copy name to m_buffer to get a word sized buffer // Copy name to m_buffer to get a word sized buffer
m_buffer.clear(); m_buffer.clear();
m_buffer.grow(namelen_words*4); m_buffer.grow(namelen_words*4+4);
m_buffer.append(name.c_str(), namelen); m_buffer.append(name.c_str(), namelen);
#ifndef IGNORE_VALGRIND_WARNINGS
Uint32 pad = 0;
m_buffer.append(&pad, 4);
#endif
LinearSectionPtr ptr[1]; LinearSectionPtr ptr[1];
ptr[0].p= (Uint32*)m_buffer.get_data(); ptr[0].p= (Uint32*)m_buffer.get_data();
ptr[0].sz= namelen_words; ptr[0].sz= namelen_words;
......
...@@ -427,19 +427,26 @@ NdbLinHash<C>::getNext(NdbElement_t<C> * curr){ ...@@ -427,19 +427,26 @@ NdbLinHash<C>::getNext(NdbElement_t<C> * curr){
return curr->next; return curr->next;
int dir = 0, seg = 0; int dir = 0, seg = 0;
int counts;
if(curr != 0){ if(curr != 0)
{
getBucket(curr->hash, &dir, &seg); getBucket(curr->hash, &dir, &seg);
counts = seg + 1;
}
else
{
counts = 0;
} }
for(int countd = dir; countd < DIRECTORYSIZE;countd++ ){ for(int countd = dir; countd < DIRECTORYSIZE;countd++ ){
if (directory[countd] != 0) { if (directory[countd] != 0) {
for(int counts = seg + 1; counts < SEGMENTSIZE; counts++ ){ for(; counts < SEGMENTSIZE; counts++ ){
if (directory[countd]->elements[counts] != 0) { if (directory[countd]->elements[counts] != 0) {
return directory[countd]->elements[counts]; return directory[countd]->elements[counts];
} }
} }
} }
counts = 0;
} }
return 0; return 0;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment