List:Commits« Previous MessageNext Message »
From:jonas Date:February 21 2007 4:33pm
Subject:bk commit into 5.1 tree (jonas:1.2418) BUG#26514
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@stripped, 2007-02-21 16:33:16+01:00, jonas@eel.(none) +4 -0
  ndb - bug#26514
    fix overflow that could occur when have either lots of dd-data or very high
dd-parallelism

  storage/ndb/src/kernel/vm/RWPool.cpp@stripped, 2007-02-21 16:33:12+01:00, jonas@eel.(none) +9
-5
    Add define for sizeof WOPage
    Make sure correct size is used when checking for end of page

  storage/ndb/src/kernel/vm/RWPool.hpp@stripped, 2007-02-21 16:33:13+01:00, jonas@eel.(none) +3
-1
    Add define for sizeof RWPage

  storage/ndb/src/kernel/vm/WOPool.cpp@stripped, 2007-02-21 16:33:13+01:00, jonas@eel.(none) +1
-1
    Add define for sizeof WOPage
    Make sure correct size is used when checking for end of page

  storage/ndb/src/kernel/vm/WOPool.hpp@stripped, 2007-02-21 16:33:13+01:00, jonas@eel.(none) +4
-2
    Add define for sizeof WOPage
    Make sure correct size is used when checking for end of page

# 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/51-work

--- 1.3/storage/ndb/src/kernel/vm/RWPool.cpp	2007-02-21 16:33:28 +01:00
+++ 1.4/storage/ndb/src/kernel/vm/RWPool.cpp	2007-02-21 16:33:28 +01:00
@@ -22,7 +22,7 @@
 RWPool::RWPool() 
 {
   bzero(this, sizeof(* this));
-  m_current_pos = GLOBAL_PAGE_SIZE_WORDS;
+  m_current_pos = RWPage::RWPAGE_WORDS;
   m_current_first_free = REC_NIL;
   m_first_free_page = RNIL;
 }
@@ -57,7 +57,7 @@
     m_current_first_free = pageP->m_data[pos+m_record_info.m_offset_next_pool];
     return true;
   }
-  else if (pos + size < GLOBAL_PAGE_SIZE_WORDS)
+  else if (pos + size < RWPage::RWPAGE_WORDS)
   {
 seize_first:
     ptr.i = (m_current_page_no << POOL_RECORD_BITS) + pos;
@@ -81,11 +81,14 @@
   {
     pageP = m_current_page = m_memroot + m_first_free_page;
     m_current_page_no = m_first_free_page;
-    m_current_pos = GLOBAL_PAGE_SIZE_WORDS;
+    m_current_pos = RWPage::RWPAGE_WORDS;
     m_current_first_free = m_current_page->m_first_free;
     m_first_free_page = m_current_page->m_next_page;
     m_current_ref_count = m_current_page->m_ref_count;
-    (m_memroot + m_first_free_page)->m_prev_page = RNIL;
+    if (m_first_free_page != RNIL)
+    {
+      (m_memroot + m_first_free_page)->m_prev_page = RNIL;
+    }
     goto seize_free;
   }
 
@@ -105,7 +108,7 @@
 
   m_current_page = 0;
   m_current_page_no = RNIL;
-  m_current_pos = GLOBAL_PAGE_SIZE_WORDS;
+  m_current_pos = RWPage::RWPAGE_WORDS;
   m_current_first_free = REC_NIL;
   
   return false;
@@ -154,6 +157,7 @@
       }
       page->m_next_page = ffp;
       page->m_prev_page = RNIL;
+      m_first_free_page = ptr_page;
       return;
     }
     else if(ref_cnt == 1)

--- 1.4/storage/ndb/src/kernel/vm/RWPool.hpp	2007-02-21 16:33:28 +01:00
+++ 1.5/storage/ndb/src/kernel/vm/RWPool.hpp	2007-02-21 16:33:28 +01:00
@@ -20,12 +20,14 @@
 
 struct RWPage
 {
+  STATIC_CONST( RWPAGE_WORDS = GLOBAL_PAGE_SIZE_WORDS - 4 );
+
   Uint32 m_type_id;
   Uint16 m_first_free;
   Uint16 m_ref_count;
   Uint32 m_next_page;
   Uint32 m_prev_page;
-  Uint32 m_data[GLOBAL_PAGE_SIZE_WORDS - 4];
+  Uint32 m_data[RWPAGE_WORDS];
 };
 
 /**

--- 1.3/storage/ndb/src/kernel/vm/WOPool.cpp	2007-02-21 16:33:28 +01:00
+++ 1.4/storage/ndb/src/kernel/vm/WOPool.cpp	2007-02-21 16:33:28 +01:00
@@ -20,7 +20,7 @@
 WOPool::WOPool() 
 {
   bzero(this, sizeof(* this));
-  m_current_pos = GLOBAL_PAGE_SIZE_WORDS;
+  m_current_pos = WOPage::WOPAGE_WORDS;
 }
 
 void

--- 1.5/storage/ndb/src/kernel/vm/WOPool.hpp	2007-02-21 16:33:28 +01:00
+++ 1.6/storage/ndb/src/kernel/vm/WOPool.hpp	2007-02-21 16:33:28 +01:00
@@ -20,9 +20,11 @@
 
 struct WOPage
 {
+  STATIC_CONST( WOPAGE_WORDS = GLOBAL_PAGE_SIZE_WORDS - 2 );
+
   Uint32 m_type_id;
   Uint32 m_ref_count;
-  Uint32 m_data[GLOBAL_PAGE_SIZE_WORDS - 2];
+  Uint32 m_data[WOPAGE_WORDS];
 };
 
 /**
@@ -61,7 +63,7 @@
   Uint32 pos = m_current_pos;
   Uint32 size = m_record_info.m_size;
   WOPage *pageP = m_current_page;
-  if (likely(pos + size < GLOBAL_PAGE_SIZE_WORDS))
+  if (likely(pos + size < WOPage::WOPAGE_WORDS))
   {
     ptr.i = (m_current_page_no << POOL_RECORD_BITS) + pos;
     ptr.p = (pageP->m_data + pos);
Thread
bk commit into 5.1 tree (jonas:1.2418) BUG#26514jonas21 Feb