List:Internals« Previous MessageNext Message »
From:jonas Date:September 5 2005 11:54am
Subject:bk commit into 5.1 tree (jonas:1.1983)
View as plain text  
Below is the list of changes that have just been committed into a local
5.1 repository of jonas. When jonas does a push these changes will
be propagated to the main repository and, within 24 hours after the
push, to the public repository.
For information on how to access the public repository
see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html

ChangeSet
  1.1983 05/09/05 13:54:37 jonas@eel.(none) +10 -0
  ndb diskdata
    add Fix_page->alloc_record(idx) - make free list double linked
      to fix undo running problems and prepare for ROWID
  
    add DISK_REF pseudo column to API dor easier debugging

  storage/ndb/src/ndbapi/NdbDictionaryImpl.cpp
    1.97 05/09/05 13:54:32 jonas@eel.(none) +9 -0
    Add disk pseudo column in API

  storage/ndb/src/ndbapi/NdbDictionary.cpp
    1.48 05/09/05 13:54:32 jonas@eel.(none) +1 -0
    Add disk pseudo column in API

  storage/ndb/src/kernel/blocks/pgman.cpp
    1.36 05/09/05 13:54:32 jonas@eel.(none) +14 -0
    Add dump to flush specified page

  storage/ndb/src/kernel/blocks/lgman.cpp
    1.57 05/09/05 13:54:32 jonas@eel.(none) +7 -5
    Fix move_next also when reading log

  storage/ndb/src/kernel/blocks/dbtup/tuppage.hpp
    1.16 05/09/05 13:54:32 jonas@eel.(none) +1 -0
    Change Fix_page to use double linked free list

  storage/ndb/src/kernel/blocks/dbtup/tuppage.cpp
    1.11 05/09/05 13:54:32 jonas@eel.(none) +77 -39
    Change Fix_page to use double linked free list

  storage/ndb/src/kernel/blocks/dbtup/DbtupFixAlloc.cpp
    1.18 05/09/05 13:54:32 jonas@eel.(none) +12 -11
    Change Fix_page to use double linked free list

  storage/ndb/src/kernel/blocks/dbtup/DbtupDiskAlloc.cpp
    1.30 05/09/05 13:54:32 jonas@eel.(none) +78 -67
    Use Fix_page->alloc_record(idx) when running undo
    Fix some case where fragment was undefined

  storage/ndb/src/kernel/blocks/dbtup/DbtupAbort.cpp
    1.38 05/09/05 13:54:32 jonas@eel.(none) +3 -2
    Dont abort 0 log space

  storage/ndb/include/ndbapi/NdbDictionary.hpp
    1.49 05/09/05 13:54:32 jonas@eel.(none) +1 -0
    Add disk pseudo column in API

# This is a BitKeeper patch.  What follows are the unified diffs for the
# set of deltas contained in the patch.  The rest of the patch, the part
# that BitKeeper cares about, is below these diffs.
# User:	jonas
# Host:	eel.(none)
# Root:	/home/jonas/src/mysql-5.1-ndb-dd

