MySQL Lists are EOL. Please join:

List:Commits« Previous MessageNext Message »
From:Jonas Oreland Date:December 21 2009 12:37pm
Subject:bzr commit into mysql-5.1-telco-6.2 branch (jonas:3065) Bug#48431
View as plain text  
#At file:///home/jonas/src/telco-6.2/ based on revid:magnus.blaudd@stripped

 3065 Jonas Oreland	2009-12-21
      ndb - bug#48431 - limit #pages written to out-file, when crashing in DbtupDiskAlloc

    modified:
      storage/ndb/src/kernel/blocks/dbtup/DbtupDiskAlloc.cpp
=== modified file 'storage/ndb/src/kernel/blocks/dbtup/DbtupDiskAlloc.cpp'
--- a/storage/ndb/src/kernel/blocks/dbtup/DbtupDiskAlloc.cpp	2009-09-04 15:19:41 +0000
+++ b/storage/ndb/src/kernel/blocks/dbtup/DbtupDiskAlloc.cpp	2009-12-21 12:37:28 +0000
@@ -94,6 +94,7 @@ check_free(const Dbtup::Extent_info* ext
 void 
 Dbtup::dump_disk_alloc(Dbtup::Disk_alloc_info & alloc)
 {
+  const Uint32 limit = 512;
   ndbout_c("dirty pages");
   for(Uint32 i = 0; i<MAX_FREE_LIST; i++)
   {
@@ -101,10 +102,15 @@ Dbtup::dump_disk_alloc(Dbtup::Disk_alloc
     PagePtr ptr;
     ArrayPool<Page> *pool= (ArrayPool<Page>*)&m_global_page_pool;
     LocalDLList<Page> list(*pool, alloc.m_dirty_pages[i]);
-    for(list.first(ptr); !ptr.isNull(); list.next(ptr))
+    Uint32 c = 0;
+    for (list.first(ptr); c < limit && !ptr.isNull(); c++, list.next(ptr))
     {
       ndbout << ptr << " ";
     }
+    if (c == limit)
+    {
+      ndbout << "MAXLIMIT ";
+    }
     ndbout_c(" ");
   }
   ndbout_c("page requests");
@@ -114,10 +120,15 @@ Dbtup::dump_disk_alloc(Dbtup::Disk_alloc
     Ptr<Page_request> ptr;
     Local_page_request_list list(c_page_request_pool, 
 				 alloc.m_page_requests[i]);
-    for(list.first(ptr); !ptr.isNull(); list.next(ptr))
+    Uint32 c = 0;
+    for (list.first(ptr); c < limit && !ptr.isNull(); c++, list.next(ptr))
     {
       ndbout << ptr << " ";
     }
+    if (c == limit)
+    {
+      ndbout << "MAXLIMIT ";
+    }
     ndbout_c(" ");
   }
 
@@ -127,10 +138,15 @@ Dbtup::dump_disk_alloc(Dbtup::Disk_alloc
     printf("  %d : ", i);
     Ptr<Extent_info> ptr;
     Local_extent_info_list list(c_extent_pool, alloc.m_free_extents[i]);
-    for(list.first(ptr); !ptr.isNull(); list.next(ptr))
+    Uint32 c = 0;
+    for (list.first(ptr); c < limit && !ptr.isNull(); c++, list.next(ptr))
     {
       ndbout << ptr << " ";
     }
+    if (c == limit)
+    {
+      ndbout << "MAXLIMIT ";
+    }
     ndbout_c(" ");
   }
 


Attachment: [text/bzr-bundle] bzr/jonas@mysql.com-20091221123728-p1uf13cjh8mdwjlj.bundle
Thread
bzr commit into mysql-5.1-telco-6.2 branch (jonas:3065) Bug#48431Jonas Oreland21 Dec