List:Commits« Previous MessageNext Message »
From:tomas Date:May 22 2007 5:53pm
Subject:bk commit into 5.1 tree (tomas:1.2469) BUG#28593
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-05-22 17:53:07+02:00, tomas@stripped +5 -0
  Bug #28593 cluster backup scans in acc index order, bad for disk data
  - change to scan in tup and disk order (if applicable)

  storage/ndb/src/kernel/blocks/backup/Backup.cpp@stripped, 2007-05-22 17:53:04+02:00,
tomas@stripped +1 -1
    tup scan for backup also, not only lcp

  storage/ndb/src/kernel/blocks/dblqh/DblqhMain.cpp@stripped, 2007-05-22 17:53:04+02:00,
tomas@stripped +26 -3
    choose disk order scan for disktables during backup
    + move bug workaround for 27776 from tup to lqh

  storage/ndb/src/kernel/blocks/dbtup/DbtupDiskAlloc.cpp@stripped, 2007-05-22 17:53:04+02:00,
tomas@stripped +18 -3
    add missing jamEntry

  storage/ndb/src/kernel/blocks/dbtup/DbtupScan.cpp@stripped, 2007-05-22 17:53:04+02:00,
tomas@stripped +0 -2
    move bug workaround for 27776 from tup to lqh

  storage/ndb/src/kernel/blocks/pgman.cpp@stripped, 2007-05-22 17:53:04+02:00,
tomas@stripped +2 -0
    missing jamEntry

# 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.21/storage/ndb/src/kernel/blocks/dbtup/DbtupDiskAlloc.cpp	2007-01-15 21:05:11 +01:00
+++ 1.22/storage/ndb/src/kernel/blocks/dbtup/DbtupDiskAlloc.cpp	2007-05-22 17:53:04 +02:00
@@ -318,6 +318,7 @@
     unsigned uncommitted, committed;
     uncommitted = committed = ~(unsigned)0;
     int ret = tsman.get_page_free_bits(&page, &uncommitted, &committed);
+    jamEntry();
     
     idx = alloc.calc_page_free_bits(real_free);
     ddassert(idx == committed);
