List:Commits« Previous MessageNext Message »
From:tomas Date:March 9 2007 11:18am
Subject:bk commit into 5.1 tree (tomas:1.2455)
View as plain text  
Below is the list of changes that have just been committed into a local
5.1 repository of tomas. When tomas 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.2455 07/03/09 18:17:45 tomas@stripped +2 -0
  Merge poseidon.mysql.com:/home/tomas/mysql-5.1-telco-gca
  into  poseidon.mysql.com:/home/tomas/mysql-5.1-telco-6.1_2

  storage/ndb/src/kernel/blocks/dbdict/Dbdict.hpp
    1.48 07/03/09 18:17:31 tomas@stripped +0 -0
    Auto merged

  storage/ndb/src/kernel/blocks/dbdict/Dbdict.cpp
    1.116 07/03/09 18:17:30 tomas@stripped +0 -0
    Auto merged

# 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:	tomas
# Host:	poseidon.mysql.com
# Root:	/home/tomas/mysql-5.1-telco-6.1_2/RESYNC

--- 1.115/storage/ndb/src/kernel/blocks/dbdict/Dbdict.cpp	2007-03-02 09:18:36 +07:00
+++ 1.116/storage/ndb/src/kernel/blocks/dbdict/Dbdict.cpp	2007-03-09 18:17:30 +07:00
@@ -3759,9 +3759,7 @@ Dbdict::execCREATE_TABLE_REQ(Signal* sig
       break;
     }
 
-    if(getNodeState().getSingleUserMode() &&
-       (refToNode(signal->getSendersBlockRef()) !=
-        getNodeState().getSingleUserApi()))
+    if (checkSingleUserMode(signal->getSendersBlockRef()))
     {
       jam();
       parseRecord.errorCode = CreateTableRef::SingleUser;
@@ -3960,9 +3958,7 @@ Dbdict::execALTER_TABLE_REQ(Signal* sign
     return;
   }
   
-  if(getNodeState().getSingleUserMode() &&
-     (refToNode(signal->getSendersBlockRef()) !=
-      getNodeState().getSingleUserApi()))
+  if (checkSingleUserMode(signal->getSendersBlockRef()))
   {
     jam();
     alterTableRef(signal, req, AlterTableRef::SingleUser);
@@ -6568,9 +6564,7 @@ Dbdict::execDROP_TABLE_REQ(Signal* signa
     return;
   }
   
-  if(getNodeState().getSingleUserMode() &&
-     (refToNode(signal->getSendersBlockRef()) !=
-      getNodeState().getSingleUserApi()))
+  if (checkSingleUserMode(signal->getSendersBlockRef()))
   {
     jam();
     dropTableRef(signal, req, DropTableRef::SingleUser);
@@ -7785,9 +7779,7 @@ Dbdict::execCREATE_INDX_REQ(Signal* sign
         jam();
         tmperr = CreateIndxRef::Busy;
       }
-      else if(getNodeState().getSingleUserMode() &&
-              (refToNode(senderRef) !=
-               getNodeState().getSingleUserApi()))
+      else if (checkSingleUserMode(senderRef))
       {
         jam();
         tmperr = CreateIndxRef::SingleUser;
@@ -8435,9 +8427,7 @@ Dbdict::execDROP_INDX_REQ(Signal* signal
         jam();
         tmperr = DropIndxRef::Busy;
       }
-      else if(getNodeState().getSingleUserMode() &&
-              (refToNode(senderRef) !=
-               getNodeState().getSingleUserApi()))
+      else if (checkSingleUserMode(senderRef))
       {
         jam();
         tmperr = DropIndxRef::SingleUser;
@@ -16358,5 +16348,20 @@ Dbdict::send_drop_fg(Signal* signal, Sch
   
   sendSignal(ref, GSN_DROP_FILEGROUP_REQ, signal, 
 	     DropFilegroupImplReq::SignalLength, JBB);
+}
+
+/*
+  return 1 if all of the below is true
+  a) node in single user mode
+  b) senderRef is not a db node
+  c) senderRef nodeid is not the singleUserApi
+*/
+int Dbdict::checkSingleUserMode(Uint32 senderRef)
+{
+  Uint32 nodeId = refToNode(senderRef);
+  return
+    getNodeState().getSingleUserMode() &&
+    (getNodeInfo(nodeId).m_type != NodeInfo::DB) &&
+    (nodeId != getNodeState().getSingleUserApi());
 }
 

--- 1.47/storage/ndb/src/kernel/blocks/dbdict/Dbdict.hpp	2007-01-24 12:20:35 +07:00
+++ 1.48/storage/ndb/src/kernel/blocks/dbdict/Dbdict.hpp	2007-03-09 18:17:31 +07:00
@@ -2645,6 +2645,8 @@ public:
   void send_drop_fg(Signal*, SchemaOp*, DropFilegroupImplReq::RequestInfo);
 
   void drop_undofile_prepare_start(Signal* signal, SchemaOp*);
+
+  int checkSingleUserMode(Uint32 senderRef);
 };
 
 inline bool
Thread
bk commit into 5.1 tree (tomas:1.2455)tomas9 Mar