List:Commits« Previous MessageNext Message »
From:tomas Date:March 2 2007 3:17am
Subject:bk commit into 5.1 tree (tomas:1.2461)
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.2461 07/03/02 09:17:17 tomas@stripped +2 -0
  Merge poseidon.mysql.com:/home/tomas/mysql-5.1-telco-gca
  into  poseidon.mysql.com:/home/tomas/mysql-5.1-new-ndb

  storage/ndb/src/ndbapi/ndberror.c
    1.84 07/03/02 09:17:06 tomas@stripped +0 -0
    Auto merged

  storage/ndb/src/kernel/blocks/dbdict/Dbdict.cpp
    1.115 07/03/02 09:17:06 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-new-ndb/RESYNC

--- 1.114/storage/ndb/src/kernel/blocks/dbdict/Dbdict.cpp	2007-01-27 08:46:41 +07:00
+++ 1.115/storage/ndb/src/kernel/blocks/dbdict/Dbdict.cpp	2007-03-02 09:17:06 +07:00
@@ -3759,6 +3759,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);
     
@@ -3951,6 +3960,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){
@@ -6545,6 +6563,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){
@@ -7753,6 +7780,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;
@@ -8395,6 +8429,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.83/storage/ndb/src/ndbapi/ndberror.c	2007-02-21 11:41:13 +07:00
+++ 1.84/storage/ndb/src/ndbapi/ndberror.c	2007-03-02 09:17:06 +07:00
@@ -283,6 +283,7 @@ ErrorBundle ErrorCodes[] = {
   /**
    * Application error
    */
+  { 299,  DMEC, AE, "Operation not allowed or aborted due to single user mode" },
   { 763,  DMEC, AE, "Alter table requires cluster nodes to have exact same version" },
   { 823,  DMEC, AE, "Too much attrinfo from application in tuple manager" },
   { 831,  DMEC, AE, "Too many nullable/bitfields in table definition" },
Thread
bk commit into 5.1 tree (tomas:1.2461)tomas2 Mar