List:Internals« Previous MessageNext Message »
From:mikael Date:May 13 2005 1:18pm
Subject:bk commit into 5.1 tree (mronstrom:1.1828)
View as plain text  
Below is the list of changes that have just been committed into a local
5.1 repository of mikron. When mikron 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
  1.1828 05/05/13 15:17:54 mronstrom@stripped +6 -0
  Made node and node group array endian independent

  storage/ndb/src/ndbapi/NdbDictionaryImpl.cpp
    1.78 05/05/13 15:17:31 mronstrom@stripped +3 -3
    Made node and node group array endian independent

  storage/ndb/src/kernel/blocks/dbdih/DbdihMain.cpp
    1.28 05/05/13 15:17:31 mronstrom@stripped +14 -14
    Made node and node group array endian independent

  storage/ndb/src/kernel/blocks/dbdict/Dbdict.cpp
    1.46 05/05/13 15:17:30 mronstrom@stripped +1 -1
    Made node and node group array endian independent

  storage/ndb/include/kernel/signaldata/DictTabInfo.hpp
    1.20 05/05/13 15:17:30 mronstrom@stripped +1 -1
    Made node and node group array endian independent

  sql/handler.h
    1.152 05/05/13 15:17:30 mronstrom@stripped +1 -1
    Made node and node group array endian independent

  sql/ha_ndbcluster.cc
    1.183 05/05/13 15:17:29 mronstrom@stripped +1 -1
    Made node and node group array endian independent

# 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:	mronstrom
# Host:	mikael-ronstr-ms-dator.local
# Root:	/Users/mikron/wl1354

--- 1.151/sql/handler.h	Thu May 12 16:15:50 2005
+++ 1.152/sql/handler.h	Fri May 13 15:17:30 2005
@@ -390,7 +390,7 @@
   enum db_type engine_type;
   Item* range_expr;
   List<Item> list_expr_list;
-  uint nodegroup_id;
+  uint16 nodegroup_id;
   char* part_comment;
   char* data_file_name;
   char* index_file_name;

--- 1.19/storage/ndb/include/kernel/signaldata/DictTabInfo.hpp	Sat May  7 10:45:42 2005
+++ 1.20/storage/ndb/include/kernel/signaldata/DictTabInfo.hpp	Fri May 13 15:17:30 2005
@@ -261,7 +261,7 @@
     char   FrmData[MAX_FRM_DATA_SIZE];
     Uint32 FragmentCount;
     Uint32 FragmentDataLen;
-    Uint32 FragmentData[(MAX_FRAGMENT_DATA_BYTES+3)/4];
+    Uint16 FragmentData[(MAX_FRAGMENT_DATA_BYTES+1)/2];
     
     void init();
   };

--- 1.45/storage/ndb/src/kernel/blocks/dbdict/Dbdict.cpp	Thu May 12 12:43:18 2005
+++ 1.46/storage/ndb/src/kernel/blocks/dbdict/Dbdict.cpp	Fri May 13 15:17:30 2005
@@ -277,7 +277,7 @@
     if(signal->theData[0] == 0)
     {
       Uint16 *data = (Uint16*)&signal->theData[25];
-      Uint32 count = 2 + data[0] * data[1];
+      Uint32 count = 2 + uint2korr(data) * uint2korr(data+1);
       w.add(DictTabInfo::FragmentDataLen, 2*count);
       w.add(DictTabInfo::FragmentData, data, 2*count);
     }

--- 1.27/storage/ndb/src/kernel/blocks/dbdih/DbdihMain.cpp	Sat May  7 10:45:45 2005
+++ 1.28/storage/ndb/src/kernel/blocks/dbdih/DbdihMain.cpp	Fri May 13 15:17:31 2005
@@ -6173,26 +6173,26 @@
   Uint32 err = 0;
   
   do {
-    Uint32 noOfFragments = 0;
+    Uint16 noOfFragments = 0;
     if (fragmentCount == 0)
     {
       jam();
       switch(fragmentType){
       case DictTabInfo::AllNodesSmallTable:
         jam();
-        noOfFragments = csystemnodes;
+        noOfFragments = (Uint16)csystemnodes;
         break;
       case DictTabInfo::AllNodesMediumTable:
         jam();
-        noOfFragments = 2 * csystemnodes;
+        noOfFragments = (Uint16)(2 * csystemnodes);
         break;
       case DictTabInfo::AllNodesLargeTable:
         jam();
-        noOfFragments = 4 * csystemnodes;
+        noOfFragments = (Uint16)(4 * csystemnodes);
         break;
       case DictTabInfo::SingleFragment:
         jam();
-        noOfFragments = 1;
+        noOfFragments = (Uint16)1;
         break;
 #if 0
       case DictTabInfo::SpecifiedFragmentCount:
@@ -6233,7 +6233,7 @@
           and there is an array of node groups sent along as well.
         */
         memcpy(&node_group_id[0], &signal->theData[25], 2 * fragmentCount);
-        noOfFragments = fragmentCount;
+        noOfFragments = (Uint16)fragmentCount;
       }
     } else {
       ndbrequire(fragmentCount == 0);
@@ -6251,7 +6251,7 @@
       }
     }
     Uint32 count = 2;
