MySQL Lists are EOL. Please join:

List:Commits« Previous MessageNext Message »
From:Magnus Blåudd Date:June 15 2010 9:18am
Subject:bzr push into mysql-5.1-telco-7.0 branch (magnus.blaudd:3596 to 3597)
View as plain text  
 3597 Magnus Blåudd	2010-06-15 [merge]
      Merge

    modified:
      storage/ndb/test/ndbapi/testNodeRestart.cpp
      storage/ndb/test/ndbapi/testPartitioning.cpp
 3596 Jonas Oreland	2010-06-14
      ndb - bug#54497 - check that newly added nodegroup includes "me" in Suma::CREATE_NODEGROUP_IMPL_REQ

    modified:
      storage/ndb/src/kernel/blocks/suma/Suma.cpp
=== modified file 'storage/ndb/test/ndbapi/testNodeRestart.cpp'
--- a/storage/ndb/test/ndbapi/testNodeRestart.cpp	2010-03-19 14:15:57 +0000
+++ b/storage/ndb/test/ndbapi/testNodeRestart.cpp	2010-06-14 12:51:24 +0000
@@ -1643,7 +1643,7 @@ runBug27003(NDBT_Context* ctx, NDBT_Step
   {
     while (errnos[pos] != 0)
     {
-      ndbout_c("Tesing err: %d", errnos[pos]);
+      ndbout_c("Testing err: %d", errnos[pos]);
       
       if (res.waitNodesNoStart(&node, 1))
 	return NDBT_FAILED;
@@ -1699,7 +1699,7 @@ runBug27283(NDBT_Context* ctx, NDBT_Step
       //int next2 = res.getNextMasterNodeId(next);
       
       //int node = (i & 1) ? next : next2;
-      ndbout_c("Tesing err: %d", errnos[pos]);
+      ndbout_c("Testing err: %d", errnos[pos]);
       if (res.insertErrorInNode(next, errnos[pos]))
 	return NDBT_FAILED;
 

=== modified file 'storage/ndb/test/ndbapi/testPartitioning.cpp'
--- a/storage/ndb/test/ndbapi/testPartitioning.cpp	2009-11-17 13:10:09 +0000
+++ b/storage/ndb/test/ndbapi/testPartitioning.cpp	2010-06-15 09:04:11 +0000
@@ -785,18 +785,34 @@ load_dist_table(Ndb* pNdb, int records, 
     NdbTransaction* trans= pNdb->startTransaction();
     CHECKNOTNULL(trans, pNdb);
 
-    int& dKeyVal= *((int*) NdbDictionary::getValuePtr(distRecord,
-                                                      buf,
-                                                      tab->getColumn(DistTabDKeyCol)->getAttrId()));
-    int& pKey2Val= *((int*) NdbDictionary::getValuePtr(distRecord,
-                                                      buf,
-                                                      tab->getColumn(DistTabPKey2Col)->getAttrId()));
-    int& resultVal=  *((int*) NdbDictionary::getValuePtr(distRecord,
-                                                      buf,
-                                                      tab->getColumn(DistTabResultCol)->getAttrId()));
-    dKeyVal= r % parts;
-    pKey2Val= r;
-    resultVal= r*r;
+    {
+      const int dKeyVal= r % parts;
+      const Uint32 dKeyAttrid= tab->getColumn(DistTabDKeyCol)->getAttrId();
+      memcpy(NdbDictionary::getValuePtr(distRecord, buf,
+                                        dKeyAttrid),
+             &dKeyVal, sizeof(dKeyVal));
+    }
+
+    {
+      const int pKey2Val= r;
+      const Uint32 pKey2Attrid= tab->getColumn(DistTabPKey2Col)->getAttrId();
+      memcpy(NdbDictionary::getValuePtr(distRecord, buf,
+                                        pKey2Attrid),
+             &pKey2Val, sizeof(pKey2Val));
+    }
+
+    {
+      const int resultVal= r*r;
+      const Uint32 resultValAttrid=
+        tab->getColumn(DistTabResultCol)->getAttrId();
+      memcpy(NdbDictionary::getValuePtr(distRecord, buf,
+                                        resultValAttrid),
+             &resultVal, sizeof(resultVal));
+
+      // set not NULL
+      NdbDictionary::setNull(distRecord, buf, resultValAttrid, false);
+    }
+
 
     NdbOperation::OperationOptions opts;
     opts.optionsPresent= 0;
@@ -1177,7 +1193,12 @@ run_dist_test(NDBT_Context* ctx, NDBT_St
     ->getTable(DistTabName)
     ->getFragmentCount();
   int numDkeyValues= 2*numTabPartitions + (rand() % 6);
-  
+  if (numDkeyValues > records)
+  {
+    // limit number of distributions keys to number of records
+    numDkeyValues = records;
+  }
+
   ndbout << "Table has " << numTabPartitions
          << " physical partitions" << endl;
   ndbout << "Testing with " << numDkeyValues 

Attachment: [text/bzr-bundle] bzr/magnus.blaudd@sun.com-20100615090935-ekk0k78ydvxmawgk.bundle
Thread
bzr push into mysql-5.1-telco-7.0 branch (magnus.blaudd:3596 to 3597)Magnus Blåudd15 Jun