--- 1.29/storage/ndb/src/kernel/blocks/dbtup/DbtupDiskAlloc.cpp	2005-08-31 10:32:18 +02:00
+++ 1.30/storage/ndb/src/kernel/blocks/dbtup/DbtupDiskAlloc.cpp	2005-09-05 13:54:32 +02:00
@@ -1050,32 +1050,35 @@
   if (tabPtr.p->tableStatus == DEFINED)
   {
     getFragmentrec(fragPtr, fragId, tabPtr.p);
-    Disk_alloc_info& alloc= fragPtr.p->m_disk_alloc_info;
-    
-    Ptr<Extent_info> ext;
-    ndbrequire(c_extent_pool.seize(ext));
-    
-    ext.p->m_key = *key;
-    ndbout << "allocated " << pages << " pages: " << ext.p->m_key << endl;
-    bzero(ext.p->m_free_page_count, sizeof(ext.p->m_free_page_count));
-    ext.p->m_free_space= alloc.m_page_free_bits_map[0] * pages; 
-    ext.p->m_free_page_count[0]= pages; // All pages are "free"-est
-    
-    if (alloc.m_curr_extent_info_ptr_i != RNIL)
+    if (!fragPtr.isNull())
     {
-      Ptr<Extent_info> old;
-      c_extent_pool.getPtr(old, alloc.m_curr_extent_info_ptr_i);
-      ndbassert(old.p->m_free_matrix_pos == RNIL);
-      Uint32 pos= alloc.calc_extent_pos(old.p);
-      Extent_list new_list(c_extent_pool, alloc.m_free_extents[pos]);
-      new_list.add(old);
-      old.p->m_free_matrix_pos= pos;
+      Disk_alloc_info& alloc= fragPtr.p->m_disk_alloc_info;
+      
+      Ptr<Extent_info> ext;
+      ndbrequire(c_extent_pool.seize(ext));
+      
+      ext.p->m_key = *key;
+      ndbout << "allocated " << pages << " pages: " << ext.p->m_key << endl;
+      bzero(ext.p->m_free_page_count, sizeof(ext.p->m_free_page_count));
+      ext.p->m_free_space= alloc.m_page_free_bits_map[0] * pages; 
+      ext.p->m_free_page_count[0]= pages; // All pages are "free"-est
+      
+      if (alloc.m_curr_extent_info_ptr_i != RNIL)
+      {
+	Ptr<Extent_info> old;
+	c_extent_pool.getPtr(old, alloc.m_curr_extent_info_ptr_i);
+	ndbassert(old.p->m_free_matrix_pos == RNIL);
+	Uint32 pos= alloc.calc_extent_pos(old.p);
+	Extent_list new_list(c_extent_pool, alloc.m_free_extents[pos]);
+	new_list.add(old);
+	old.p->m_free_matrix_pos= pos;
+      }
+      
+      alloc.m_curr_extent_info_ptr_i = ext.i;
+      ext.p->m_free_matrix_pos = RNIL;
+      c_extent_hash.add(ext);
+      return 0;
     }
-    
-    alloc.m_curr_extent_info_ptr_i = ext.i;
-    ext.p->m_free_matrix_pos = RNIL;
-    c_extent_hash.add(ext);
-    return 0;
   }
 
   return -1;
@@ -1230,8 +1233,10 @@
   {
     FragrecordPtr fragPtr;
     getFragmentrec(fragPtr, fragId, tabPtr.p);
-    
-    fragPtr.p->m_undo_complete = true;
+    if (!fragPtr.isNull())
+    {
+      fragPtr.p->m_undo_complete = true;
+    }
   }
 }
 
