List:Commits« Previous MessageNext Message »
From:Jonas Oreland Date:April 13 2011 8:51am
Subject:bzr commit into mysql-5.1-telco-7.0 branch (jonas:4306)
View as plain text  
#At file:///home/jonas/src/telco-7.0/ based on revid:maitrayi.sabaratnam@stripped

 4306 Jonas Oreland	2011-04-13
      ndb - increase MAX_SUMA_MESSAGE_IN_WORDS somewhat for easier testing!
        and fix a few Hugo "max-tables" constants

    modified:
      storage/ndb/include/kernel/ndb_limits.h
      storage/ndb/src/kernel/blocks/dbtup/DbtupRoutines.cpp
      storage/ndb/test/include/NDBT_Tables.hpp
      storage/ndb/test/src/NDBT_Tables.cpp
=== modified file 'storage/ndb/include/kernel/ndb_limits.h'
--- a/storage/ndb/include/kernel/ndb_limits.h	2011-04-11 13:36:12 +0000
+++ b/storage/ndb/include/kernel/ndb_limits.h	2011-04-13 08:51:04 +0000
@@ -82,7 +82,7 @@
  * When sending a SUB_TABLE_DATA from SUMA to API
  *
  */
-#define MAX_SUMA_MESSAGE_IN_WORDS 8000
+#define MAX_SUMA_MESSAGE_IN_WORDS 8028
 
 /**
  * When sending a SUB_TABLE_DATA

=== modified file 'storage/ndb/src/kernel/blocks/dbtup/DbtupRoutines.cpp'
--- a/storage/ndb/src/kernel/blocks/dbtup/DbtupRoutines.cpp	2011-03-29 17:26:47 +0000
+++ b/storage/ndb/src/kernel/blocks/dbtup/DbtupRoutines.cpp	2011-04-13 08:51:04 +0000
@@ -3291,7 +3291,6 @@ Dbtup::read_lcp(const Uint32* inBuf, Uin
   dst[0] = req_struct->frag_page_id;
   dst[1] = req_struct->operPtrP->m_tuple_location.m_page_idx;
   ndbassert(req_struct->m_tuple_ptr->m_data != 0);
-  ndbassert(fixsz < 8192);
   memcpy(dst+2, req_struct->m_tuple_ptr->m_data, fixsz);
 
   if (varstart)

=== modified file 'storage/ndb/test/include/NDBT_Tables.hpp'
--- a/storage/ndb/test/include/NDBT_Tables.hpp	2011-02-02 00:40:07 +0000
+++ b/storage/ndb/test/include/NDBT_Tables.hpp	2011-04-13 08:51:04 +0000
@@ -46,11 +46,17 @@ public:
   STATIC_CONST(MinKeyMaxVarTypeAttrBytes= MinKeyMaxAttrBytes - 2);
 
   STATIC_CONST(UniqueIndexOverheadBytes= 4); // For FragId
-  STATIC_CONST(MaxKeyMaxVarTypeAttrBytesIndex = 
-               MaxKeyMaxVarTypeAttrBytes - UniqueIndexOverheadBytes);
 
-  /* Hugo requires 2 unsigned int columns somewhere in the table */
-  STATIC_CONST(HugoOverheadBytes= 2 * 4); 
+  // Note that since we'll put an unique index on this...it can't be bigger
+  // than MaxKeyBytes
+  STATIC_CONST(MaxKeyMaxVarTypeAttrBytesIndex =
+               ((MaxKeyMaxVarTypeAttrBytes <= MaxKeyBytes) ?
+                MaxKeyMaxVarTypeAttrBytes : MaxKeyBytes) - UniqueIndexOverheadBytes);
+
+  /* Hugo requires 2 unsigned int columns somewhere in the table
+   * and these also counts towards #attributes relation
+   */
+  STATIC_CONST(HugoOverheadBytes= 2 * (4 + 4));
 
   static int createTable(Ndb* pNdb, const char* _name, bool _temp = false, 
 			 bool existsOK = false, NDBT_CreateTableHook = 0,

=== modified file 'storage/ndb/test/src/NDBT_Tables.cpp'
--- a/storage/ndb/test/src/NDBT_Tables.cpp	2011-02-02 00:40:07 +0000
+++ b/storage/ndb/test/src/NDBT_Tables.cpp	2011-04-13 08:51:04 +0000
@@ -918,14 +918,14 @@ NDBT_Table* createMaxKeyMaxColsHugoTabDe
 
     /* Last attr uses remaining attr space */
     BaseString::snprintf(namebuff, buffsize, "A%d", attrNum);
+    Uint32 sz32 = NDB_MAX_TUPLE_SIZE_IN_WORDS;
+    sz32 -= NDB_MAX_KEYSIZE_IN_WORDS;
+    sz32 -= NDB_MAX_ATTRIBUTES_IN_INDEX;
+    sz32 -= 2 * NDB_MAX_ATTRIBUTES_IN_TABLE;
     attrs[attrNum]= new NDBT_Attribute(namebuff,
-                                       NdbDictionary::Column::Char,
-                                       (NDB_MAX_TUPLE_SIZE_IN_WORDS -
-                                        NDB_MAX_KEYSIZE_IN_WORDS -
-                                        ((NDB_MAX_ATTRIBUTES_IN_TABLE -
-                                          NDB_MAX_ATTRIBUTES_IN_INDEX) - 1)) * 4,
+                                       NdbDictionary::Column::Char, 4 * sz32,
                                        false);
-    
+
     WIDE_MAXKEYMAXCOLS_HUGO= new NDBT_Table(name, NDB_MAX_ATTRIBUTES_IN_TABLE,
                                             attrs);
 


Attachment: [text/bzr-bundle] bzr/jonas@mysql.com-20110413085104-8ma09sywnu9bdqwk.bundle
Thread
bzr commit into mysql-5.1-telco-7.0 branch (jonas:4306) Jonas Oreland13 Apr