List:Commits« Previous MessageNext Message »
From:tomas Date:March 2 2007 2:38am
Subject:bk commit into 5.0 tree (tomas:1.2433)
View as plain text  
Below is the list of changes that have just been committed into a local
5.0 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.2433 07/03/02 09:38:03 tomas@stripped +3 -0
  Merge poseidon.mysql.com:/home/tomas/mysql-5.0
  into  poseidon.mysql.com:/home/tomas/mysql-5.0-ndb

  ndb/src/kernel/blocks/dblqh/DblqhMain.cpp
    1.103 07/03/02 09:37:47 tomas@stripped +0 -0
    Auto merged

  ndb/src/kernel/blocks/dbdict/Dbdict.cpp
    1.75 07/03/02 09:37:46 tomas@stripped +0 -0
    Auto merged

  ndb/src/common/debugger/EventLogger.cpp
    1.34 07/03/02 09:37:46 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.0-ndb/RESYNC

--- 1.33/ndb/src/common/debugger/EventLogger.cpp	2007-02-22 00:05:03 +07:00
+++ 1.34/ndb/src/common/debugger/EventLogger.cpp	2007-03-02 09:37:46 +07:00
@@ -1004,6 +1004,8 @@ EventLogger::close()
   removeAllHandlers();
 }
 
