MySQL Lists are EOL. Please join:

List:Commits« Previous MessageNext Message »
From:tomas Date:April 26 2007 11:41am
Subject:bk commit into 5.1 tree (tomas:1.2464) BUG#27205
View as plain text  
Below is the list of changes that have just been committed into a local
5.1 repository of tomas. When tomas 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@stripped, 2007-04-26 13:41:33+02:00, tomas@stripped +4 -0
  Bug #27205 Occational 899 if delete+insert during LCP
  - put page of deleted row last in list

  storage/ndb/src/kernel/blocks/dbtup/Dbtup.hpp@stripped, 2007-04-26 13:41:31+02:00, tomas@stripped +1 -1
    Bug #27205 Occational 899 if delete+insert during LCP
    - put page of deleted row last in list

  storage/ndb/src/kernel/blocks/dbtup/DbtupFixAlloc.cpp@stripped, 2007-04-26 13:41:31+02:00, tomas@stripped +8 -8
    Bug #27205 Occational 899 if delete+insert during LCP
    - put page of deleted row last in list

  storage/ndb/src/kernel/blocks/dbtup/DbtupPageMap.cpp@stripped, 2007-04-26 13:41:31+02:00, tomas@stripped +1 -1
    Bug #27205 Occational 899 if delete+insert during LCP
    - put page of deleted row last in list

  storage/ndb/src/kernel/vm/DLFifoList.hpp@stripped, 2007-04-26 13:41:31+02:00, tomas@stripped +20 -3
    Bug #27205 Occational 899 if delete+insert during LCP
    - put page of deleted row last in list

# 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:	tomas
# Host:	whalegate.ndb.mysql.com
# Root:	/home/tomas/mysql-5.1-telco-gca

--- 1.57/storage/ndb/src/kernel/blocks/dbtup/Dbtup.hpp	2007-03-29 14:10:19 +02:00
+++ 1.58/storage/ndb/src/kernel/blocks/dbtup/Dbtup.hpp	2007-04-26 13:41:31 +02:00
@@ -610,7 +610,7 @@
   Uint32 noOfPagesToGrow;
 
   DLList<Page>::Head emptyPrimPage; // allocated pages (not init)
-  DLList<Page>::Head thFreeFirst;   // pages with atleast 1 free record
+  DLFifoList<Page>::Head thFreeFirst;   // pages with atleast 1 free record
   SLList<Page>::Head m_empty_pages; // Empty pages not in logical/physical map
   
   Uint32 m_lcp_scan_op;

--- 1.7/storage/ndb/src/kernel/blocks/dbtup/DbtupFixAlloc.cpp	2006-12-23 20:20:17 +01:00
+++ 1.8/storage/ndb/src/kernel/blocks/dbtup/DbtupFixAlloc.cpp	2007-04-26 13:41:31 +02:00
@@ -92,8 +92,8 @@
       
       pagePtr.p->page_state = ZTH_MM_FREE;
       
-      LocalDLList<Page> free_pages(c_page_pool, regFragPtr->thFreeFirst);    
-      free_pages.add(pagePtr);
+      LocalDLFifoList<Page> free_pages(c_page_pool, regFragPtr->thFreeFirst);
+      free_pages.addFirst(pagePtr);
     } else {
       ljam();
 /* ---------------------------------------------------------------- */
@@ -176,7 +176,7 @@
 /*       ARE MAINTAINED EVEN AFTER A SYSTEM CRASH.                  */
 /* ---------------------------------------------------------------- */
     ndbrequire(regPagePtr->page_state == ZTH_MM_FREE);
-    LocalDLList<Page> free_pages(c_page_pool, regFragPtr->thFreeFirst);    
+    LocalDLFifoList<Page> free_pages(c_page_pool, regFragPtr->thFreeFirst);    
     free_pages.remove((Page*)regPagePtr);
     regPagePtr->page_state = ZTH_MM_FULL;
   }