@@ -428,12 +429,12 @@
     c_extent_pool.getPtr(ext);
     if ((pageBits= tsman.alloc_page_from_extent(&ext.p->m_key, bits)) >= 0) 
     {
-      jam();
+      jamEntry();
       found= true;
     }
     else
     {
-      jam();
+      jamEntry();
       /**
        * The current extent is not in a free list
        *   and since it couldn't accomadate the request
@@ -490,7 +491,7 @@
       
       if ((err= tsman.alloc_extent(&ext.p->m_key)) < 0)
       {
-	jam();
+	jamEntry();
 #if NOT_YET_UNDO_ALLOC_EXTENT
 	c_lgman->free_log_space(logfile_group_id, 
 				sizeof(Disk_undo::AllocExtent)>>2);
@@ -542,6 +543,7 @@
     alloc.m_curr_extent_info_ptr_i= ext.i;
     ext.p->m_free_matrix_pos= RNIL;
     pageBits= tsman.alloc_page_from_extent(&ext.p->m_key, bits);
+    jamEntry();
     ddassert(pageBits >= 0);
   }
   
@@ -601,6 +603,7 @@
   }
   
   int res= m_pgman.get_page(signal, preq, flags);
+  jamEntry();
   switch(res)
   {
   case 0:
@@ -900,6 +903,7 @@
   
   // Make sure no one will allocate it...
   tsman.unmap_page(&key, MAX_FREE_LIST - 1);
+  jamEntry();
 }
 
 void
@@ -951,6 +955,7 @@
 			    fragPtr.p->m_tablespace_id);
     
     tsman.unmap_page(&key, idx);
+    jamEntry();
     pagePtr.p->list_index = idx | 0x8000;
   }
     
@@ -999,6 +1004,7 @@
 			    fragPtrP->m_tablespace_id);
     
     tsman.update_page_free_bits(key, new_bits, lsn);
+    jamEntry();
   }
 }
 
@@ -1051,6 +1057,7 @@
 			    fragPtrP->m_tablespace_id);
     
     tsman.update_page_free_bits(key, new_bits, lsn);
+    jamEntry();
   }
 
   Uint32 ext = pagePtr.p->m_extent_info_ptr;
@@ -1104,6 +1111,7 @@
   memcpy(&req.m_page, key, sizeof(Local_key));
 
   int res= m_pgman.get_page(signal, req, flags);
+  jamEntry();
   switch(res)
   {
   case 0:
@@ -1232,6 +1240,7 @@
   Uint64 lsn= lgman.add_entry(c, 1);
   
   tsman.update_lsn(&key, lsn);
+  jamEntry();
 }
 #endif
 
@@ -1250,6 +1259,7 @@
   
   Uint64 lsn= lgman.add_entry(c, 1);
   m_pgman.update_lsn(* key, lsn);
+  jamEntry();
 
   return lsn;
 }
@@ -1279,6 +1289,7 @@
     
   Uint64 lsn= lgman.add_entry(c, 3);
   m_pgman.update_lsn(* key, lsn);
+  jamEntry();
 
   return lsn;
 }
@@ -1308,6 +1319,7 @@
   
   Uint64 lsn= lgman.add_entry(c, 3);
   m_pgman.update_lsn(* key, lsn);
+  jamEntry();
 
   return lsn;
 }
@@ -1402,6 +1414,7 @@
   
   int flags = 0;
   int res= m_pgman.get_page(signal, preq, flags);
+  jamEntry();
   switch(res)
   {
   case 0:
@@ -1545,6 +1558,7 @@
     lsn = undo->m_lsn - 1; // make sure undo isn't run again...
     
     m_pgman.update_lsn(undo->m_key, lsn);
+    jamEntry();
   }
   else if (DBG_UNDO)
   {
@@ -1637,6 +1651,7 @@
 			  fragPtrP->m_tablespace_id);
   
   tsman.restart_undo_page_free_bits(&undo->m_key, new_bits, undo->m_lsn, lsn);
+  jamEntry();
 }
 
 int

--- 1.20/storage/ndb/src/kernel/blocks/pgman.cpp	2007-01-15 21:05:11 +01:00
+++ 1.21/storage/ndb/src/kernel/blocks/pgman.cpp	2007-05-22 17:53:04 +02:00
@@ -1561,6 +1561,7 @@
 int
 Pgman::get_page(Signal* signal, Ptr<Page_entry> ptr, Page_request page_req)
 {
+  jamEntry();
 #ifdef VM_TRACE
   Ptr<Page_request> tmp = { &page_req, RNIL};
   debugOut << "PGMAN: >get_page" << endl;
@@ -1708,6 +1709,7 @@
 void
 Pgman::update_lsn(Ptr<Page_entry> ptr, Uint32 block, Uint64 lsn)
 {
+  jamEntry();
 #ifdef VM_TRACE
   const char* bname = getBlockName(block, "?");
   debugOut << "PGMAN: >update_lsn: block=" << bname << " lsn="
<< lsn << endl;

--- 1.62/storage/ndb/src/kernel/blocks/backup/Backup.cpp	2006-12-27 14:16:05 +01:00
+++ 1.63/storage/ndb/src/kernel/blocks/backup/Backup.cpp	2007-05-22 17:53:04 +02:00
@@ -3543,10 +3543,10 @@
     ScanFragReq::setHoldLockFlag(req->requestInfo, 0);
     ScanFragReq::setKeyinfoFlag(req->requestInfo, 0);
     ScanFragReq::setAttrLen(req->requestInfo,attrLen); 
+    ScanFragReq::setTupScanFlag(req->requestInfo, 1);
     if (ptr.p->is_lcp())
     {
       ScanFragReq::setScanPrio(req->requestInfo, 1);
-      ScanFragReq::setTupScanFlag(req->requestInfo, 1);
       ScanFragReq::setNoDiskFlag(req->requestInfo, 1);
       ScanFragReq::setLcpScanFlag(req->requestInfo, 1);
     }

--- 1.136/storage/ndb/src/kernel/blocks/dblqh/DblqhMain.cpp	2007-04-26 08:34:35 +02:00
+++ 1.137/storage/ndb/src/kernel/blocks/dblqh/DblqhMain.cpp	2007-05-22 17:53:04 +02:00
@@ -8476,9 +8476,32 @@
   AccScanReq::setLockMode(req->requestInfo, scanptr.p->scanLockMode);
   AccScanReq::setReadCommittedFlag(req->requestInfo, scanptr.p->readCommitted);
   AccScanReq::setDescendingFlag(req->requestInfo, scanptr.p->descending);
-  AccScanReq::setNoDiskScanFlag(req->requestInfo, 
-				!tcConnectptr.p->m_disk_table);
-  AccScanReq::setLcpScanFlag(req->requestInfo, scanptr.p->lcpScan);
+
+  if (refToBlock(tcConnectptr.p->clientBlockref) == BACKUP)
+  {
+    if (scanptr.p->lcpScan)
+    {
+      AccScanReq::setNoDiskScanFlag(req->requestInfo, 1);
+      AccScanReq::setLcpScanFlag(req->requestInfo, 1);
+    }
+    else
+    {
+      /* If backup scan disktables in disk order */
+      AccScanReq::setNoDiskScanFlag(req->requestInfo,
+                                    !tcConnectptr.p->m_disk_table);
+      AccScanReq::setLcpScanFlag(req->requestInfo, 0);
+    }
+  }
+  else
+  {
+#if BUG_27776_FIXED
+    AccScanReq::setNoDiskScanFlag(req->requestInfo,
+                                  !tcConnectptr.p->m_disk_table);
+#else
+    AccScanReq::setNoDiskScanFlag(req->requestInfo, 1);
+#endif
+    AccScanReq::setLcpScanFlag(req->requestInfo, 0);
+  }
   
   req->transId1 = tcConnectptr.p->transid[0];
   req->transId2 = tcConnectptr.p->transid[1];

--- 1.20/storage/ndb/src/kernel/blocks/dbtup/DbtupScan.cpp	2007-04-24 09:53:28 +02:00
+++ 1.21/storage/ndb/src/kernel/blocks/dbtup/DbtupScan.cpp	2007-05-22 17:53:04 +02:00
@@ -62,13 +62,11 @@
 	break;
       }
 
-#if BUG_27776_FIXED
       if (!AccScanReq::getNoDiskScanFlag(req->requestInfo)
 	  && tablePtr.p->m_no_of_disk_attributes)
       {
 	bits |= ScanOp::SCAN_DD;
       }
-#endif
       
       bool mm = (bits & ScanOp::SCAN_DD);
       if (tablePtr.p->m_attributes[mm].m_no_of_varsize > 0) {
Thread
bk commit into 5.1 tree (tomas:1.2469) BUG#28593tomas22 May