List:Internals« Previous MessageNext Message »
From:jonas Date:August 13 2005 8:23am
Subject:bk commit into 5.1 tree (jonas:1.1964)
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.1964 05/08/13 08:23:37 jonas@eel.(none) +2 -0
  fix merge errors

  storage/ndb/src/ndbapi/NdbDictionaryImpl.cpp
    1.95 05/08/13 08:23:33 jonas@eel.(none) +7 -3
    merge error

  storage/ndb/src/kernel/blocks/dbtup/DbtupMeta.cpp
    1.40 05/08/13 08:23:33 jonas@eel.(none) +77 -67
    fix dropping of mem tables

# 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.39/storage/ndb/src/kernel/blocks/dbtup/DbtupMeta.cpp	2005-08-08 01:23:31 +02:00
+++ 1.40/storage/ndb/src/kernel/blocks/dbtup/DbtupMeta.cpp	2005-08-13 08:23:33 +02:00
@@ -918,49 +918,54 @@
 				 FragrecordPtr fragPtr,
 				 Uint32 pos)
 {
-  Disk_alloc_info& alloc_info= fragPtr.p->m_disk_alloc_info;
-  while(alloc_info.m_dirty_pages[pos].isEmpty() && pos < MAX_FREE_LIST)
-    pos++;
-  
-  if (pos == MAX_FREE_LIST)
+  if (tabPtr.p->m_no_of_disk_attributes)
   {
-    if(alloc_info.m_curr_extent_info_ptr_i != RNIL)
+    Disk_alloc_info& alloc_info= fragPtr.p->m_disk_alloc_info;
+    while(alloc_info.m_dirty_pages[pos].isEmpty() && pos < MAX_FREE_LIST)
+      pos++;
+    
+    if (pos == MAX_FREE_LIST)
     {
-      LocalDLList<Extent_info> 
-	list(c_extent_pool, alloc_info.m_free_extents[0]);
-      Ptr<Extent_info> ext_ptr;
-      c_extent_pool.getPtr(ext_ptr, alloc_info.m_curr_extent_info_ptr_i);
-      list.add(ext_ptr);
-      alloc_info.m_curr_extent_info_ptr_i= RNIL;
+      if(alloc_info.m_curr_extent_info_ptr_i != RNIL)
+      {
+	LocalDLList<Extent_info> 
+	  list(c_extent_pool, alloc_info.m_free_extents[0]);
+	Ptr<Extent_info> ext_ptr;
+	c_extent_pool.getPtr(ext_ptr, alloc_info.m_curr_extent_info_ptr_i);
+	list.add(ext_ptr);
+	alloc_info.m_curr_extent_info_ptr_i= RNIL;
+      }
+      
+      drop_fragment_free_exent(signal, tabPtr, fragPtr, 0);
+      return;
     }
     
-    drop_fragment_free_exent(signal, tabPtr, fragPtr, 0);
+    Uint32 page_id = alloc_info.m_dirty_pages[pos].firstItem;
+    Ptr<GlobalPage> page;
+    m_global_page_pool.getPtr(page, page_id);
+    
+    Page_cache_client::Request req;
+    req.m_page.m_page_no = ((Page*)page.p)->m_page_no;
+    req.m_page.m_file_no = ((Page*)page.p)->m_file_no;
+    
+    req.m_callback.m_callbackData= pos;
+    req.m_callback.m_callbackFunction = 
+      safe_cast(&Dbtup::drop_fragment_unmap_page_callback);
+    
+    int flags= Page_cache_client::COMMIT_REQ;
+    int res= m_pgman.get_page(signal, req, flags);
+    switch(res)
+    {
+    case 0:
+    case -1:
+      break;
+    default:
+      ndbrequire(res == page_id);
+      drop_fragment_unmap_page_callback(signal, pos, res);
+    }
     return;
   }
-
-  Uint32 page_id = alloc_info.m_dirty_pages[pos].firstItem;
-  Ptr<GlobalPage> page;
-  m_global_page_pool.getPtr(page, page_id);
-
-  Page_cache_client::Request req;
-  req.m_page.m_page_no = ((Page*)page.p)->m_page_no;
-  req.m_page.m_file_no = ((Page*)page.p)->m_file_no;
-  
-  req.m_callback.m_callbackData= pos;
-  req.m_callback.m_callbackFunction = 
-    safe_cast(&Dbtup::drop_fragment_unmap_page_callback);
-  
-  int flags= Page_cache_client::COMMIT_REQ;
-  int res= m_pgman.get_page(signal, req, flags);
-  switch(res)
-  {
-  case 0:
-  case -1:
-    break;
-  default:
-    ndbrequire(res == page_id);
-    drop_fragment_unmap_page_callback(signal, pos, res);
-  }
+  drop_fragment_free_exent(signal, tabPtr, fragPtr, 0);  
 }
 
 void