@@ -1318,59 +1323,61 @@
       if (f_undo.m_table_ptr.p->tableStatus == DEFINED)
       {
 	getFragmentrec(f_undo.m_fragment_ptr, fragId, f_undo.m_table_ptr.p);
-	
-        if (!f_undo.m_fragment_ptr.p->m_undo_complete)
+	if (!f_undo.m_fragment_ptr.isNull())
 	{
-	  f_undo.m_page_ptr.i = page_id;
-	  f_undo.m_page_ptr.p = pageP;
-	  
-	  update = true;
-	  ndbout_c("applying %lld", f_undo.m_lsn);
-	  /**
-	   * Apply undo record
-	   */
-	  switch(f_undo.m_type){
-	  case File_formats::Undofile::UNDO_TUP_ALLOC:
-	    disk_restart_undo_alloc(&f_undo);
-	    break;
-	  case File_formats::Undofile::UNDO_TUP_UPDATE:
-	    disk_restart_undo_update(&f_undo);
-	    break;
-	  case File_formats::Undofile::UNDO_TUP_FREE:
-	    disk_restart_undo_free(&f_undo);
-	    break;
-	  default:
-	    ndbrequire(false);
+	  if (!f_undo.m_fragment_ptr.p->m_undo_complete)
+	  {
+	    f_undo.m_page_ptr.i = page_id;
+	    f_undo.m_page_ptr.p = pageP;
+	    
+	    update = true;
+	    ndbout_c("applying %lld", f_undo.m_lsn);
+	    /**
+	     * Apply undo record
+	     */
+	    switch(f_undo.m_type){
+	    case File_formats::Undofile::UNDO_TUP_ALLOC:
+	      disk_restart_undo_alloc(&f_undo);
+	      break;
+	    case File_formats::Undofile::UNDO_TUP_UPDATE:
+	      disk_restart_undo_update(&f_undo);
+	      break;
+	    case File_formats::Undofile::UNDO_TUP_FREE:
+	      disk_restart_undo_free(&f_undo);
+	      break;
+	    default:
+	      ndbrequire(false);
+	    }
+	    
+	    disk_restart_undo_page_bits(&f_undo);
+	    
+	    lsn = f_undo.m_lsn - 1; // make sure undo isn't run again...
+	  }
+	  else
+	  {
+	    ndbout_c("lsn %lld frag undo complete", f_undo.m_lsn);
 	  }
-	  
-	  disk_restart_undo_page_bits(&f_undo);
-
-	  lsn = f_undo.m_lsn - 1; // make sure undo isn't run again...
 	}
 	else
 	{
-	  ndbout_c("lsn %lld frag undo complete", f_undo.m_lsn);
+	  ndbout_c("lsn %lld table not defined", f_undo.m_lsn);
 	}
       }
       else
       {
-	ndbout_c("lsn %lld table not defined", f_undo.m_lsn);
+	ndbout_c("lsn %lld no such table", f_undo.m_lsn);
       }
     }
     else
     {
-      ndbout_c("lsn %lld no such table", f_undo.m_lsn);
+      ndbout_c("f_undo.m_lsn %lld > lsn %lld -> skip",
+	       f_undo.m_lsn, lsn);
+    }
+    
+    if (update)
+    {
+      m_pgman.update_lsn(f_undo.m_key, lsn);
     }
-  }
-  else
-  {
-    ndbout_c("f_undo.m_lsn %lld > lsn %lld -> skip",
-	     f_undo.m_lsn, lsn);
-  }
-
-  if (update)
-  {
-    m_pgman.update_lsn(f_undo.m_key, lsn);
   }
 
   disk_restart_undo_next(signal);
@@ -1379,8 +1386,12 @@
 void
 Dbtup::disk_restart_undo_alloc(Apply_undo* undo)
 {
+  ndbassert(undo->m_page_ptr.p->m_file_no == undo->m_key.m_file_no);
+  ndbassert(undo->m_page_ptr.p->m_page_no == undo->m_key.m_page_no);
   if (undo->m_table_ptr.p->m_attributes[DD].m_no_of_varsize == 0)
+  {
     ((Fix_page*)undo->m_page_ptr.p)->free_record(undo->m_key.m_page_idx);
+  }
   else
     ((Var_page*)undo->m_page_ptr.p)->free_record(undo->m_key.m_page_idx, 0);
 }
