MySQL Lists are EOL. Please join:

List:Internals« Previous MessageNext Message »
From:jonas Date:October 17 2005 7:29am
Subject:bk commit into 5.0 tree (jonas:1.2042)
View as plain text  
Below is the list of changes that have just been committed into a local
5.0 repository of jonas. When jonas 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.2042 05/10/17 09:29:41 jonas@stripped +1 -0
  Fix testDict -n FragmentTypeSingle T1
  Init KeyDescriptor before sending to DIH, 
    make sure that its always inited

  ndb/src/kernel/blocks/dbdict/Dbdict.cpp
    1.58 05/10/17 09:29:36 jonas@stripped +38 -38
    Fix testDict -n FragmentTypeSingle T1
    Init KeyDescriptor before sending to DIH, 
      make sure that its always inited

# 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:	jonas
# Host:	perch.ndb.mysql.com
# Root:	/home/jonas/src/mysql-5.0

--- 1.57/ndb/src/kernel/blocks/dbdict/Dbdict.cpp	2005-10-05 16:35:20 +02:00
+++ 1.58/ndb/src/kernel/blocks/dbdict/Dbdict.cpp	2005-10-17 09:29:36 +02:00
@@ -4346,6 +4346,44 @@
 
   sendSignal(DBDIH_REF, GSN_DIADDTABREQ, signal, 
 	     DiAddTabReq::SignalLength, JBB);
+
+  /**
+   * Create KeyDescriptor
+   */
+  KeyDescriptor* desc= g_key_descriptor_pool.getPtr(tabPtr.i);
+  new (desc) KeyDescriptor();
+
+  Uint32 key = 0;
+  Uint32 tAttr = tabPtr.p->firstAttribute;
+  while (tAttr != RNIL) 
+  {
+    jam();
+    AttributeRecord* aRec = c_attributeRecordPool.getPtr(tAttr);
+    if (aRec->tupleKey) 
+    {
+      desc->noOfKeyAttr ++;
+      desc->keyAttr[key].attributeDescriptor = aRec->attributeDescriptor;
+      
+      Uint32 csNumber = (aRec->extPrecision >> 16);
+      if(csNumber)
+      {
+	desc->keyAttr[key].charsetInfo = all_charsets[csNumber];
+	ndbrequire(all_charsets[csNumber]);
+	desc->hasCharAttr = 1;
+      }
+      else
+      {
+	desc->keyAttr[key].charsetInfo = 0;	  
+      }
+      if(AttributeDescriptor::getDKey(aRec->attributeDescriptor))
+      {
+	desc->noOfDistrKeys ++;
+      }
+      key++;
+    }
+    tAttr = aRec->nextAttrInTable;
+  }
+  ndbrequire(key == tabPtr.p->noOfPrimkey);
 }
 
 static
@@ -4448,44 +4486,6 @@
     sendSignal(DBLQH_REF, GSN_LQHFRAGREQ, signal, 
 	       LqhFragReq::SignalLength, JBB);
   }
-
-  /**
-   * Create KeyDescriptor
-   */
-  KeyDescriptor* desc= g_key_descriptor_pool.getPtr(tabPtr.i);
-  new (desc) KeyDescriptor();
-
-  Uint32 key = 0;
-  Uint32 tAttr = tabPtr.p->firstAttribute;
-  while (tAttr != RNIL) 
-  {
-    jam();
-    AttributeRecord* aRec = c_attributeRecordPool.getPtr(tAttr);
-    if (aRec->tupleKey) 
-    {
-      desc->noOfKeyAttr ++;
-      desc->keyAttr[key].attributeDescriptor = aRec->attributeDescriptor;
-      
-      Uint32 csNumber = (aRec->extPrecision >> 16);
-      if(csNumber)
-      {
-	desc->keyAttr[key].charsetInfo = all_charsets[csNumber];
-	ndbrequire(all_charsets[csNumber]);
-	desc->hasCharAttr = 1;
-      }
-      else
-      {
-	desc->keyAttr[key].charsetInfo = 0;	  
-      }
-      if(AttributeDescriptor::getDKey(aRec->attributeDescriptor))
-      {
-	desc->noOfDistrKeys ++;
-      }
-      key++;
-    }
-    tAttr = aRec->nextAttrInTable;
-  }
-  ndbrequire(key == tabPtr.p->noOfPrimkey);
 }
 
 void
Thread
bk commit into 5.0 tree (jonas:1.2042)jonas17 Oct