@@ -998,47 +1003,52 @@
 				FragrecordPtr fragPtr,
 				Uint32 pos)
 {
-  Disk_alloc_info& alloc_info= fragPtr.p->m_disk_alloc_info;
-  for(; pos<EXTENT_SEARCH_MATRIX_SIZE; pos++)
+  if (tabPtr.p->m_no_of_disk_attributes)
   {
-    if(!alloc_info.m_free_extents[pos].isEmpty())
+    Disk_alloc_info& alloc_info= fragPtr.p->m_disk_alloc_info;
+    for(; pos<EXTENT_SEARCH_MATRIX_SIZE; pos++)
     {
-      jam();
-      LocalDLList<Extent_info> 
-	list(c_extent_pool, alloc_info.m_free_extents[pos]);
-      Ptr<Extent_info> ext_ptr;
-      list.first(ext_ptr);
-      
-      Tablespace_client tsman(signal, c_tsman, tabPtr.i, fragPtr.p->fragmentId,
-			      fragPtr.p->m_tablespace_id);
-      
-      tsman.free_extent(&ext_ptr.p->m_key);
-      c_extent_hash.remove(ext_ptr);
-      list.release(ext_ptr);
-      
-      signal->theData[0] = ZFREE_EXTENT;
-      signal->theData[1] = tabPtr.i;
-      signal->theData[2] = fragPtr.i;
-      signal->theData[3] = pos;
-      sendSignal(cownref, GSN_CONTINUEB, signal, 4, JBB);  
-      return;
+      if(!alloc_info.m_free_extents[pos].isEmpty())
+      {
+	jam();
+	LocalDLList<Extent_info> 
+	  list(c_extent_pool, alloc_info.m_free_extents[pos]);
+	Ptr<Extent_info> ext_ptr;
+	list.first(ext_ptr);
+	
+	Tablespace_client tsman(signal, c_tsman, tabPtr.i, 
+				fragPtr.p->fragmentId,
+				fragPtr.p->m_tablespace_id);
+	
+	tsman.free_extent(&ext_ptr.p->m_key);
+	c_extent_hash.remove(ext_ptr);
+	list.release(ext_ptr);
+	
+	signal->theData[0] = ZFREE_EXTENT;
+	signal->theData[1] = tabPtr.i;
+	signal->theData[2] = fragPtr.i;
+	signal->theData[3] = pos;
+	sendSignal(cownref, GSN_CONTINUEB, signal, 4, JBB);  
+	return;
+      }
+    }
+    
+    ArrayPool<Page> *cheat_pool= (ArrayPool<Page>*)&m_global_page_pool;
+    for(pos= 0; pos<MAX_FREE_LIST; pos++)
+    {
+      ndbrequire(alloc_info.m_page_requests[pos].isEmpty());
+      LocalDLList<Page> list(* cheat_pool, alloc_info.m_dirty_pages[pos]);
+      list.remove();
     }
   }
   
-  ArrayPool<Page> *cheat_pool= (ArrayPool<Page>*)&m_global_page_pool;
-  for(pos= 0; pos<MAX_FREE_LIST; pos++)
-  {
-    ndbrequire(alloc_info.m_page_requests[pos].isEmpty());
-    LocalDLList<Page> list(* cheat_pool, alloc_info.m_dirty_pages[pos]);
-    list.remove();
-  }
-
   releaseFragPages(fragPtr.p);
   
   Uint32 i;
   for(i= 0; i<MAX_FRAG_PER_NODE; i++)
     if(tabPtr.p->fragrec[i] == fragPtr.i)
       break;
+  
   ndbrequire(i != MAX_FRAG_PER_NODE);
   tabPtr.p->fragid[i]= RNIL;
   tabPtr.p->fragrec[i]= RNIL;

--- 1.94/storage/ndb/src/ndbapi/NdbDictionaryImpl.cpp	2005-08-09 11:05:02 +02:00
+++ 1.95/storage/ndb/src/ndbapi/NdbDictionaryImpl.cpp	2005-08-13 08:23:33 +02:00
@@ -1145,6 +1145,7 @@
     if(res != 0){
       DBUG_PRINT("info", ("dictSignal failed to send signal"));
       continue;
+    }    
     
     m_error.code= 0;
     int ret_val= poll_guard.wait_n_unlock(timeout, node, wst);
@@ -1159,6 +1160,7 @@
      * Handle error codes
      */
     if(ret_val == -2) //WAIT_NODE_FAILURE
+    {
       continue;
     }
     if(m_waiter.m_state == WST_WAIT_TIMEOUT)
@@ -1168,13 +1170,15 @@
       DBUG_RETURN(-1);
     }
     
-    if ( (temporaryMask & m_error.code) != 0 ) {
+    if ( (temporaryMask & m_error.code) != 0 ) 
+    {
       DBUG_PRINT("info", ("dictSignal caught temporary error"));
       continue;
     }
     DBUG_PRINT("info", ("dictSignal caught error= %d", m_error.code));
-     
-    if(m_error.code && errcodes){
+    
+    if(m_error.code && errcodes)
+    {
       for(int j = 0; errcodes[j] ; j++){
 	if(m_error.code == errcodes[j]){
 	  m_error.code = 0;
Thread
bk commit into 5.1 tree (jonas:1.1964)jonas13 Aug