@@ -1409,12 +1420,12 @@
 void
 Dbtup::disk_restart_undo_free(Apply_undo* undo)
 {
-  Uint32* ptr, idx;
+  Uint32* ptr, idx = undo->m_key.m_page_idx;
   Uint32 len= undo->m_len - 4;
   if (undo->m_table_ptr.p->m_attributes[DD].m_no_of_varsize == 0)
   {
     ndbrequire(len == undo->m_table_ptr.p->m_offsets[DD].m_fix_header_size);
-    idx= ((Fix_page*)undo->m_page_ptr.p)->alloc_record();
+    idx= ((Fix_page*)undo->m_page_ptr.p)->alloc_record(idx);
     ptr= ((Fix_page*)undo->m_page_ptr.p)->get_ptr(idx, len);
   }
   else

--- 1.10/storage/ndb/src/kernel/blocks/dbtup/tuppage.cpp	2005-08-31 08:41:50 +02:00
+++ 1.11/storage/ndb/src/kernel/blocks/dbtup/tuppage.cpp	2005-09-05 13:54:32 +02:00
@@ -22,53 +22,91 @@
 Tup_fixsize_page::alloc_record()
 {
   assert(free_space);
-  Uint32 freeListHeader = next_free_index;
-  Uint32 startTuple = freeListHeader >> 16;
-  Uint32 endTuple = freeListHeader & 0xffff;
-  if (startTuple != endTuple) {
-/* ---------------------------------------------------------------- */
-/*       NOT THE LAST, SIMPLY RESHUFFLE POINTERS.                   */
-/* ---------------------------------------------------------------- */
-    assert(startTuple < DATA_WORDS);
-    Uint32 next = m_data[startTuple] & 0xFFFF;
-    next_free_index = endTuple + (next << 16);
+  Uint32 page_idx = next_free_index;
+  assert(page_idx + 1 < DATA_WORDS);
+
+  Uint32 prev = m_data[page_idx] >> 16;
+  Uint32 next = m_data[page_idx] & 0xFFFF;
+
+  assert(prev == 0xFFFF);
+  assert(m_data[page_idx + 1] == Dbtup::Tuple_header::FREE);
+  
+  m_data[page_idx + 1] = 0;
+  if (next != 0xFFFF)
+  {
+    assert(free_space > 1);
+    Uint32 nextP = m_data[next];
+    assert((nextP >> 16) == page_idx);
+    m_data[next] = 0xFFFF0000 | (nextP & 0xFFFF);
+  }
+  else
+  {
+    assert(free_space == 1);
+  }
+  
+  next_free_index = next;
+  free_space--;
+  return page_idx;
+}
+
+Uint32
+Tup_fixsize_page::alloc_record(Uint32 page_idx)
+{
+  assert(page_idx + 1 < DATA_WORDS);
+  if (likely(free_space && m_data[page_idx + 1] == Dbtup::Tuple_header::FREE))
+  {
+    Uint32 prev = m_data[page_idx] >> 16;
+    Uint32 next = m_data[page_idx] & 0xFFFF;
+    
+    assert(prev != 0xFFFF || (next_free_index == page_idx));
+    if (prev == 0xFFFF)
+    {
+      next_free_index = next;
+    }
+    else
+    {
+      Uint32 prevP = m_data[prev];
+      m_data[prev] = (prevP & 0xFFFF0000) | next;
+    }
+
+    if (next != 0xFFFF)
+    {
+      Uint32 nextP = m_data[next];
+      m_data[next] = (prev << 16) | (nextP & 0xFFFF);
+    }
     free_space --;
-    return startTuple;
-  } else {
-/* ---------------------------------------------------------------- */
-/*       THIS WAS THE LAST TUPLE HEADER IN THIS PAGE. REMOVE IT FROM*/
-/*       THE TUPLE HEADER FREE LIST OR TH COPY FREE LIST. ALSO SET  */
-/*       A PROPER PAGE STATE.                                       */
-/*                                                                  */
-/*       WE ALSO HAVE TO INSERT AN UNDO LOG ENTRY TO ENSURE PAGE    */
-/*       ARE MAINTAINED EVEN AFTER A SYSTEM CRASH.                  */
-/* ---------------------------------------------------------------- */
-    next_free_index = ~0;
-    free_space--;
-    assert(free_space == 0);
-    return startTuple;
-  }//if
+    m_data[page_idx + 1] = 0;
+    return page_idx;
+  }
+  return ~0;
 }
 
 Uint32
-Tup_fixsize_page::free_record(Uint32 freePageOffset)
+Tup_fixsize_page::free_record(Uint32 page_idx)
 {
-  Uint32 startOfList = next_free_index >> 16;
-  Uint32 endOfList = next_free_index & 0xffff;
-  
-  assert(freePageOffset < DATA_WORDS);
-  m_data[freePageOffset] = (0x8000 << 16) + startOfList;
-  assert(! (m_data[freePageOffset + 1] & Dbtup::Tuple_header::FREE));
-  m_data[freePageOffset + 1] = Dbtup::Tuple_header::FREE;
+  Uint32 next = next_free_index;
   
-  if (endOfList == 0xFFFF) {
+  assert(page_idx + 1 < DATA_WORDS);
+  assert(m_data[page_idx + 1] != Dbtup::Tuple_header::FREE);
+
+  if (next == 0xFFFF)
+  {
     assert(free_space == 0);
-    assert(startOfList == 0xFFFF);
-    next_free_index = (freePageOffset << 16) + freePageOffset;
-  } else {
-    next_free_index = (freePageOffset << 16) + endOfList;
+  }
+  else
+  {
     assert(free_space);
-  }//if
+    assert(next + 1 < DATA_WORDS);
+    Uint32 nextP = m_data[next];
+    assert((nextP >> 16) == 0xFFFF);
+    m_data[next] = (page_idx << 16) | (nextP & 0xFFFF);
+    assert(m_data[next + 1] == Dbtup::Tuple_header::FREE);
+  }
+
+  next_free_index = page_idx;
+  m_data[page_idx] = 0xFFFF0000 | next;
+  m_data[page_idx + 1] = Dbtup::Tuple_header::FREE;
+  
   return ++free_space;
 }
 

--- 1.15/storage/ndb/src/kernel/blocks/dbtup/tuppage.hpp	2005-08-24 08:49:49 +02:00
+++ 1.16/storage/ndb/src/kernel/blocks/dbtup/tuppage.hpp	2005-09-05 13:54:32 +02:00
@@ -95,6 +95,7 @@
    *   return page_idx
    **/
   Uint32 alloc_record();
+  Uint32 alloc_record(Uint32 page_idx);
   Uint32 free_record(Uint32 page_idx);
 };
 

