List:Commits« Previous MessageNext Message »
From:jonas Date:January 4 2006 10:45am
Subject:bk commit into 5.1 tree (jonas:1.1984)
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.1984 06/01/04 11:45:49 jonas@stripped +13 -0
  Merge perch.ndb.mysql.com:/home/jonas/src/51-ndb
  into  perch.ndb.mysql.com:/home/jonas/src/51-dd

  storage/ndb/src/ndbapi/ndb_cluster_connection.cpp
    1.37 06/01/04 11:45:45 jonas@stripped +0 -0
    Auto merged

  storage/ndb/src/ndbapi/NdbDictionaryImpl.hpp
    1.39 06/01/04 11:45:45 jonas@stripped +0 -0
    Auto merged

  storage/ndb/src/ndbapi/NdbDictionaryImpl.cpp
    1.98 06/01/04 11:45:45 jonas@stripped +0 -0
    Auto merged

  storage/ndb/src/ndbapi/NdbDictionary.cpp
    1.45 06/01/04 11:45:45 jonas@stripped +0 -0
    Auto merged

  storage/ndb/src/kernel/blocks/tsman.cpp
    1.5 06/01/04 11:45:45 jonas@stripped +0 -0
    Auto merged

  storage/ndb/src/kernel/blocks/pgman.cpp
    1.4 06/01/04 11:45:45 jonas@stripped +0 -0
    Auto merged

  storage/ndb/src/kernel/blocks/lgman.cpp
    1.4 06/01/04 11:45:45 jonas@stripped +0 -0
    Auto merged

  storage/ndb/src/kernel/blocks/dbdict/Dbdict.hpp
    1.24 06/01/04 11:45:45 jonas@stripped +0 -0
    Auto merged

  storage/ndb/src/kernel/blocks/dbdict/Dbdict.cpp
    1.67 06/01/04 11:45:45 jonas@stripped +0 -0
    Auto merged

  storage/ndb/src/common/debugger/signaldata/DictTabInfo.cpp
    1.10 06/01/04 11:45:45 jonas@stripped +0 -0
    Auto merged

  storage/ndb/include/ndbapi/NdbDictionary.hpp
    1.61 06/01/04 11:45:45 jonas@stripped +0 -0
    Auto merged

  storage/ndb/include/kernel/signaldata/DictTabInfo.hpp
    1.24 06/01/04 11:45:45 jonas@stripped +0 -0
    Auto merged

  sql/item_xmlfunc.cc
    1.3 06/01/04 11:45:45 jonas@stripped +0 -1
    Auto merged

# 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:	perch.ndb.mysql.com
# Root:	/home/jonas/src/51-dd/RESYNC

--- 1.3/storage/ndb/src/kernel/blocks/lgman.cpp	2006-01-02 04:34:40 +01:00
+++ 1.4/storage/ndb/src/kernel/blocks/lgman.cpp	2006-01-04 11:45:45 +01:00
@@ -704,6 +704,7 @@
     ptr.p->m_state = Undofile::FS_SORTING;
   }
   
+  ptr.p->m_online.m_lsn = 0;
   ptr.p->m_online.m_outstanding = 0;
   
   Uint64 add= ptr.p->m_file_size - 1;
@@ -1651,7 +1652,7 @@
     sendSignal(reference(), GSN_CONTINUEB, signal, 2, JBB);
   }
   
