List:Commits« Previous MessageNext Message »
From:knielsen Date:August 30 2006 1:13pm
Subject:bk commit into 5.1 tree (knielsen:1.2302)
View as plain text  
Below is the list of changes that have just been committed into a local
5.1 repository of knielsen. When knielsen 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@stripped, 2006-08-30 15:13:50+02:00, knielsen@ymer.(none) +12 -0
  After-merge and after-review fixes.

  sql/set_var.cc@stripped, 2006-08-30 15:13:47+02:00, knielsen@ymer.(none) +1 -0
    After-merge fix.

  storage/ndb/include/kernel/signaldata/CreateIndx.hpp@stripped, 2006-08-30 15:13:47+02:00, knielsen@ymer.(none) +3 -3
    After-merge fixes.

  storage/ndb/include/kernel/signaldata/CreateTable.hpp@stripped, 2006-08-30 15:13:47+02:00, knielsen@ymer.(none) +1 -1
    After-merge fixes.

  storage/ndb/include/kernel/signaldata/DictTabInfo.hpp@stripped, 2006-08-30 15:13:48+02:00, knielsen@ymer.(none) +0 -7
    Use common constants in ndb_constants.h instead of seperate kernel/ndbapi
    constants.

  storage/ndb/include/kernel/signaldata/ListTables.hpp@stripped, 2006-08-30 15:13:48+02:00, knielsen@ymer.(none) +7 -7
    Fix bit allocations.

  storage/ndb/include/ndb_constants.h@stripped, 2006-08-30 15:13:47+02:00, knielsen@ymer.(none) +7 -1
    Use common constants in ndb_constants.h instead of seperate kernel/ndbapi
    constants.

  storage/ndb/include/ndbapi/NdbDictionary.hpp@stripped, 2006-08-30 15:13:48+02:00, knielsen@ymer.(none) +4 -11
    Use common constants in ndb_constants.h instead of seperate kernel/ndbapi
    constants.
    Add getters (for symmetry with setters).

  storage/ndb/src/kernel/blocks/dbdict/Dbdict.cpp@stripped, 2006-08-30 15:13:48+02:00, knielsen@ymer.(none) +4 -3
    Use common constants in ndb_constants.h instead of seperate kernel/ndbapi
    constants.

  storage/ndb/src/ndbapi/NdbDictionary.cpp@stripped, 2006-08-30 15:13:48+02:00, knielsen@ymer.(none) +10 -0
    Add getters (for symmetry with setters).

  storage/ndb/src/ndbapi/NdbDictionaryImpl.cpp@stripped, 2006-08-30 15:13:48+02:00, knielsen@ymer.(none) +1 -10
    Use common constants in ndb_constants.h instead of seperate kernel/ndbapi
    constants.

  storage/ndb/src/ndbapi/ndberror.c@stripped, 2006-08-30 15:13:48+02:00, knielsen@ymer.(none) +3 -3
    After-merge fixes.

  storage/ndb/tools/listTables.cpp@stripped, 2006-08-30 15:13:48+02:00, knielsen@ymer.(none) +2 -2
    Use common constants in ndb_constants.h instead of seperate kernel/ndbapi
    constants.

# 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:	knielsen
# Host:	ymer.(none)
# Root:	/usr/local/mysql/mysql-5.1-new-ndb

--- 1.10/storage/ndb/include/kernel/signaldata/CreateIndx.hpp	2006-08-30 15:13:57 +02:00
+++ 1.11/storage/ndb/include/kernel/signaldata/CreateIndx.hpp	2006-08-30 15:13:57 +02:00
@@ -209,9 +209,9 @@ public:
     AllocationError = 4252,
     CreateIndexTableFailed = 4253,
     DuplicateAttributes = 4258,
-    TableIsTemporary = 4275,
-    TableIsNotTemporary = 4276,
-    NoLoggingTemporaryIndex = 4277,
+    TableIsTemporary = 776,
+    TableIsNotTemporary = 777,
+    NoLoggingTemporaryIndex = 778,
   };
 
   CreateIndxConf m_conf;