--- 1.56/storage/ndb/src/kernel/blocks/lgman.cpp	2005-08-31 15:04:52 +02:00
+++ 1.57/storage/ndb/src/kernel/blocks/lgman.cpp	2005-09-05 13:54:32 +02:00
@@ -1893,23 +1893,25 @@
   Uint32 cnt= lg_ptr.p->m_outstanding_fs;
   ndbassert(cnt);
   
-  if(ptr.p->m_state == Undofile::FS_EXECUTING)
+  if((ptr.p->m_state & Undofile::FS_EXECUTING)== Undofile::FS_EXECUTING)
   {
     jam();
-  
+    
     if(lg_ptr.p->m_next_reply_ptr_i == ptr.i)
     {
       Uint32 tot= 0;
       LocalDLFifoList<Undofile> files(m_file_pool, lg_ptr.p->m_files);
       while(cnt && ! (ptr.p->m_state & Undofile::FS_OUTSTANDING))
       {
+	Uint32 state= ptr.p->m_state;
 	Uint32 pages= ptr.p->m_online.m_outstanding;
 	ndbassert(pages);
 	ptr.p->m_online.m_outstanding= 0;
+	ptr.p->m_state &= ~(Uint32)Undofile::FS_MOVE_NEXT;
 	tot += pages;
 	cnt--;
 	
-	if(cnt && !files.prev(ptr))
+	if((state & Undofile::FS_MOVE_NEXT) && !files.prev(ptr))
 	  files.last(ptr);
       }
       
@@ -2343,8 +2345,8 @@
     
     ptr.p->m_outstanding_fs++;
     filePtr.p->m_online.m_outstanding = max;
-    filePtr.p->m_state |= Undofile::FS_OUTSTANDING;
-
+    filePtr.p->m_state |= Undofile::FS_OUTSTANDING | Undofile::FS_MOVE_NEXT;
+    
     Ptr<Undofile> prev = filePtr;
     LocalDLFifoList<Undofile> files(m_file_pool, ptr.p->m_files);
     if(!files.prev(prev))

--- 1.35/storage/ndb/src/kernel/blocks/pgman.cpp	2005-08-31 10:32:18 +02:00
+++ 1.36/storage/ndb/src/kernel/blocks/pgman.cpp	2005-09-05 13:54:32 +02:00
@@ -1582,5 +1582,19 @@
       i = ptr.p->m_next_entry_i[list];
     }
   }