+#ifdef NOT_USED
+
 static NdbOut&
 operator<<(NdbOut& out, const LogLevel & ll)
 {
@@ -1013,6 +1015,7 @@ operator<<(NdbOut& out, const LogLevel &
   out << "]";
   return out;
 }
+#endif
 
 int
 EventLoggerBase::event_lookup(int eventType,

--- 1.74/ndb/src/kernel/blocks/dbdict/Dbdict.cpp	2007-01-22 19:10:37 +07:00
+++ 1.75/ndb/src/kernel/blocks/dbdict/Dbdict.cpp	2007-03-02 09:37:46 +07:00
@@ -2910,6 +2910,15 @@ Dbdict::execCREATE_TABLE_REQ(Signal* sig
       break;
     }
 
+    if(getNodeState().getSingleUserMode() &&
+       (refToNode(signal->getSendersBlockRef()) !=
+        getNodeState().getSingleUserApi()))
+    {
+      jam();
+      parseRecord.errorCode = CreateTableRef::SingleUser;
+      break;
+    }
+
     CreateTableRecordPtr createTabPtr;
     c_opCreateTable.seize(createTabPtr);
     
@@ -3072,6 +3081,15 @@ Dbdict::execALTER_TABLE_REQ(Signal* sign
     return;
   }
   
+  if(getNodeState().getSingleUserMode() &&
+     (refToNode(signal->getSendersBlockRef()) !=
+      getNodeState().getSingleUserApi()))
+  {
+    jam();
+    alterTableRef(signal, req, AlterTableRef::SingleUser);
+    return;
+  }
+
   const TableRecord::TabState tabState = tablePtr.p->tabState;
   bool ok = false;
   switch(tabState){
@@ -5396,6 +5414,15 @@ Dbdict::execDROP_TABLE_REQ(Signal* signa
     return;
   }
   
+  if(getNodeState().getSingleUserMode() &&
+     (refToNode(signal->getSendersBlockRef()) !=
+      getNodeState().getSingleUserApi()))
+  {
+    jam();
+    dropTableRef(signal, req, DropTableRef::SingleUser);
+    return;
+  }
+
   const TableRecord::TabState tabState = tablePtr.p->tabState;
   bool ok = false;
   switch(tabState){
@@ -6526,6 +6553,13 @@ Dbdict::execCREATE_INDX_REQ(Signal* sign
         jam();
         tmperr = CreateIndxRef::Busy;
       }
+      else if(getNodeState().getSingleUserMode() &&
+              (refToNode(senderRef) !=
+               getNodeState().getSingleUserApi()))
+      {
+        jam();
+        tmperr = CreateIndxRef::SingleUser;
+      }
       if (tmperr != CreateIndxRef::NoError) {
 	releaseSections(signal);
 	OpCreateIndex opBusy;
@@ -7095,6 +7129,13 @@ Dbdict::execDROP_INDX_REQ(Signal* signal
       } else if (c_blockState != BS_IDLE) {
         jam();
         tmperr = DropIndxRef::Busy;
+      }
+      else if(getNodeState().getSingleUserMode() &&
+              (refToNode(senderRef) !=
+               getNodeState().getSingleUserApi()))
+      {
+        jam();
+        tmperr = DropIndxRef::SingleUser;
       }
       if (tmperr != DropIndxRef::NoError) {
 	err = tmperr;

--- 1.102/ndb/src/kernel/blocks/dblqh/DblqhMain.cpp	2007-02-23 01:33:57 +07:00
+++ 1.103/ndb/src/kernel/blocks/dblqh/DblqhMain.cpp	2007-03-02 09:37:47 +07:00
@@ -456,6 +456,7 @@ void Dblqh::execCONTINUEB(Signal* signal
     else
     {
       jam();
+      cstartRecReq = 2;
       StartRecConf * conf = (StartRecConf*)signal->getDataPtrSend();
       conf->startingNodeId = getOwnNodeId();
       sendSignal(cmasterDihBlockref, GSN_START_RECCONF, signal, 
@@ -11665,7 +11666,7 @@ void Dblqh::execGCP_SAVEREQ(Signal* sign
     return;
   }
 
-  if(getNodeState().getNodeRestartInProgress() && cstartRecReq == ZFALSE)
+  if(getNodeState().getNodeRestartInProgress() && cstartRecReq < 2)
   {
     GCPSaveRef * const saveRef = (GCPSaveRef*)&signal->theData[0];
     saveRef->dihPtr = dihPtr;
@@ -11942,6 +11943,10 @@ void Dblqh::execFSCLOSECONF(Signal* sign
     // Set the prev file to check if we shall close it.
     logFilePtr.i = logFilePtr.p->prevLogFile;
     ptrCheckGuard(logFilePtr, clogFileFileSize, logFileRecord);
+
+    logPartPtr.i = logFilePtr.p->logPartRec;
+    ptrCheckGuard(logPartPtr, clogPartFileSize, logPartRecord);
+
     exitFromInvalidate(signal);
     return;
   case LogFileRecord::CLOSING_INIT:
@@ -13810,7 +13815,7 @@ void Dblqh::srCompletedLab(Signal* signa
        *  NO MORE FRAGMENTS ARE WAITING FOR SYSTEM RESTART.
        * -------------------------------------------------------------------- */
       lcpPtr.p->lcpState = LcpRecord::LCP_IDLE;
-      if (cstartRecReq == ZTRUE) {
+      if (cstartRecReq == 1) {
         jam();
 	/* ----------------------------------------------------------------
          *  WE HAVE ALSO RECEIVED AN INDICATION THAT NO MORE FRAGMENTS 
@@ -13880,7 +13885,7 @@ void Dblqh::execSTART_RECREQ(Signal* sig
   ndbrequire(req->receivingNodeId == cownNodeid);
 
   cnewestCompletedGci = cnewestGci;
-  cstartRecReq = ZTRUE;
+  cstartRecReq = 1;
   for (logPartPtr.i = 0; logPartPtr.i < 4; logPartPtr.i++) {
     ptrAss(logPartPtr, logPartRecord);
     logPartPtr.p->logPartNewestCompletedGCI = cnewestCompletedGci;
@@ -13901,6 +13906,7 @@ void Dblqh::execSTART_RECREQ(Signal* sig
   }//if
   if(cstartType == NodeState::ST_INITIAL_NODE_RESTART){
     jam();
+    cstartRecReq = 2;
     StartRecConf * conf = (StartRecConf*)signal->getDataPtrSend();
     conf->startingNodeId = getOwnNodeId();
     sendSignal(cmasterDihBlockref, GSN_START_RECCONF, signal, 
@@ -15719,6 +15725,7 @@ void Dblqh::srFourthComp(Signal* signal)
     else
     {
       jam();
+      cstartRecReq = 2;
       StartRecConf * conf = (StartRecConf*)signal->getDataPtrSend();
       conf->startingNodeId = getOwnNodeId();
       sendSignal(cmasterDihBlockref, GSN_START_RECCONF, signal, 
@@ -16685,7 +16692,7 @@ void Dblqh::initialiseRecordsLab(Signal*
     cCommitBlocked = false;
     ccurrentGcprec = RNIL;
     caddNodeState = ZFALSE;
-    cstartRecReq = ZFALSE;
+    cstartRecReq = 0;
     cnewestGci = (UintR)-1;
     cnewestCompletedGci = (UintR)-1;
     crestartOldestGci = 0;
Thread
bk commit into 5.0 tree (tomas:1.2433)tomas2 Mar