-  if(!ptr.isNull())
+  if(!ptr.isNull() && ptr.p->m_last_lsn)
   {
     Uint32 undo[3];
     undo[0] = lcp_id;
@@ -1689,24 +1690,26 @@
   
   while(!ptr.isNull())
   {
-    /**
-     * First LCP_FRAGORD for each LCP, sets tail pos
-     */
-    if(m_latest_lcp != lcp_id)
+    if (ptr.p->m_last_lsn)
     {
-      ptr.p->m_tail_pos[0] = ptr.p->m_tail_pos[1];
-      ptr.p->m_tail_pos[1] = ptr.p->m_tail_pos[2];
-      ptr.p->m_tail_pos[2] = ptr.p->m_file_pos[HEAD];
+      /**
+       * First LCP_FRAGORD for each LCP, sets tail pos
+       */
+      if(m_latest_lcp != lcp_id)
+      {
+	ptr.p->m_tail_pos[0] = ptr.p->m_tail_pos[1];
+	ptr.p->m_tail_pos[1] = ptr.p->m_tail_pos[2];
+	ptr.p->m_tail_pos[2] = ptr.p->m_file_pos[HEAD];
+      }
+      
+      if(0)
+	ndbout_c
+	  ("execLCP_FRAG_ORD (%d %d) (%d %d) (%d %d) free pages: %d", 
+	   ptr.p->m_tail_pos[0].m_ptr_i, ptr.p->m_tail_pos[0].m_idx,
+	   ptr.p->m_tail_pos[1].m_ptr_i, ptr.p->m_tail_pos[1].m_idx,
+	   ptr.p->m_tail_pos[2].m_ptr_i, ptr.p->m_tail_pos[2].m_idx,
+	   (ptr.p->m_free_file_words / File_formats::UNDO_PAGE_WORDS));
     }
-    
-    if(0)
-      ndbout_c
-	("execLCP_FRAG_ORD (%d %d) (%d %d) (%d %d) free pages: %d", 
-	 ptr.p->m_tail_pos[0].m_ptr_i, ptr.p->m_tail_pos[0].m_idx,
-	 ptr.p->m_tail_pos[1].m_ptr_i, ptr.p->m_tail_pos[1].m_idx,
-	 ptr.p->m_tail_pos[2].m_ptr_i, ptr.p->m_tail_pos[2].m_idx,
-	 (ptr.p->m_free_file_words / File_formats::UNDO_PAGE_WORDS));
-    
     m_logfile_group_list.next(ptr);
   }
   
@@ -1764,47 +1767,50 @@
 void
 Lgman::cut_log_tail(Signal* signal, Ptr<Logfile_group> ptr)
 {
-  Buffer_idx tmp= ptr.p->m_tail_pos[0];
-  Buffer_idx tail= ptr.p->m_file_pos[TAIL];
-
-  Ptr<Undofile> filePtr;
-  m_file_pool.getPtr(filePtr, tail.m_ptr_i);
-  
   bool done= true;
-  if(!(tmp == tail))
+  if (likely(ptr.p->m_last_lsn))
   {
-    Uint32 free;
-    if(tmp.m_ptr_i == tail.m_ptr_i && tail.m_idx < tmp.m_idx)
-    {
-      free= tmp.m_idx - tail.m_idx; 
-      ptr.p->m_free_file_words += free * File_formats::UNDO_PAGE_WORDS;
-      ptr.p->m_file_pos[TAIL] = tmp;
-    }
-    else
+    Buffer_idx tmp= ptr.p->m_tail_pos[0];
+    Buffer_idx tail= ptr.p->m_file_pos[TAIL];
+    
+    Ptr<Undofile> filePtr;
+    m_file_pool.getPtr(filePtr, tail.m_ptr_i);
+    
+    if(!(tmp == tail))
     {
-      free= filePtr.p->m_file_size - tail.m_idx - 1;
-      ptr.p->m_free_file_words += free * File_formats::UNDO_PAGE_WORDS;
-      
-      Ptr<Undofile> next = filePtr;
-      LocalDLFifoList<Undofile> files(m_file_pool, ptr.p->m_files);
-      while(files.next(next) && (next.p->m_state & Undofile::FS_EMPTY))
-	ndbassert(next.i != filePtr.i);
-      if(next.isNull())
+      Uint32 free;
+      if(tmp.m_ptr_i == tail.m_ptr_i && tail.m_idx < tmp.m_idx)
       {
-	jam();
-	files.first(next);
-	while((next.p->m_state & Undofile::FS_EMPTY) && files.next(next))
+	free= tmp.m_idx - tail.m_idx; 
+	ptr.p->m_free_file_words += free * File_formats::UNDO_PAGE_WORDS;
+	ptr.p->m_file_pos[TAIL] = tmp;
+      }
+      else
+      {
+	free= filePtr.p->m_file_size - tail.m_idx - 1;
+	ptr.p->m_free_file_words += free * File_formats::UNDO_PAGE_WORDS;
+	
+	Ptr<Undofile> next = filePtr;
+	LocalDLFifoList<Undofile> files(m_file_pool, ptr.p->m_files);
+	while(files.next(next) && (next.p->m_state & Undofile::FS_EMPTY))
 	  ndbassert(next.i != filePtr.i);
+	if(next.isNull())
+	{
+	  jam();
+	  files.first(next);
+	  while((next.p->m_state & Undofile::FS_EMPTY) && files.next(next))
+	    ndbassert(next.i != filePtr.i);
+	}
+	
+	tmp.m_idx= 0;
+	tmp.m_ptr_i= next.i;
+	ptr.p->m_file_pos[TAIL] = tmp;
+	done= false;      
       }
-      
-      tmp.m_idx= 0;
-      tmp.m_ptr_i= next.i;
-      ptr.p->m_file_pos[TAIL] = tmp;
-      done= false;      
-    }
-  } 
-
-  validate_logfile_group(ptr, "cut log");
+    } 
+    
+    validate_logfile_group(ptr, "cut log");
+  }
   
   if (done)
   {

--- 1.3/storage/ndb/src/kernel/blocks/pgman.cpp	2005-12-28 12:55:45 +01:00
+++ 1.4/storage/ndb/src/kernel/blocks/pgman.cpp	2006-01-04 11:45:45 +01:00
@@ -2191,11 +2191,14 @@
     }
   }
 