-    Uint32 noOfReplicas = cnoReplicas;
+    Uint16 noOfReplicas = cnoReplicas;
     Uint16 *fragments = (Uint16*)(signal->theData+25);
     if (primaryTableId == RNIL) {
       jam();
@@ -6263,7 +6263,7 @@
         if (fragmentCount > 0)
         {
           jam();
-          NGPtr.i = node_group_id[fragNo];
+          NGPtr.i = uint2korr(&node_group_id[fragNo]);
           ndbout << "Node group for partition " << fragNo << " is ";
           ndbout << NGPtr.i << endl;
           if (NGPtr.i > cnoOfNodeGroups)
@@ -6280,8 +6280,8 @@
         for(Uint32 replicaNo = 0; replicaNo<noOfReplicas; replicaNo++)
         {
           jam();
-          const Uint32 nodeId = NGPtr.p->nodesInGroup[tmp++];
-          fragments[count++] = nodeId;
+          const Uint16 nodeId = NGPtr.p->nodesInGroup[tmp++];
+          int2store(&fragments[count++], nodeId);
           tmp = (tmp >= max ? 0 : tmp);
         }
 	tmp++;
@@ -6331,11 +6331,11 @@
       (CreateFragmentationConf*)signal->getDataPtrSend();
     conf->senderRef = reference();
     conf->senderData = senderData;
-    conf->noOfReplicas = noOfReplicas;
-    conf->noOfFragments = noOfFragments;
+    conf->noOfReplicas = (Uint32)noOfReplicas;
+    conf->noOfFragments = (Uint32)noOfFragments;
 
-    fragments[0] = noOfReplicas;
-    fragments[1] = noOfFragments;
+    int2store(&fragments[0], noOfReplicas);
+    int2store(&fragments[1], noOfFragments);
     
     if(senderRef != 0)
     {

--- 1.77/storage/ndb/src/ndbapi/NdbDictionaryImpl.cpp	Sat May  7 10:45:45 2005
+++ 1.78/storage/ndb/src/ndbapi/NdbDictionaryImpl.cpp	Fri May 13 15:17:31 2005
@@ -1389,15 +1389,15 @@
 
   if(tableDesc.FragmentDataLen > 0)
   {
-    Uint32 replicaCount = tableDesc.FragmentData[0];
-    Uint32 fragCount = tableDesc.FragmentData[1];
+    Uint16 replicaCount = uint2korr(&tableDesc.FragmentData[0]);
+    Uint16 fragCount = uint2korr(&tableDesc.FragmentData[1]);
 
     impl->m_replicaCount = replicaCount;
     impl->m_fragmentCount = fragCount;
 
     for(i = 0; i<(fragCount*replicaCount); i++)
     {
-      impl->m_fragments.push_back(tableDesc.FragmentData[i+2]);
+      impl->m_fragments.push_back(uint2korr(&tableDesc.FragmentData[i+2]));
     }
 
     Uint32 topBit = (1 << 31);

--- 1.182/sql/ha_ndbcluster.cc	Thu May 12 22:51:39 2005
+++ 1.183/sql/ha_ndbcluster.cc	Fri May 13 15:17:29 2005
@@ -3974,7 +3974,7 @@
       for (j= 0; j < part_info->no_subparts; j++)
       {
         part_elem= sub_it++;
-        node_group[ng_index++]= part_elem->nodegroup_id;
+        int2store(&node_group[ng_index++], part_elem->nodegroup_id);
         //Here we should insert tablespace id based on tablespace name
       }
     }
Thread
bk commit into 5.1 tree (mronstrom:1.1828)mikael13 May