List:Commits« Previous MessageNext Message »
From:jonas oreland Date:May 27 2011 3:18pm
Subject:bzr commit into mysql-5.1-telco-7.1 branch (jonas:4230)
View as plain text  
#At file:///home/jonas/src/telco-7.1/ based on revid:craig.russell@stripped

 4230 jonas oreland	2011-05-27 [merge]
      ndb - merge 70 to 71

    modified:
      storage/ndb/src/kernel/blocks/dblqh/DblqhMain.cpp
      storage/ndb/src/ndbapi/NdbQueryOperation.cpp
      storage/ndb/test/run-test/daily-basic-tests.txt
      storage/ndb/test/run-test/daily-devel-tests.txt
=== modified file 'storage/ndb/src/kernel/blocks/dblqh/DblqhMain.cpp'
--- a/storage/ndb/src/kernel/blocks/dblqh/DblqhMain.cpp	2011-05-25 14:35:46 +0000
+++ b/storage/ndb/src/kernel/blocks/dblqh/DblqhMain.cpp	2011-05-27 15:17:53 +0000
@@ -10131,7 +10131,11 @@ Dblqh::seize_acc_ptr_list(ScanRecord* sc
   Uint32 segments= (new_batch_size + (SectionSegment::DataLength -2 )) / 
     SectionSegment::DataLength;
 
-  ndbassert(segments >= scanP->scan_acc_segments);
+  if (segments <= scanP->scan_acc_segments)
+  {
+    // No need to allocate more segments.
+    return true;
+  }
 
   if (new_batch_size > 1)
   {

=== modified file 'storage/ndb/src/ndbapi/NdbQueryOperation.cpp'
--- a/storage/ndb/src/ndbapi/NdbQueryOperation.cpp	2011-05-11 13:31:44 +0000
+++ b/storage/ndb/src/ndbapi/NdbQueryOperation.cpp	2011-05-26 14:44:59 +0000
@@ -3186,18 +3186,19 @@ NdbQueryImpl::OrderedFragSet::reorganize
     while(first<last)
     {
       assert(middle<m_activeFragCount);
-      switch(compare(*m_activeFrags[m_activeFragCount-1], 
-                     *m_activeFrags[middle]))
+      const int cmpRes = compare(*m_activeFrags[m_activeFragCount-1], 
+                                 *m_activeFrags[middle]);
+      if (cmpRes < 0)
       {
-      case -1:
         first = middle + 1;
-        break;
-      case 0:
+      }
+      else if (cmpRes == 0)
+      {
         last = first = middle;
-        break;
-      case 1:
+      }
+      else
+      {
         last = middle;
-        break;
       }
       middle = (first+last)/2;
     }
@@ -3246,7 +3247,7 @@ NdbQueryImpl::OrderedFragSet::add(NdbRoo
       int current = 0;
       // Insert the new frag such that the array remains sorted.
       while(current<m_activeFragCount && 
-            compare(frag, *m_activeFrags[current])==-1)
+            compare(frag, *m_activeFrags[current]) < 0)
       {
         current++;
       }
@@ -3290,7 +3291,7 @@ NdbQueryImpl::OrderedFragSet::verifySort
 {
   for(int i = 0; i<m_activeFragCount-2; i++)
   {
-    if(compare(*m_activeFrags[i], *m_activeFrags[i+1])==-1)
+    if(compare(*m_activeFrags[i], *m_activeFrags[i+1]) < 0)
     {
       assert(false);
       return false;
@@ -3303,7 +3304,7 @@ NdbQueryImpl::OrderedFragSet::verifySort
 /**
  * Compare frags such that f1<f2 if f1 is empty but f2 is not.
  * - Othewise compare record contents.
- * @return -1 if frag1<frag2, 0 if frag1 == frag2, otherwise 1.
+ * @return negative if frag1<frag2, 0 if frag1 == frag2, otherwise positive.
 */
 int
 NdbQueryImpl::OrderedFragSet::compare(const NdbRootFragment& frag1,

=== modified file 'storage/ndb/test/run-test/daily-basic-tests.txt'
--- a/storage/ndb/test/run-test/daily-basic-tests.txt	2011-05-17 23:29:55 +0000
+++ b/storage/ndb/test/run-test/daily-basic-tests.txt	2011-05-27 07:53:31 +0000
@@ -1719,3 +1719,16 @@ max-time: 600
 cmd: testNodeRestart
 args: -n ClusterSplitLatency T1
 
+# Refresh tuple
+max-time: 300
+cmd: testBasic
+args: -n RefreshTuple T6 D1
+
+max-time: 300
+cmd: testIndex
+args: -n RefreshWithOrderedIndex T2 D2
+
+max-time: 300
+cmd: testBasic
+args: -n RefreshLocking D1
+

=== modified file 'storage/ndb/test/run-test/daily-devel-tests.txt'
--- a/storage/ndb/test/run-test/daily-devel-tests.txt	2011-05-25 13:19:02 +0000
+++ b/storage/ndb/test/run-test/daily-devel-tests.txt	2011-05-27 07:53:31 +0000
@@ -129,16 +129,3 @@ max-time: 1800
 cmd: testDict
 args: -n SchemaTrans -l 1
 
-# Refresh tuple
-max-time: 300
-cmd: testBasic
-args: -n RefreshTuple T6 D1
-
-max-time: 300
-cmd: testIndex
-args: -n RefreshWithOrderedIndex T2 D2
-
-max-time: 300
-cmd: testBasic
-args: -n RefreshLocking D1
-

No bundle (reason: revision is a merge).
Thread
bzr commit into mysql-5.1-telco-7.1 branch (jonas:4230) jonas oreland27 May