List:Commits« Previous MessageNext Message »
From:Tomas Ulin Date:November 13 2008 4:23pm
Subject:bzr commit into mysql-5.1 branch (tomas.ulin:3070)
View as plain text  
#At file:///home/tomas/mysql_src/mysql-5.1-telco-6.4/

 3070 Tomas Ulin	2008-11-13
      change some defines
modified:
  storage/ndb/include/kernel/ndb_limits.h
  storage/ndb/src/kernel/blocks/dbdict/Dbdict.cpp
  storage/ndb/src/kernel/blocks/dbdih/DbdihMain.cpp
  storage/ndb/src/kernel/vm/Configuration.cpp
  storage/ndb/tools/restore/consumer_restore.cpp
  storage/ndb/tools/restore/restore_main.cpp

=== modified file 'storage/ndb/include/kernel/ndb_limits.h'
--- a/storage/ndb/include/kernel/ndb_limits.h	2008-10-30 10:43:10 +0000
+++ b/storage/ndb/include/kernel/ndb_limits.h	2008-11-13 15:22:59 +0000
@@ -24,7 +24,7 @@
  */
 #define MAX_NDB_NODES 49
 #define MAX_NODES     256
-#define UNDEF_NODEGROUP 0xFFFF
+#define NDB_UNDEF_NODEGROUP 0xFFFF
 #define MAX_BACKUPS   0xFFFFFFFF
 
 /**************************************************************************
@@ -68,7 +68,7 @@
  **/
 #define MAX_TUPLES_PER_PAGE 8191
 #define MAX_TUPLES_BITS 13 		/* 13 bits = 8191 tuples per page */
-#define MAX_TABLES 20320                /* SchemaFile.hpp */
+#define NDB_MAX_TABLES 20320                /* SchemaFile.hpp */
 #define MAX_TAB_NAME_SIZE 128
 #define MAX_ATTR_NAME_SIZE NAME_LEN       /* From mysql_com.h */
 #define MAX_ATTR_DEFAULT_VALUE_SIZE 128

