Commit 3e217c81 authored by unknown's avatar unknown

ndb - fix compile error on sles9-x86


storage/ndb/src/kernel/blocks/dbdict/Dbdict.cpp:
  Fix ref counts wrt alter table
storage/ndb/src/kernel/blocks/dbtup/DbtupDiskAlloc.cpp:
  Fix trick goto, getting compile error on some platforms
parent 9c46ce87
...@@ -5984,6 +5984,17 @@ void Dbdict::handleTabInfoInit(SimpleProperties::Reader & it, ...@@ -5984,6 +5984,17 @@ void Dbdict::handleTabInfoInit(SimpleProperties::Reader & it,
* Release table * Release table
*/ */
releaseTableObject(tablePtr.i, checkExist); releaseTableObject(tablePtr.i, checkExist);
return;
}
if (checkExist && tablePtr.p->m_tablespace_id != RNIL)
{
/**
* Increase ref count
*/
FilegroupPtr ptr;
ndbrequire(c_filegroup_hash.find(ptr, tablePtr.p->m_tablespace_id));
increase_ref_count(ptr.p->m_obj_ptr_i);
} }
}//handleTabInfoInit() }//handleTabInfoInit()
...@@ -6238,15 +6249,6 @@ void Dbdict::handleTabInfo(SimpleProperties::Reader & it, ...@@ -6238,15 +6249,6 @@ void Dbdict::handleTabInfo(SimpleProperties::Reader & it,
{ {
tabRequire(false, CreateTableRef::InvalidTablespaceVersion); tabRequire(false, CreateTableRef::InvalidTablespaceVersion);
} }
{
/**
* Increase ref count
*/
FilegroupPtr ptr;
ndbrequire(c_filegroup_hash.find(ptr, tablePtr.p->m_tablespace_id));
increase_ref_count(ptr.p->m_obj_ptr_i);
}
} }
}//handleTabInfo() }//handleTabInfo()
......
...@@ -352,16 +352,21 @@ Dbtup::disk_page_prealloc(Signal* signal, ...@@ -352,16 +352,21 @@ Dbtup::disk_page_prealloc(Signal* signal,
while((pageBits= tsman.alloc_page_from_extent(&ext.p->m_key, bits)) < 0) while((pageBits= tsman.alloc_page_from_extent(&ext.p->m_key, bits)) < 0)
if(!list.next(ext) || ++cnt == 10) if(!list.next(ext) || ++cnt == 10)
break; break;
ndbout_c("cnt: %d", cnt);
if (cnt == 10 || ext.isNull()) if (cnt == 10 || ext.isNull())
goto alloc; {
list.remove(ext); pos = RNIL;
alloc.m_curr_extent_info_ptr_i= ext.i; }
ext.p->m_free_matrix_pos= RNIL; else
{
list.remove(ext);
alloc.m_curr_extent_info_ptr_i= ext.i;
ext.p->m_free_matrix_pos= RNIL;
}
} }
else
if (pos == RNIL)
{ {
alloc:
jam(); jam();
/** /**
* We need to alloc an extent * We need to alloc an extent
......
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