+
+  if (signal->theData[0] == 11002 && signal->getLength() == 3)
+  {
+    Page_entry key;
+    key.m_file_no = signal->theData[1];
+    key.m_page_no = signal->theData[2];
+    
+    Ptr<Page_entry> ptr;
+    if (m_page_entry_hash.find(ptr, key))
+    {
+      ndbout << "pageout " << ptr << endl;
+      pageout(signal, ptr);
+    }
+  }
 }
 

--- 1.48/storage/ndb/include/ndbapi/NdbDictionary.hpp	2005-08-27 07:49:57 +02:00
+++ 1.49/storage/ndb/include/ndbapi/NdbDictionary.hpp	2005-09-05 13:54:32 +02:00
@@ -499,6 +499,7 @@
     static const Column * COMMIT_COUNT;
     static const Column * ROW_SIZE;
     static const Column * RANGE_NO;
+    static const Column * DISK_REF;
     
     int getSizeInBytes() const;
 #endif

--- 1.37/storage/ndb/src/kernel/blocks/dbtup/DbtupAbort.cpp	2005-08-31 10:32:18 +02:00
+++ 1.38/storage/ndb/src/kernel/blocks/dbtup/DbtupAbort.cpp	2005-09-05 13:54:32 +02:00
@@ -175,8 +175,9 @@
   
   if(regOperPtr.p->is_first_operation() && regOperPtr.p->is_last_operation())
   {
-    c_lgman->free_log_space(regFragPtr.p->m_logfile_group_id, 
-			    regOperPtr.p->m_undo_buffer_space);
+    if (regOperPtr.p->m_undo_buffer_space)
+      c_lgman->free_log_space(regFragPtr.p->m_logfile_group_id, 
+			      regOperPtr.p->m_undo_buffer_space);
   }
 
   removeActiveOpList(regOperPtr.p, tuple_ptr);

--- 1.17/storage/ndb/src/kernel/blocks/dbtup/DbtupFixAlloc.cpp	2005-07-12 14:03:27 +02:00
+++ 1.18/storage/ndb/src/kernel/blocks/dbtup/DbtupFixAlloc.cpp	2005-09-05 13:54:32 +02:00
@@ -120,7 +120,6 @@
 void Dbtup::convertThPage(Uint32 Tupheadsize,
                           Fix_page*  const regPagePtr) 
 {
-  Uint32 ctpConstant = 0x8000 << 16;
   Uint32 nextTuple = Tupheadsize;
   Uint32 endOfList;
   /*
@@ -128,19 +127,22 @@
   OF ZERO AS EXTREME CASE
   */
   Uint32 cnt= 0;
+  Uint32 pos= 0;
+  Uint32 prev = 0xFFFF;
 #ifdef VM_TRACE
   memset(regPagePtr->m_data, 0xF1, 4*Fix_page::DATA_WORDS);
 #endif
-  do {
-    endOfList = nextTuple - Tupheadsize;
-    regPagePtr->m_data[endOfList] = ctpConstant + nextTuple;
-    regPagePtr->m_data[endOfList + 1] = Tuple_header::FREE;
-    nextTuple += Tupheadsize;
+  while (pos + nextTuple <= Fix_page::DATA_WORDS)
+  {
+    regPagePtr->m_data[pos] = (prev << 16) | (pos + nextTuple);
+    regPagePtr->m_data[pos + 1] = Tuple_header::FREE;
+    prev = pos;
+    pos += nextTuple;
     cnt ++;
-  } while (nextTuple <= Fix_page::DATA_WORDS);
-  regPagePtr->m_data[endOfList] = ctpConstant + 0xFFFF;
-  Uint32 startOfList = 0;
-  regPagePtr->next_free_index= (startOfList << 16) + endOfList;
+  } 
+  
+  regPagePtr->m_data[prev] |= 0xFFFF;
+  regPagePtr->next_free_index= 0;
   regPagePtr->free_space= cnt;
   regPagePtr->m_page_header.m_page_type = File_formats::PT_Tup_fixsize_page;
 }//Dbtup::convertThPage()