@@ -196,10 +196,10 @@
   {
     ljam();
     PagePtr pagePtr = { (Page*)regPagePtr, key->m_page_no };
-    LocalDLList<Page> free_pages(c_page_pool, regFragPtr->thFreeFirst);    
+    LocalDLFifoList<Page> free_pages(c_page_pool, regFragPtr->thFreeFirst);    
     ndbrequire(regPagePtr->page_state == ZTH_MM_FULL);
     regPagePtr->page_state = ZTH_MM_FREE;
-    free_pages.add(pagePtr);
+    free_pages.addLast(pagePtr);
   } 
 }//Dbtup::freeTh()
 
@@ -227,13 +227,13 @@
   c_page_pool.getPtr(pagePtr, getRealpid(fragPtrP, page_no));
   
   LocalDLList<Page> alloc_pages(c_page_pool, fragPtrP->emptyPrimPage);
-  LocalDLList<Page> free_pages(c_page_pool, fragPtrP->thFreeFirst);
+  LocalDLFifoList<Page> free_pages(c_page_pool, fragPtrP->thFreeFirst);
   if (pagePtr.p->page_state == ZEMPTY_MM)
   {
     convertThPage((Fix_page*)pagePtr.p, tabPtrP, MM);
     pagePtr.p->page_state = ZTH_MM_FREE;
     alloc_pages.remove(pagePtr);
-    free_pages.add(pagePtr);
+    free_pages.addFirst(pagePtr);
   }
   
   *ret = pagePtr;
@@ -257,7 +257,7 @@
   }
 
   Uint32 state = pagePtr.p->page_state;
-  LocalDLList<Page> free_pages(c_page_pool, regFragPtr->thFreeFirst);
+  LocalDLFifoList<Page> free_pages(c_page_pool, regFragPtr->thFreeFirst);
   switch(state){
   case ZTH_MM_FREE:
     if (((Fix_page*)pagePtr.p)->alloc_record(idx) != idx)

--- 1.11/storage/ndb/src/kernel/blocks/dbtup/DbtupPageMap.cpp	2007-04-02 09:29:08 +02:00
+++ 1.12/storage/ndb/src/kernel/blocks/dbtup/DbtupPageMap.cpp	2007-04-26 13:41:31 +02:00
@@ -295,7 +295,7 @@
       }
 
       {
-	LocalDLList<Page> tmp(c_page_pool, regFragPtr->thFreeFirst);
+	LocalDLFifoList<Page> tmp(c_page_pool, regFragPtr->thFreeFirst);
 	tmp.remove();
       }
 

--- 1.11/storage/ndb/src/kernel/vm/DLFifoList.hpp	2006-12-23 20:20:19 +01:00
+++ 1.12/storage/ndb/src/kernel/vm/DLFifoList.hpp	2007-04-26 13:41:31 +02:00
@@ -62,8 +62,9 @@
    */
   void insert(Ptr<T> & ptr, Ptr<T>& loc);
   
+  void remove();
   void remove(Ptr<T> &);
-  
+  void remove(T*);
   /**
    *  Update i & p value according to <b>i</b>
    */
@@ -277,9 +278,25 @@
 template <typename P, typename T, typename U>
 inline
 void
+DLFifoListImpl<P,T,U>::remove()
+{
+  head.firstItem = RNIL;
+  head.lastItem = RNIL;
+}
+
+template <typename P, typename T, typename U>
+inline
+void
 DLFifoListImpl<P,T,U>::remove(Ptr<T> & p)
 {
-  T * t = p.p;
+  remove(p.p);
+}
+
+template <typename P, typename T, typename U>
+inline
+void
+DLFifoListImpl<P,T,U>::remove(T * t)
+{
   Uint32 ni = t->U::nextList;
   Uint32 pi = t->U::prevList;
 
@@ -328,7 +345,7 @@
 void 
 DLFifoListImpl<P,T,U>::release(Ptr<T> & p)
 {
-  remove(p);
+  remove(p.p);
   thePool.release(p);
 }
 
Thread
bk commit into 5.1 tree (tomas:1.2464) BUG#27205tomas26 Apr