+
   if (signal->theData[0] == 11003)
   {
 #ifdef VM_TRACE
     verify_page_lists();
     dump_page_lists();
+#else
+    ndbout << "Only in VM_TRACE builds" << endl;
 #endif
   }
 }

--- 1.4/storage/ndb/src/kernel/blocks/tsman.cpp	2005-12-28 12:55:45 +01:00
+++ 1.5/storage/ndb/src/kernel/blocks/tsman.cpp	2006-01-04 11:45:45 +01:00
@@ -2108,17 +2108,23 @@
   if(reqType == GetTabInfoReq::RequestByName){
     jam();
     releaseSections(signal);
-    
-    sendGET_TABINFOREF(signal, req, GetTabInfoRef::TableNameTooLong);
+
+    sendGET_TABINFOREF(signal, req, GetTabInfoRef::NoFetchByName);
     return;
   }
 
   DLHashTable<Datafile>::Iterator iter;
   ndbrequire(m_file_hash.first(iter));
+
   while(iter.curr.p->m_file_id != tableId && m_file_hash.next(iter))
     ;
-  ndbrequire(iter.curr.p->m_file_id == tableId);
-  
+
+  if(iter.curr.p->m_file_id != tableId)
+  {
+    sendGET_TABINFOREF(signal, req, GetTabInfoRef::InvalidTableId);
+    return;
+  }
+
   const Ptr<Datafile> &file_ptr= iter.curr;
 
   jam();
@@ -2126,9 +2132,9 @@
   Uint32 total_free_extents = file_ptr.p->m_online.m_data_pages;
   total_free_extents /= file_ptr.p->m_extent_size;
   total_free_extents -= file_ptr.p->m_online.m_used_extent_cnt;
-  
+
   GetTabInfoConf *conf = (GetTabInfoConf *)&signal->theData[0];
-  
+
   conf->senderData= senderData;
   conf->tableId= tableId;
   conf->freeExtents= total_free_extents;

--- 1.23/storage/ndb/include/kernel/signaldata/DictTabInfo.hpp	2005-12-05 16:54:20 +01:00
+++ 1.24/storage/ndb/include/kernel/signaldata/DictTabInfo.hpp	2006-01-04 11:45:45 +01:00
@@ -616,7 +616,9 @@
     LF_UndoGrowSizeHi  = 2001,
     LF_UndoGrowSizeLo  = 2002,
     LF_UndoGrowPattern = 2003,
-    LF_UndoGrowMaxSize = 2004
+    LF_UndoGrowMaxSize = 2004,
+    LF_UndoFreeWordsHi = 2006,
+    LF_UndoFreeWordsLo = 2007
   };
 
   // FragmentType constants
@@ -652,6 +654,8 @@
       GrowSpec LF_UndoGrow;
     };
     //GrowSpec LF_RedoGrow;
+    Uint32 LF_UndoFreeWordsHi;
+    Uint32 LF_UndoFreeWordsLo;
     void init();
   };
   static const Uint32 MappingSize;