--- 1.8/storage/ndb/include/kernel/signaldata/CreateTable.hpp	2006-08-30 15:13:57 +02:00
+++ 1.9/storage/ndb/include/kernel/signaldata/CreateTable.hpp	2006-08-30 15:13:57 +02:00
@@ -98,7 +98,7 @@ public:
     NotATablespace = 758,
     InvalidTablespaceVersion = 759,
     OutOfStringBuffer = 773,
-    NoLoggingTemporaryTable = 4277,
+    NoLoggingTemporaryTable = 778,
   };
 
 private:

--- 1.32/storage/ndb/include/kernel/signaldata/DictTabInfo.hpp	2006-08-30 15:13:57 +02:00
+++ 1.33/storage/ndb/include/kernel/signaldata/DictTabInfo.hpp	2006-08-30 15:13:57 +02:00
@@ -284,13 +284,6 @@ public:
     StorePermanent = 2
   };
   
-  // Object temporary status for translating from/to API
-  enum ObjectTemp {
-    TempUndefined = 0,
-    TempIsTemporary = 1,
-    TempIsPermanent = 2
-  };
-  
   // AttributeSize constants
   STATIC_CONST( aBit = 0 );
   STATIC_CONST( an8Bit = 3 );

--- 1.3/storage/ndb/include/kernel/signaldata/ListTables.hpp	2006-08-30 15:13:57 +02:00
+++ 1.4/storage/ndb/include/kernel/signaldata/ListTables.hpp	2006-08-30 15:13:57 +02:00
@@ -39,19 +39,19 @@ public:
     BitmaskImpl::setField(1, &data, 12, 8, val);
   }
   static Uint32 getTableStore(Uint32 data) {
-    return BitmaskImpl::getField(1, &data, 20, 4);
+    return BitmaskImpl::getField(1, &data, 20, 3);
   }
   static void setTableStore(Uint32& data, Uint32 val) {
-    BitmaskImpl::setField(1, &data, 20, 2, val);
-  }
-  static Uint32 getTableState(Uint32 data) {
-    return BitmaskImpl::getField(1, &data, 24, 2);
+    BitmaskImpl::setField(1, &data, 20, 3, val);
   }
   static Uint32 getTableTemp(Uint32 data) {
-    return BitmaskImpl::getField(1, &data, 26, 2);
+    return BitmaskImpl::getField(1, &data, 23, 1);
   }
   static void setTableTemp(Uint32& data, Uint32 val) {
-    BitmaskImpl::setField(1, &data, 26, 2, val);
+    BitmaskImpl::setField(1, &data, 23, 1, val);
+  }
+  static Uint32 getTableState(Uint32 data) {
+    return BitmaskImpl::getField(1, &data, 24, 4);
   }
   static void setTableState(Uint32& data, Uint32 val) {
     BitmaskImpl::setField(1, &data, 24, 4, val);

--- 1.83/storage/ndb/include/ndbapi/NdbDictionary.hpp	2006-08-30 15:13:57 +02:00
+++ 1.84/storage/ndb/include/ndbapi/NdbDictionary.hpp	2006-08-30 15:13:57 +02:00
@@ -141,15 +141,6 @@ public:
     };
 
     /**
-     * Object store
-     */
-    enum Temp {
-      TempUndefined   = 0,    ///< Undefined
-      TempIsTemporary = 1,    ///< Object or data deleted on system restart
-      TempIsPermanent = 2     ///< Permanent. logged to disk
-    };
-
-    /**
      * Type of fragmentation.
      *
      * This parameter specifies how data in the table or index will
@@ -927,6 +918,7 @@ public:
 
     int getReplicaCount() const ;
 
+    bool getTemporary();
     void setTemporary(bool); 
 #endif
 
@@ -1116,6 +1108,7 @@ public:
     void setStoredIndex(bool x) { setLogging(x); }
     bool getStoredIndex() const { return getLogging(); }
 
+    bool getTemporary();
     void setTemporary(bool); 
 #endif
     
@@ -1578,7 +1571,7 @@ public:
         Object::Type type;      ///< Type of object
         Object::State state;    ///< State of object
         Object::Store store;    ///< How object is logged
-        Object::Temp temp;      ///< Temporary status of object
+        Uint32 temp;            ///< Temporary status of object
 	char * database;        ///< In what database the object resides 
 	char * schema;          ///< What schema the object is defined in
 	char * name;            ///< Name of object
@@ -1587,7 +1580,7 @@ public:
           type(Object::TypeUndefined),
           state(Object::StateUndefined),
           store(Object::StoreUndefined),
-          temp(Object::TempUndefined),
+          temp(NDB_TEMP_TAB_PERMANENT),
 	  database(0),
 	  schema(0),
           name(0) {

--- 1.101/storage/ndb/src/kernel/blocks/dbdict/Dbdict.cpp	2006-08-30 15:13:57 +02:00
+++ 1.102/storage/ndb/src/kernel/blocks/dbdict/Dbdict.cpp	2006-08-30 15:13:57 +02:00
@@ -7611,16 +7611,17 @@ Dbdict::execLIST_TABLES_REQ(Signal* sign
 	  break;
 	}
       }
-      // store
+      // Logging status
       if (! (tablePtr.p->m_bits & TableRecord::TR_Logged)) {
 	conf->setTableStore(pos, DictTabInfo::StoreNotLogged);
       } else {
 	conf->setTableStore(pos, DictTabInfo::StorePermanent);
       }
+      // Temporary status
       if (tablePtr.p->m_bits & TableRecord::TR_Temporary) {
-	conf->setTableTemp(pos, DictTabInfo::TempIsTemporary);
+	conf->setTableTemp(pos, NDB_TEMP_TAB_TEMPORARY);
       } else {
-	conf->setTableTemp(pos, DictTabInfo::TempIsPermanent);
+	conf->setTableTemp(pos, NDB_TEMP_TAB_PERMANENT);
       }
       pos++;
     }

--- 1.63/storage/ndb/src/ndbapi/NdbDictionary.cpp	2006-08-30 15:13:57 +02:00
+++ 1.64/storage/ndb/src/ndbapi/NdbDictionary.cpp	2006-08-30 15:13:57 +02:00
@@ -632,6 +632,11 @@ NdbDictionary::Table::getReplicaCount() 
   return m_impl.m_replicaCount;
 }
 
+bool
+NdbDictionary::Table::getTemporary() {
+  return m_impl.m_temporary;
+}
+
 void
 NdbDictionary::Table::setTemporary(bool val) {
   m_impl.m_temporary = val;
@@ -811,6 +816,11 @@ NdbDictionary::Index::getType() const {
 void
 NdbDictionary::Index::setLogging(bool val){
   m_impl.m_logging = val;
+}
+
+bool
+NdbDictionary::Index::getTemporary(){
+  return m_impl.m_temporary;
 }
 
 void

--- 1.149/storage/ndb/src/ndbapi/NdbDictionaryImpl.cpp	2006-08-30 15:13:57 +02:00
+++ 1.150/storage/ndb/src/ndbapi/NdbDictionaryImpl.cpp	2006-08-30 15:13:57 +02:00
@@ -2022,14 +2022,6 @@ objectStoreMapping[] = {
 
 static const
 ApiKernelMapping
-objectTempMapping[] = {
-  { DictTabInfo::TempIsTemporary,    NdbDictionary::Object::TempIsTemporary },
-  { DictTabInfo::TempIsPermanent,    NdbDictionary::Object::TempIsPermanent },
-  { -1, -1 }
-};
-
-static const
-ApiKernelMapping
 indexTypeMapping[] = {
   { DictTabInfo::UniqueHashIndex,    NdbDictionary::Index::UniqueHashIndex },  
   { DictTabInfo::OrderedIndex,       NdbDictionary::Index::OrderedIndex },
@@ -4140,8 +4132,7 @@ NdbDictInterface::listObjects(NdbDiction
       getApiConstant(ListTablesConf::getTableState(d), objectStateMapping, 0);
     element.store = (NdbDictionary::Object::Store)
       getApiConstant(ListTablesConf::getTableStore(d), objectStoreMapping, 0);
-    element.temp = (NdbDictionary::Object::Temp)
-      getApiConstant(ListTablesConf::getTableTemp(d), objectTempMapping, 0);
+    element.temp = ListTablesConf::getTableTemp(d);
     // table or index name
     Uint32 n = (data[pos++] + 3) >> 2;
     BaseString databaseName;

--- 1.27/storage/ndb/tools/listTables.cpp	2006-08-30 15:13:57 +02:00
+++ 1.28/storage/ndb/tools/listTables.cpp	2006-08-30 15:13:57 +02:00
@@ -178,10 +178,10 @@ list(const char * tabname, 
 	    strcpy(temp, "-");
 	else {
 	    switch (elt.temp) {
-	    case NdbDictionary::Object::TempIsPermanent:
+	    case NDB_TEMP_TAB_PERMANENT:
 		strcpy(temp, "No");
 		break;
-	    case NdbDictionary::Object::TempIsTemporary:
+	    case NDB_TEMP_TAB_TEMPORARY:
 		strcpy(temp, "Yes");
 		break;
 	    default:

--- 1.189/sql/set_var.cc	2006-08-30 15:13:57 +02:00
+++ 1.190/sql/set_var.cc	2006-08-30 15:13:57 +02:00
@@ -552,6 +552,7 @@ sys_var_long_ptr
 sys_ndb_extra_logging("ndb_extra_logging", &ndb_extra_logging);
 sys_var_thd_bool
 sys_ndb_use_copying_alter_table("ndb_use_copying_alter_table", &SV::ndb_use_copying_alter_table);
+sys_var_thd_bool
 sys_ndb_use_temporary_tables("ndb_use_temporary_tables",
                              &SV::ndb_use_temporary_tables);
 

--- 1.12/storage/ndb/include/ndb_constants.h	2006-08-30 15:13:57 +02:00
+++ 1.13/storage/ndb/include/ndb_constants.h	2006-08-30 15:13:57 +02:00
@@ -84,5 +84,11 @@
 
 #define NDB_STORAGETYPE_MEMORY          0
 #define NDB_STORAGETYPE_DISK            1
- 
+
+/*
+ * Table temporary status.
+ */
+#define NDB_TEMP_TAB_PERMANENT          0
+#define NDB_TEMP_TAB_TEMPORARY          1
+
 #endif