@@ -150,7 +152,6 @@
 			     Fix_page* const regPagePtr)
 {
   Uint32 idx= regPagePtr->alloc_record();
-  regPagePtr->m_data[idx + 1] = 0; //m_header_bits
   if(regPagePtr->free_space == 0)
   {
     jam();

--- 1.47/storage/ndb/src/ndbapi/NdbDictionary.cpp	2005-07-26 16:07:37 +02:00
+++ 1.48/storage/ndb/src/ndbapi/NdbDictionary.cpp	2005-09-05 13:54:32 +02:00
@@ -1490,3 +1490,4 @@
 const NdbDictionary::Column * NdbDictionary::Column::COMMIT_COUNT = 0;
 const NdbDictionary::Column * NdbDictionary::Column::ROW_SIZE = 0;
 const NdbDictionary::Column * NdbDictionary::Column::RANGE_NO = 0;
+const NdbDictionary::Column * NdbDictionary::Column::DISK_REF = 0;

--- 1.96/storage/ndb/src/ndbapi/NdbDictionaryImpl.cpp	2005-08-27 07:49:59 +02:00
+++ 1.97/storage/ndb/src/ndbapi/NdbDictionaryImpl.cpp	2005-09-05 13:54:32 +02:00
@@ -307,6 +307,11 @@
     col->m_impl.m_attrId = AttributeHeader::RANGE_NO;
     col->m_impl.m_attrSize = 4;
     col->m_impl.m_arraySize = 1;
+  } else if(!strcmp(name, "NDB$DISK_REF")){
+    col->setType(NdbDictionary::Column::Bigunsigned);
+    col->m_impl.m_attrId = AttributeHeader::DISK_REF;
+    col->m_impl.m_attrSize = 8;
+    col->m_impl.m_arraySize = 1;
   } else {
     abort();
   }
@@ -845,12 +850,14 @@
       delete NdbDictionary::Column::COMMIT_COUNT;
       delete NdbDictionary::Column::ROW_SIZE;
       delete NdbDictionary::Column::RANGE_NO;
+      delete NdbDictionary::Column::DISK_REF;
       NdbDictionary::Column::FRAGMENT= 0;
       NdbDictionary::Column::FRAGMENT_MEMORY= 0;
       NdbDictionary::Column::ROW_COUNT= 0;
       NdbDictionary::Column::COMMIT_COUNT= 0;
       NdbDictionary::Column::ROW_SIZE= 0;
       NdbDictionary::Column::RANGE_NO= 0;
+      NdbDictionary::Column::DISK_REF= 0;
     }
     m_globalHash->unlock();
   } else {
@@ -923,6 +930,8 @@
 	NdbColumnImpl::create_pseudo("NDB$ROW_SIZE");
       NdbDictionary::Column::RANGE_NO= 
 	NdbColumnImpl::create_pseudo("NDB$RANGE_NO");
+      NdbDictionary::Column::DISK_REF= 
+	NdbColumnImpl::create_pseudo("NDB$DISK_REF");
     }
     m_globalHash->unlock();
     return true;
Thread
bk commit into 5.1 tree (jonas:1.1983)jonas5 Sep