List:Internals« Previous MessageNext Message »
From:mikael Date:May 16 2005 1:19pm
Subject:bk commit into 5.1 tree (mronstrom:1.1830)
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.1830 05/05/16 15:19:40 mronstrom@stripped +5 -0
  WL 1354: Partitioning
  Fixed error codes
  Removed remaining endian stuff
  Fixed ndb_restore problem
  Added initialisation

  storage/ndb/tools/restore/Restore.cpp
    1.24 05/05/16 15:19:30 mronstrom@stripped +1 -1
    Cleared node group info that would be wrong if used in ndb_restore

  storage/ndb/src/ndbapi/NdbDictionaryImpl.cpp
    1.79 05/05/16 15:19:30 mronstrom@stripped +4 -4
    Removed endian stuff

  storage/ndb/src/kernel/blocks/dbdih/DbdihMain.cpp
    1.29 05/05/16 15:19:30 mronstrom@stripped +7 -7
    Removed endian stuff

  storage/ndb/src/kernel/blocks/dbdict/Dbdict.cpp
    1.47 05/05/16 15:19:30 mronstrom@stripped +4 -1
    Removed some remaining endian stuff
    Added initialisation of node group variables

  mysql-test/t/ndb_alter_table.test
    1.22 05/05/16 15:19:30 mronstrom@stripped +1 -1
    Fixed error codes

# 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.21/mysql-test/t/ndb_alter_table.test	Thu Apr 21 10:24:37 2005
+++ 1.22/mysql-test/t/ndb_alter_table.test	Mon May 16 15:19:30 2005
@@ -148,7 +148,7 @@
 connection server1;
 alter table t1 drop index c;
 connection server2;
---error 1412
+--error 1438
 select * from t1 where b = 'two';
 select * from t1 where b = 'two';
 connection server1;

--- 1.23/storage/ndb/tools/restore/Restore.cpp	Fri Apr  8 02:44:35 2005
+++ 1.24/storage/ndb/tools/restore/Restore.cpp	Mon May 16 15:19:30 2005
@@ -226,7 +226,7 @@
     return false;
 
   debug << "parseTableInfo " << tableImpl->getName() << " done" << endl;