--- 1.72/storage/ndb/src/ndbapi/ndberror.c	2006-08-30 15:13:57 +02:00
+++ 1.73/storage/ndb/src/ndbapi/ndberror.c	2006-08-30 15:13:57 +02:00
@@ -421,6 +421,9 @@ ErrorBundle ErrorCodes[] = {
   
   { 773,  DMEC, SE, "Out of string memory, please modify StringMemory config parameter" },
   { 775,  DMEC, SE, "Create file is not supported when Diskless=1" },
+  { 776,  DMEC, AE, "Index created on temporary table must itself be temporary" },
+  { 777,  DMEC, AE, "Cannot create a temporary index on a non-temporary table" },
+  { 778,  DMEC, AE, "A temporary table or index must be specified as not logging" },
   
   /**
    * FunctionNotImplemented
@@ -612,9 +615,6 @@ ErrorBundle ErrorCodes[] = {
   { 4273, DMEC, IE, "No blob table in dict cache" },
   { 4274, DMEC, IE, "Corrupted main table PK in blob operation" },
   { 4275, DMEC, AE, "The blob method is incompatible with operation type or lock mode" },
-  { 4276, DMEC, AE, "Index created on temporary table must itself be temporary" },
-  { 4277, DMEC, AE, "Cannot create a temporary index on a non-temporary table" },
-  { 4278, DMEC, AE, "A temporary table or index must be specified as not logging" },
 };
 
 static
Thread
bk commit into 5.1 tree (knielsen:1.2302)knielsen30 Aug