List:Internals« Previous MessageNext Message »
From:jonas.oreland Date:March 4 2005 12:48pm
Subject:bk commit into 5.1-ndb tree (joreland:1.1765)
View as plain text  
Below is the list of changes that have just been committed into a local
5.1-ndb 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.1765 05/03/04 13:48:47 joreland@stripped +6 -0
  Put hardcoded tablespace id in dict
  Fix bit fields on disk
  New error code for invalid tablespace

  ndb/src/ndbapi/ndberror.c
    1.30 05/03/04 13:48:44 joreland@stripped +2 -1
    new error code

  ndb/src/kernel/blocks/dbtup/DbtupRoutines.cpp
    1.31 05/03/04 13:48:44 joreland@stripped +1 -1
    Fix bit attributes on disk

  ndb/src/kernel/blocks/dbtup/DbtupDiskAlloc.cpp
    1.7 05/03/04 13:48:44 joreland@stripped +1 -1
    Add tablespace id to table

  ndb/src/kernel/blocks/dbdict/Dbdict.hpp
    1.23 05/03/04 13:48:44 joreland@stripped +1 -0
    Add tablespace id to table

  ndb/src/kernel/blocks/dbdict/Dbdict.cpp
    1.55 05/03/04 13:48:44 joreland@stripped +13 -2
    
      Notice: this will not group and commit the deltas listed below
      into a ChangeSet, because there are no ChangeSet comments.
      Click [Checkin] again to check in only the commented deltas,
      or type Control-l to go back and provide ChangeSet comments.

  ndb/include/kernel/signaldata/CreateTable.hpp
    1.4 05/03/04 13:48:44 joreland@stripped +2 -1
    New error code for invalid tablespace

# 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:	joreland
# Host:	eel.hemma.oreland.se
# Root:	/home/jonas/src/mysql-5.1-ndb-dd

--- 1.6/ndb/src/kernel/blocks/dbtup/DbtupDiskAlloc.cpp	Fri Mar  4 07:45:44 2005
+++ 1.7/ndb/src/kernel/blocks/dbtup/DbtupDiskAlloc.cpp	Fri Mar  4 13:48:44 2005
@@ -235,7 +235,7 @@
   Tablespace_client tsman(signal, c_tsman,
 			  fragPtrP->fragTableId,
 			  fragPtrP->fragmentId,
-			  16); //tabPtrP->m_tablespace_id);
+			  tabPtrP->m_tablespace_id);
   
   /**
    * 1) search current dirty pages

--- 1.3/ndb/include/kernel/signaldata/CreateTable.hpp	Wed Dec 22 06:19:17 2004
+++ 1.4/ndb/include/kernel/signaldata/CreateTable.hpp	Fri Mar  4 13:48:44 2005
@@ -91,7 +91,8 @@
     RecordTooBig = 738,
     InvalidPrimaryKeySize  = 739,
     NullablePrimaryKey = 740,
-    InvalidCharset = 743
+    InvalidCharset = 743,
+    InvalidTablespace = 755
   };
 
 private:

--- 1.54/ndb/src/kernel/blocks/dbdict/Dbdict.cpp	Fri Mar  4 07:57:28 2005
+++ 1.55/ndb/src/kernel/blocks/dbdict/Dbdict.cpp	Fri Mar  4 13:48:44 2005
@@ -4264,7 +4264,7 @@
     req->startGci = startGci;
     req->tableType = tabPtr.p->tableType;
     req->primaryTableId = tabPtr.p->primaryTableId;
-    req->tablespace_id= RNIL;
+    req->tablespace_id= tabPtr.p->m_tablespace_id;
     sendSignal(DBLQH_REF, GSN_LQHFRAGREQ, signal, 
 	       LqhFragReq::SignalLength, JBB);
   }
@@ -4853,6 +4853,7 @@
   tablePtr.p->tableType = (DictTabInfo::TableType)tableDesc.TableType;
   tablePtr.p->kValue = tableDesc.TableKValue;
   tablePtr.p->fragmentCount = tableDesc.FragmentCount;
+  tablePtr.p->m_tablespace_id = 16; //XXX
   
   {
     Rope frm(c_rope_pool, tablePtr.p->frmData);
@@ -5101,7 +5102,17 @@
   tabRequire(keyLength > 0, 
 	     CreateTableRef::InvalidPrimaryKeySize);
 
-  if(parseP->requestType == DictTabInfo::CreateTableFromAPI)
+  if(counts[2] || counts[3])
+  {
+    FilegroupPtr tablespacePtr;
+    if(!c_filegroup_hash.find(tablespacePtr, tablePtr.p->m_tablespace_id) ||
+       tablespacePtr.p->m_type == DictTabInfo::Tablespace)
+    {
+      tabRequire(false, CreateTableRef::InvalidTablespace);
+    }
+  }
+  
+  if(parseP->requestType == DictTabInfo::CreateTableFromAPI) 
   {
     /**
      * Enumerate attributebut id's so that

--- 1.22/ndb/src/kernel/blocks/dbdict/Dbdict.hpp	Wed Jan 12 09:13:58 2005
+++ 1.23/ndb/src/kernel/blocks/dbdict/Dbdict.hpp	Fri Mar  4 13:48:44 2005
@@ -337,6 +337,7 @@
     RopeHandle frmData;
 
     Uint32 fragmentCount;
+    Uint32 m_tablespace_id;
   };
 
   typedef Ptr<TableRecord> TableRecordPtr;

--- 1.30/ndb/src/kernel/blocks/dbtup/DbtupRoutines.cpp	Fri Mar  4 11:44:28 2005
+++ 1.31/ndb/src/kernel/blocks/dbtup/DbtupRoutines.cpp	Fri Mar  4 13:48:44 2005
@@ -140,7 +140,7 @@
 	Uint32 a= 
 	  AttributeDescriptor::getArrayType(attrDescr)==ZFIXED_ARRAY ? 2 : 4;
 	
-	if(AttributeDescriptor::getArraySize(attrDescr) == 0)
+	if(AttributeDescriptor::getSize(attrDescr) == 0)
 	  a= 0;
 	
 	Uint32 b= 

--- 1.29/ndb/src/ndbapi/ndberror.c	Mon Jan 10 16:02:32 2005
+++ 1.30/ndb/src/ndbapi/ndberror.c	Fri Mar  4 13:48:44 2005
@@ -280,7 +280,7 @@
   { 897,  AE, "Update attempt of primary key via ndbcluster internal api (if this occurs via the MySQL server it is a bug, please report)" },
   { 4256, AE, "Must call Ndb::init() before this function" },
   { 4257, AE, "Tried to read too much - too many getValue calls" },
-  
+
   /** 
    * Scan application errors
    */
@@ -344,6 +344,7 @@
   { 743,  SE, "Unsupported character set in table or index" },
   { 744,  SE, "Character string is invalid for given character set" },
   { 745,  SE, "Distribution key not supported for char attribute (use binary attribute)" },
+  { 755,  SE, "Invalid tablespace" },
   { 241,  SE, "Invalid schema object version" },
   { 283,  SE, "Table is being dropped" },
   { 284,  SE, "Table not defined in transaction coordinator" },
Thread
bk commit into 5.1-ndb tree (joreland:1.1765)jonas.oreland4 Mar