-
+  tableImpl->m_ng.clear();
   TableS * table = new TableS(m_fileHeader.NdbVersion, tableImpl);
   if(table == NULL) {
     return false;

--- 1.46/storage/ndb/src/kernel/blocks/dbdict/Dbdict.cpp	Fri May 13 15:17:30 2005
+++ 1.47/storage/ndb/src/kernel/blocks/dbdict/Dbdict.cpp	Mon May 16 15:19:30 2005
@@ -277,7 +277,7 @@
     if(signal->theData[0] == 0)
     {
       Uint16 *data = (Uint16*)&signal->theData[25];
-      Uint32 count = 2 + uint2korr(data) * uint2korr(data+1);
+      Uint32 count = 2 + data[0] * data[1];
       w.add(DictTabInfo::FragmentDataLen, 2*count);
       w.add(DictTabInfo::FragmentData, data, 2*count);
     }
@@ -1491,8 +1491,11 @@
   tablePtr.p->gciTableCreated = 0;
   tablePtr.p->noOfAttributes = ZNIL;
   tablePtr.p->noOfNullAttr = 0;
+  tablePtr.p->ngLen = 0;
+  memset(tablePtr.p->ngData, 0, sizeof(tablePtr.p->ngData));
   tablePtr.p->frmLen = 0;
   memset(tablePtr.p->frmData, 0, sizeof(tablePtr.p->frmData));
+  tablePtr.p->fragmentCount = 0;
   /*
     tablePtr.p->lh3PageIndexBits = 0;
     tablePtr.p->lh3DistrBits = 0;

--- 1.28/storage/ndb/src/kernel/blocks/dbdih/DbdihMain.cpp	Fri May 13 15:17:31 2005
+++ 1.29/storage/ndb/src/kernel/blocks/dbdih/DbdihMain.cpp	Mon May 16 15:19:30 2005
@@ -6263,7 +6263,7 @@
         if (fragmentCount > 0)
         {
           jam();
-          NGPtr.i = uint2korr(&node_group_id[fragNo]);
+          NGPtr.i = node_group_id[fragNo];
           ndbout << "Node group for partition " << fragNo << " is ";
           ndbout << NGPtr.i << endl;
           if (NGPtr.i > cnoOfNodeGroups)
@@ -6281,7 +6281,7 @@
         {
           jam();
           const Uint16 nodeId = NGPtr.p->nodesInGroup[tmp++];
-          int2store(&fragments[count++], nodeId);
+          fragments[count++]= nodeId;
           tmp = (tmp >= max ? 0 : tmp);
         }
 	tmp++;
@@ -6302,7 +6302,7 @@
         FragmentstorePtr fragPtr;
         ReplicaRecordPtr replicaPtr;
         getFragstore(primTabPtr.p, fragNo, fragPtr);
-        fragments[count++] = fragPtr.p->preferredPrimary;
+        fragments[count++]= fragPtr.p->preferredPrimary;
         for (replicaPtr.i = fragPtr.p->storedReplicas;
              replicaPtr.i != RNIL;
              replicaPtr.i = replicaPtr.p->nextReplica) {
@@ -6310,7 +6310,7 @@
           ptrCheckGuard(replicaPtr, creplicaFileSize, replicaRecord);
           if (replicaPtr.p->procNode != fragPtr.p->preferredPrimary) {
             jam();
-            fragments[count++] = replicaPtr.p->procNode;
+            fragments[count++]= replicaPtr.p->procNode;
           }
         }
         for (replicaPtr.i = fragPtr.p->oldStoredReplicas;
@@ -6320,7 +6320,7 @@
           ptrCheckGuard(replicaPtr, creplicaFileSize, replicaRecord);
           if (replicaPtr.p->procNode != fragPtr.p->preferredPrimary) {
             jam();
-            fragments[count++] = replicaPtr.p->procNode;
+            fragments[count++]= replicaPtr.p->procNode;
           }
         }
       }
@@ -6334,8 +6334,8 @@
     conf->noOfReplicas = (Uint32)noOfReplicas;
     conf->noOfFragments = (Uint32)noOfFragments;
 
-    int2store(&fragments[0], noOfReplicas);
-    int2store(&fragments[1], noOfFragments);
+    fragments[0]= noOfReplicas;
+    fragments[1]= noOfFragments;
     
     if(senderRef != 0)
     {

--- 1.78/storage/ndb/src/ndbapi/NdbDictionaryImpl.cpp	Fri May 13 15:17:31 2005
+++ 1.79/storage/ndb/src/ndbapi/NdbDictionaryImpl.cpp	Mon May 16 15:19:30 2005
@@ -1389,15 +1389,15 @@
 
   if(tableDesc.FragmentDataLen > 0)
   {
-    Uint16 replicaCount = uint2korr(&tableDesc.FragmentData[0]);
-    Uint16 fragCount = uint2korr(&tableDesc.FragmentData[1]);
+    Uint16 replicaCount = tableDesc.FragmentData[0];
+    Uint16 fragCount = tableDesc.FragmentData[1];
 
     impl->m_replicaCount = replicaCount;
     impl->m_fragmentCount = fragCount;
-
+    DBUG_PRINT("info", ("replicaCount=%x , fragCount=%x",replicaCount,fragCount));
     for(i = 0; i<(fragCount*replicaCount); i++)
     {
-      impl->m_fragments.push_back(uint2korr(&tableDesc.FragmentData[i+2]));
+      impl->m_fragments.push_back(tableDesc.FragmentData[i+2]);
     }
 
     Uint32 topBit = (1 << 31);
Thread
bk commit into 5.1 tree (mronstrom:1.1830)mikael16 May