=== modified file 'storage/ndb/src/kernel/blocks/dbdict/Dbdict.cpp'
--- a/storage/ndb/src/kernel/blocks/dbdict/Dbdict.cpp	2008-11-11 07:36:01 +0000
+++ b/storage/ndb/src/kernel/blocks/dbdict/Dbdict.cpp	2008-11-13 15:22:59 +0000
@@ -7380,7 +7380,7 @@ Dbdict::alterTable_parse(Signal* signal,
       for (Uint32 i = cnt; i<newTablePtr.p->fragmentCount; i++)
       {
         jam();
-        c_fragData[i] = UNDEF_NODEGROUP;
+        c_fragData[i] = NDB_UNDEF_NODEGROUP;
       }
       c_fragDataLen = 2 * newTablePtr.p->fragmentCount;
       Uint32 save1 = newTablePtr.p->primaryTableId;

=== modified file 'storage/ndb/src/kernel/blocks/dbdih/DbdihMain.cpp'
--- a/storage/ndb/src/kernel/blocks/dbdih/DbdihMain.cpp	2008-11-07 14:44:54 +0000
+++ b/storage/ndb/src/kernel/blocks/dbdih/DbdihMain.cpp	2008-11-13 15:22:59 +0000
@@ -6875,7 +6875,7 @@ static void set_default_node_groups(Sign
   Uint32 i;
   node_group_array[0] = 0;
   for (i = 1; i < noFrags; i++)
-    node_group_array[i] = UNDEF_NODEGROUP;
+    node_group_array[i] = NDB_UNDEF_NODEGROUP;
 }
 
 static Uint32 find_min_index(const Uint32* array, Uint32 cnt)
@@ -6998,7 +6998,7 @@ void Dbdih::execCREATE_FRAGMENTATION_REQ
       {
         jam();
         NGPtr.i = node_group_id[fragNo];
-        if (NGPtr.i == UNDEF_NODEGROUP)
+        if (NGPtr.i == NDB_UNDEF_NODEGROUP)
         {
           jam();
 	  NGPtr.i = c_node_groups[default_node_group];

=== modified file 'storage/ndb/src/kernel/vm/Configuration.cpp'
--- a/storage/ndb/src/kernel/vm/Configuration.cpp	2008-11-12 08:26:18 +0000
+++ b/storage/ndb/src/kernel/vm/Configuration.cpp	2008-11-13 15:22:59 +0000
@@ -845,8 +845,8 @@ Configuration::calcSizeAlt(ConfigValues 
   Uint32 noOfMetaTables= noOfTables + noOfOrderedIndexes +
                            noOfUniqueHashIndexes;
   Uint32 noOfMetaTablesDict= noOfMetaTables;
-  if (noOfMetaTablesDict > MAX_TABLES)
-    noOfMetaTablesDict= MAX_TABLES;
+  if (noOfMetaTablesDict > NDB_MAX_TABLES)
+    noOfMetaTablesDict= NDB_MAX_TABLES;
 
   {
     /**

=== modified file 'storage/ndb/tools/restore/consumer_restore.cpp'
--- a/storage/ndb/tools/restore/consumer_restore.cpp	2008-11-06 16:52:59 +0000
+++ b/storage/ndb/tools/restore/consumer_restore.cpp	2008-11-13 15:22:59 +0000
@@ -240,7 +240,7 @@ static bool default_nodegroups(NdbDictio
     return false; 
   for (i = 1; i < no_parts; i++) 
   {
-    if (node_groups[i] != UNDEF_NODEGROUP)
+    if (node_groups[i] != NDB_UNDEF_NODEGROUP)
       return false;
   }
   return true;
@@ -276,7 +276,7 @@ static void set_default_nodegroups(NdbDi
   node_group[0] = 0;
   for (i = 1; i < no_parts; i++)
   {
-    node_group[i] = UNDEF_NODEGROUP;
+    node_group[i] = NDB_UNDEF_NODEGROUP;
   }
   table->setFragmentData(node_group, no_parts);
 }
@@ -285,8 +285,8 @@ Uint32 BackupRestore::map_ng(Uint32 ng)
 {
   NODE_GROUP_MAP *ng_map = m_nodegroup_map;
 
-  if (ng == UNDEF_NODEGROUP ||
-      ng_map[ng].map_array[0] == UNDEF_NODEGROUP)
+  if (ng == NDB_UNDEF_NODEGROUP ||
+      ng_map[ng].map_array[0] == NDB_UNDEF_NODEGROUP)
   {
     return ng;
   }
@@ -302,7 +302,7 @@ Uint32 BackupRestore::map_ng(Uint32 ng)
 
     if (new_curr_inx >= MAX_MAPS_PER_NODE_GROUP)
       new_curr_inx = 0;
-    else if (ng_map[ng].map_array[new_curr_inx] == UNDEF_NODEGROUP)
+    else if (ng_map[ng].map_array[new_curr_inx] == NDB_UNDEF_NODEGROUP)
       new_curr_inx = 0;
     new_ng = ng_map[ng].map_array[curr_inx];
     ng_map[ng].curr_index = new_curr_inx;

=== modified file 'storage/ndb/tools/restore/restore_main.cpp'
--- a/storage/ndb/tools/restore/restore_main.cpp	2008-10-08 08:45:29 +0000
+++ b/storage/ndb/tools/restore/restore_main.cpp	2008-11-13 15:22:59 +0000
@@ -255,7 +255,7 @@ static char* analyse_one_map(char *map_s
   map_str++;
 
   number= strtol(map_str, &end_ptr, 10);
-  if (!end_ptr || number < 0 || number >= UNDEF_NODEGROUP)
+  if (!end_ptr || number < 0 || number >= NDB_UNDEF_NODEGROUP)
   {
     DBUG_RETURN(NULL);
   }
@@ -295,7 +295,7 @@ static void init_nodegroup_map()
   {
     ng_map[i].no_maps= 0;
     for (j= 0; j < MAX_MAPS_PER_NODE_GROUP; j++)
-      ng_map[i].map_array[j]= UNDEF_NODEGROUP;
+      ng_map[i].map_array[j]= NDB_UNDEF_NODEGROUP;
   }
 }
 

Thread
bzr commit into mysql-5.1 branch (tomas.ulin:3070) Tomas Ulin13 Nov