--- 1.60/storage/ndb/include/ndbapi/NdbDictionary.hpp	2005-12-05 16:54:20 +01:00
+++ 1.61/storage/ndb/include/ndbapi/NdbDictionary.hpp	2006-01-04 11:45:45 +01:00
@@ -1205,6 +1205,8 @@
     void setAutoGrowSpecification(const AutoGrowSpecification&);
     const AutoGrowSpecification& getAutoGrowSpecification() const;
 
+    Uint64 getUndoFreeWords() const;
+
     /**
      * Get object status
      */
@@ -1306,7 +1308,6 @@
   
     void setSize(Uint64);
     Uint64 getSize() const;
-    Uint64 getFree() const;
 
     void setLogfileGroup(const char * name);
     void setLogfileGroup(const class LogfileGroup &);

--- 1.9/storage/ndb/src/common/debugger/signaldata/DictTabInfo.cpp	2005-12-05 16:54:20 +01:00
+++ 1.10/storage/ndb/src/common/debugger/signaldata/DictTabInfo.cpp	2006-01-04 11:45:45 +01:00
@@ -179,7 +179,9 @@
   DFGIMAP(Filegroup,  LF_UndoGrowSizeLo, LF_UndoGrow.GrowSizeLo),
   DFGIMAPS(Filegroup, LF_UndoGrowPattern, LF_UndoGrow.GrowPattern, 0,PATH_MAX),
   DFGIMAP(Filegroup,  LF_UndoGrowMaxSize, LF_UndoGrow.GrowMaxSize),
-  
+  DFGIMAP(Filegroup,  LF_UndoFreeWordsHi, LF_UndoFreeWordsHi),
+  DFGIMAP(Filegroup,  LF_UndoFreeWordsLo, LF_UndoFreeWordsLo),
+
   DFGIBREAK(FileName)
 };
 

--- 1.66/storage/ndb/src/kernel/blocks/dbdict/Dbdict.cpp	2005-12-26 09:49:43 +01:00
+++ 1.67/storage/ndb/src/kernel/blocks/dbdict/Dbdict.cpp	2006-01-04 11:45:45 +01:00
@@ -353,7 +353,9 @@
   case DictTabInfo::LogfileGroup:{
     FilegroupPtr fg_ptr;
     ndbrequire(c_filegroup_hash.find(fg_ptr, tableId));
-    packFilegroupIntoPages(w, fg_ptr);
+    const Uint32 free_hi= signal->theData[4];
+    const Uint32 free_lo= signal->theData[5];
+    packFilegroupIntoPages(w, fg_ptr, free_hi, free_lo);
     break;
   }
   case DictTabInfo::Datafile:{
@@ -538,7 +540,9 @@
 
 void
 Dbdict::packFilegroupIntoPages(SimpleProperties::Writer & w,
-			       FilegroupPtr fg_ptr){
+			       FilegroupPtr fg_ptr,
+			       const Uint32 undo_free_hi,
+			       const Uint32 undo_free_lo){
   
   DictFilegroupInfo::Filegroup fg; fg.init();
   ConstRope r(c_rope_pool, fg_ptr.p->m_name);
@@ -559,6 +563,8 @@
     break;
   case DictTabInfo::LogfileGroup:
     fg.LF_UndoBufferSize = fg_ptr.p->m_logfilegroup.m_undo_buffer_size;
+    fg.LF_UndoFreeWordsHi= undo_free_hi;
+    fg.LF_UndoFreeWordsLo= undo_free_lo;
     //fg.LF_UndoGrow = ;
     break;
   default:
@@ -2985,6 +2991,26 @@
       signal->theData[4]= free_extents;
       sendSignal(reference(), GSN_CONTINUEB, signal, 5, JBB);
     }
+    else if(refToBlock(conf->senderRef) == LGMAN
+	    && (refToNode(conf->senderRef) == 0
+		|| refToNode(conf->senderRef) == getOwnNodeId()))
+    {
+      jam();
+      FilegroupPtr fg_ptr;
+      ndbrequire(c_filegroup_hash.find(fg_ptr, conf->tableId));
+      const Uint32 free_hi= conf->freeWordsHi;
+      const Uint32 free_lo= conf->freeWordsLo;
+      const Uint32 id= conf->tableId;
+      const Uint32 type= conf->tableType;
+      const Uint32 data= conf->senderData;
+      signal->theData[0]= ZPACK_TABLE_INTO_PAGES;
+      signal->theData[1]= id;
+      signal->theData[2]= type;
+      signal->theData[3]= data;
+      signal->theData[4]= free_hi;
+      signal->theData[5]= free_lo;
+      sendSignal(reference(), GSN_CONTINUEB, signal, 6, JBB);
+    }
     else
     {
       jam();
@@ -7072,6 +7098,18 @@
     req->tableId= obj_id;
 
     sendSignal(TSMAN_REF, GSN_GET_TABINFOREQ, signal,
+	       GetTabInfoReq::SignalLength, JBB);
+  }
+  else if(objEntry->m_tableType==DictTabInfo::LogfileGroup)
+  {
+    jam();
+    GetTabInfoReq *req= (GetTabInfoReq*)signal->theData;
+    req->senderData= c_retrieveRecord.retrievePage;
+    req->senderRef= reference();
+    req->requestType= GetTabInfoReq::RequestById;
+    req->tableId= obj_id;
+
+    sendSignal(LGMAN_REF, GSN_GET_TABINFOREQ, signal,
 	       GetTabInfoReq::SignalLength, JBB);
   }
   else

--- 1.23/storage/ndb/src/kernel/blocks/dbdict/Dbdict.hpp	2005-12-05 16:54:20 +01:00
+++ 1.24/storage/ndb/src/kernel/blocks/dbdict/Dbdict.hpp	2006-01-04 11:45:45 +01:00
@@ -514,6 +514,7 @@
     Uint32 m_filegroup_id;
     Uint32 m_type;
     Uint64 m_file_size;
+    Uint64 m_file_free;
     RopeHandle m_path;
     
     Uint32 nextList;
@@ -2007,7 +2008,10 @@
 			     AttributeRecordPtr & attrPtr);
   void packTableIntoPages(Signal* signal);
   void packTableIntoPages(SimpleProperties::Writer &, TableRecordPtr, Signal* =0);
-  void packFilegroupIntoPages(SimpleProperties::Writer &, FilegroupPtr);
+  void packFilegroupIntoPages(SimpleProperties::Writer &,
+			      FilegroupPtr,
+			      const Uint32 undo_free_hi,
+			      const Uint32 undo_free_lo);
   void packFileIntoPages(SimpleProperties::Writer &, FilePtr, const Uint32);
   
   void sendGET_TABINFOREQ(Signal* signal,

--- 1.44/storage/ndb/src/ndbapi/NdbDictionary.cpp	2005-12-05 16:54:20 +01:00
+++ 1.45/storage/ndb/src/ndbapi/NdbDictionary.cpp	2006-01-04 11:45:45 +01:00
@@ -922,6 +922,10 @@
   return m_impl.m_grow_spec;
 }
 
+Uint64 NdbDictionary::LogfileGroup::getUndoFreeWords() const {
+  return m_impl.m_undo_free_words;
+}
+
 NdbDictionary::Object::Status
 NdbDictionary::LogfileGroup::getObjectStatus() const {
   return m_impl.m_status;
@@ -1044,11 +1048,6 @@
 Uint64
 NdbDictionary::Undofile::getSize() const {
   return m_impl.m_size;
-}
-
-Uint64
-NdbDictionary::Undofile::getFree() const {
-  return m_impl.m_free;
 }
 
 void 

--- 1.97/storage/ndb/src/ndbapi/NdbDictionaryImpl.cpp	2005-12-05 16:54:20 +01:00
+++ 1.98/storage/ndb/src/ndbapi/NdbDictionaryImpl.cpp	2006-01-04 11:45:45 +01:00
@@ -3803,10 +3803,10 @@
 NdbDictInterface::get_filegroup(NdbFilegroupImpl & dst,
 				NdbDictionary::Object::Type type,
 				const char * name){
-  DBUG_ENTER("NdbDictInterface::get_filegroup"); 
+  DBUG_ENTER("NdbDictInterface::get_filegroup");
   NdbApiSignal tSignal(m_reference);
   GetTabInfoReq * req = CAST_PTR(GetTabInfoReq, tSignal.getDataPtrSend());
-  
+
   size_t strLen = strlen(name) + 1;
 
   req->senderRef = m_reference;
@@ -3821,7 +3821,7 @@
   LinearSectionPtr ptr[1];
   ptr[0].p  = (Uint32*)name;
   ptr[0].sz = (strLen + 3)/4;
-  
+
   int r = dictSignal(&tSignal, ptr, 1,
 		     -1, // any node
 		     WAIT_GET_TAB_INFO_REQ,
@@ -3831,18 +3831,17 @@
     DBUG_PRINT("info", ("get_filegroup failed dictSignal"));
     DBUG_RETURN(-1);
   }
-  
-  m_error.code = parseFilegroupInfo(dst, 
-				    (Uint32*)m_buffer.get_data(), 
+
+  m_error.code = parseFilegroupInfo(dst,
+				    (Uint32*)m_buffer.get_data(),
 				    m_buffer.length() / 4);
-  
+
   if(m_error.code)
   {
     DBUG_PRINT("info", ("get_filegroup failed parseFilegroupInfo %d",
                          m_error.code));
     DBUG_RETURN(m_error.code);
   }
-
   if(dst.m_type == type)
   {
     DBUG_RETURN(0);
@@ -3879,10 +3878,67 @@
   dst.m_undo_buffer_size = fg.LF_UndoBufferSize;
   dst.m_logfile_group_id = fg.TS_LogfileGroupId;
   dst.m_logfile_group_version = fg.TS_LogfileGroupVersion;
+  dst.m_undo_free_words= ((Uint64)fg.LF_UndoFreeWordsHi << 32)
+    | (fg.LF_UndoFreeWordsLo);
+
+  if(dst.m_type==NdbDictionary::Object::Tablespace)
+  {
+    NdbDictionary::LogfileGroup tmp;
+    get_filegroup(NdbLogfileGroupImpl::getImpl(tmp),
+		  NdbDictionary::Object::LogfileGroup,
+		  dst.m_logfile_group_id);
+    dst.m_logfile_group_name.assign(tmp.getName());
+  }
   return 0;
 }
 
 int
+NdbDictInterface::get_filegroup(NdbFilegroupImpl & dst,
+				NdbDictionary::Object::Type type,
+				Uint32 id){
+  DBUG_ENTER("NdbDictInterface::get_filegroup");
+  NdbApiSignal tSignal(m_reference);
+  GetTabInfoReq * req = CAST_PTR(GetTabInfoReq, tSignal.getDataPtrSend());
+
+  req->senderRef = m_reference;
+  req->senderData = 0;
+  req->requestType =
+    GetTabInfoReq::RequestById | GetTabInfoReq::LongSignalConf;
+  req->tableId = id;
+  tSignal.theReceiversBlockNumber = DBDICT;
+  tSignal.theVerId_signalNumber   = GSN_GET_TABINFOREQ;
+  tSignal.theLength = GetTabInfoReq::SignalLength;
+
+  int r = dictSignal(&tSignal, NULL, 1,
+		     -1, // any node
+		     WAIT_GET_TAB_INFO_REQ,
+		     WAITFOR_RESPONSE_TIMEOUT, 100);
+  if (r)
+  {
+    DBUG_PRINT("info", ("get_filegroup failed dictSignal"));
+    DBUG_RETURN(-1);
+  }
+
+  m_error.code = parseFilegroupInfo(dst,
+				    (Uint32*)m_buffer.get_data(),
+				    m_buffer.length() / 4);
+
+  if(m_error.code)
+  {
+    DBUG_PRINT("info", ("get_filegroup failed parseFilegroupInfo %d",
+                         m_error.code));
+    DBUG_RETURN(m_error.code);
+  }
+
+  if(dst.m_type == type)
+  {
+    DBUG_RETURN(0);
+  }
+  DBUG_PRINT("info", ("get_filegroup failed no such filegroup"));
+  DBUG_RETURN(m_error.code = GetTabInfoRef::TableNotDefined);
+}
+
+int
 NdbDictInterface::get_file(NdbFileImpl & dst,
 			   NdbDictionary::Object::Type type,
 			   int node,
@@ -3956,9 +4012,28 @@
   dst.m_id= f.FileNo;
 
   dst.m_size= ((Uint64)f.FileSizeHi << 32) | (f.FileSizeLo);
-  dst.m_free= f.FileFreeExtents;
   dst.m_path.assign(f.FileName);
-  //dst.m_filegroup_name
+
+  if(dst.m_type==NdbDictionary::Object::Undofile)
+  {
+    NdbDictionary::LogfileGroup tmp;
+    get_filegroup(NdbLogfileGroupImpl::getImpl(tmp),
+		  NdbDictionary::Object::LogfileGroup,
+		  f.FilegroupId);
+    dst.m_filegroup_name.assign(tmp.getName());
+  }
+  else if(dst.m_type==NdbDictionary::Object::Datafile)
+  {
+    NdbDictionary::Tablespace tmp;
+    get_filegroup(NdbTablespaceImpl::getImpl(tmp),
+		  NdbDictionary::Object::Tablespace,
+		  f.FilegroupId);
+    dst.m_filegroup_name.assign(tmp.getName());
+    dst.m_free= f.FileFreeExtents * tmp.getExtentSize();
+  }
+  else
+    dst.m_filegroup_name.assign("Not Yet Implemented");
+
   dst.m_filegroup_id= f.FilegroupId;
   dst.m_filegroup_version= f.FilegroupVersion;
 

--- 1.38/storage/ndb/src/ndbapi/NdbDictionaryImpl.hpp	2005-12-05 16:54:20 +01:00
+++ 1.39/storage/ndb/src/ndbapi/NdbDictionaryImpl.hpp	2006-01-04 11:45:45 +01:00
@@ -294,6 +294,7 @@
   BaseString m_logfile_group_name;
   Uint32 m_logfile_group_id;
   Uint32 m_logfile_group_version;
+  Uint64 m_undo_free_words;
 };
 
 class NdbTablespaceImpl : public NdbDictionary::Tablespace, 
@@ -404,18 +405,18 @@
 			    const Uint32 * data, Uint32 len,
 			    bool fullyQualifiedNames);
 
-  static int parseFileInfo(NdbFileImpl &dst, 
-			   const Uint32 * data, Uint32 len);
-  
-  static int parseFilegroupInfo(NdbFilegroupImpl &dst, 
-				const Uint32 * data, Uint32 len);
-  
+  int parseFileInfo(NdbFileImpl &dst,
+		    const Uint32 * data, Uint32 len);
+
+  int parseFilegroupInfo(NdbFilegroupImpl &dst,
+			 const Uint32 * data, Uint32 len);
+
   int create_file(const NdbFileImpl &, const NdbFilegroupImpl&, bool overwrite = false);
   int drop_file(const NdbFileImpl &);
   int create_filegroup(const NdbFilegroupImpl &);
   int drop_filegroup(const NdbFilegroupImpl &);
   
-  int get_filegroup(NdbFilegroupImpl&, NdbDictionary::Object::Type, int);
+  int get_filegroup(NdbFilegroupImpl&, NdbDictionary::Object::Type, Uint32);
   int get_filegroup(NdbFilegroupImpl&,NdbDictionary::Object::Type,const char*);
   int get_file(NdbFileImpl&, NdbDictionary::Object::Type, int, int);
   int get_file(NdbFileImpl&, NdbDictionary::Object::Type, int, const char *);

--- 1.36/storage/ndb/src/ndbapi/ndb_cluster_connection.cpp	2005-12-21 16:45:03 +01:00
+++ 1.37/storage/ndb/src/ndbapi/ndb_cluster_connection.cpp	2006-01-04 11:45:45 +01:00
@@ -556,5 +556,17 @@
   DBUG_VOID_RETURN;
 }
 
+void
+Ndb_cluster_connection::init_get_next_node(Ndb_cluster_connection_node_iter &iter)
+{
+  m_impl.init_get_next_node(iter);
+}
+
+Uint32
+Ndb_cluster_connection::get_next_node(Ndb_cluster_connection_node_iter &iter)
+{
+  return m_impl.get_next_node(iter);
+}
+
 template class Vector<Ndb_cluster_connection_impl::Node>;
 
Thread
bk commit into 5.1 tree (jonas:1.1984)jonas4 Jan