List:Commits« Previous MessageNext Message »
From:tomas Date:March 2 2007 3:06am
Subject:bk commit into 5.0 tree (tomas:1.2393) BUG#25275
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.2393 07/03/02 09:06:05 tomas@stripped +7 -0
  Bug #25275 SINGLE USER MODE prevents ALTER on non-ndb tables for other mysqld nodes
  (part 1)
  - add signal data
  - add ref in dict on create/drop table/index

  ndb/src/ndbapi/ndberror.c
    1.55 07/03/02 09:05:59 tomas@stripped +1 -0
    Bug #25275 SINGLE USER MODE prevents ALTER on non-ndb tables for other mysqld nodes
    (part 1)
    - add signal data
    - add ref in dict on create/drop table/index

  ndb/src/kernel/blocks/dbdict/Dbdict.cpp
    1.73 07/03/02 09:05:59 tomas@stripped +41 -0
    Bug #25275 SINGLE USER MODE prevents ALTER on non-ndb tables for other mysqld nodes
    (part 1)
    - add signal data
    - add ref in dict on create/drop table/index

  ndb/include/kernel/signaldata/DropTable.hpp
    1.6 07/03/02 09:05:59 tomas@stripped +2 -1
    Bug #25275 SINGLE USER MODE prevents ALTER on non-ndb tables for other mysqld nodes
    (part 1)
    - add signal data
    - add ref in dict on create/drop table/index

  ndb/include/kernel/signaldata/DropIndx.hpp
    1.6 07/03/02 09:05:59 tomas@stripped +2 -1
    Bug #25275 SINGLE USER MODE prevents ALTER on non-ndb tables for other mysqld nodes
    (part 1)
    - add signal data
    - add ref in dict on create/drop table/index

  ndb/include/kernel/signaldata/CreateTable.hpp
    1.6 07/03/02 09:05:59 tomas@stripped +2 -1
    Bug #25275 SINGLE USER MODE prevents ALTER on non-ndb tables for other mysqld nodes
    (part 1)
    - add signal data
    - add ref in dict on create/drop table/index

  ndb/include/kernel/signaldata/CreateIndx.hpp
    1.9 07/03/02 09:05:59 tomas@stripped +2 -1
    Bug #25275 SINGLE USER MODE prevents ALTER on non-ndb tables for other mysqld nodes
    (part 1)
    - add signal data
    - add ref in dict on create/drop table/index

  ndb/include/kernel/signaldata/AlterTable.hpp
    1.7 07/03/02 09:05:59 tomas@stripped +2 -1
    Bug #25275 SINGLE USER MODE prevents ALTER on non-ndb tables for other mysqld nodes
    (part 1)
    - add signal data
    - add ref in dict on create/drop table/index

# 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-telco-gca

--- 1.6/ndb/include/kernel/signaldata/AlterTable.hpp	2006-12-24 02:04:08 +07:00
+++ 1.7/ndb/include/kernel/signaldata/AlterTable.hpp	2007-03-02 09:05:59 +07:00
@@ -130,7 +130,8 @@ public:
     NullablePrimaryKey = 740,
     UnsupportedChange = 741,
     BackupInProgress = 762,
-    IncompatibleVersions = 763
+    IncompatibleVersions = 763,
+    SingleUser = 299
   };
 
 private:

--- 1.8/ndb/include/kernel/signaldata/CreateIndx.hpp	2006-12-24 02:04:09 +07:00
+++ 1.9/ndb/include/kernel/signaldata/CreateIndx.hpp	2007-03-02 09:05:59 +07:00
@@ -206,7 +206,8 @@ public:
     NotUnique = 4251,
     AllocationError = 4252,
     CreateIndexTableFailed = 4253,
-    DuplicateAttributes = 4258
+    DuplicateAttributes = 4258,
+    SingleUser = 299
   };
 
   CreateIndxConf m_conf;

--- 1.5/ndb/include/kernel/signaldata/CreateTable.hpp	2006-12-24 02:04:09 +07:00
+++ 1.6/ndb/include/kernel/signaldata/CreateTable.hpp	2007-03-02 09:05:59 +07:00
@@ -91,7 +91,8 @@ public:
     RecordTooBig = 738,
     InvalidPrimaryKeySize  = 739,
     NullablePrimaryKey = 740,
-    InvalidCharset = 743
+    InvalidCharset = 743,
+    SingleUser = 299
   };
 
 private:

--- 1.5/ndb/include/kernel/signaldata/DropIndx.hpp	2006-12-24 02:04:09 +07:00
+++ 1.6/ndb/include/kernel/signaldata/DropIndx.hpp	2007-03-02 09:05:59 +07:00
@@ -172,7 +172,8 @@ public:
     IndexNotFound = 4243,
     BadRequestType = 4247,
     InvalidName = 4248,
-    NotAnIndex = 4254
+    NotAnIndex = 4254,
+    SingleUser = 299
   };
   STATIC_CONST( SignalLength = DropIndxConf::SignalLength + 3 );
 

--- 1.5/ndb/include/kernel/signaldata/DropTable.hpp	2006-12-24 02:04:09 +07:00
+++ 1.6/ndb/include/kernel/signaldata/DropTable.hpp	2007-03-02 09:05:59 +07:00
@@ -58,7 +58,8 @@ public:
     InvalidTableVersion = 241,
     DropInProgress      = 283,
     NoDropTableRecordAvailable = 1229,
-    BackupInProgress = 761
+    BackupInProgress = 761,
+    SingleUser = 299
   };
 };
 

--- 1.72/ndb/src/kernel/blocks/dbdict/Dbdict.cpp	2006-12-24 02:04:15 +07:00
+++ 1.73/ndb/src/kernel/blocks/dbdict/Dbdict.cpp	2007-03-02 09:05:59 +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){
@@ -5401,6 +5419,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){
@@ -6531,6 +6558,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;
@@ -7100,6 +7134,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.54/ndb/src/ndbapi/ndberror.c	2007-01-05 21:33:32 +07:00
+++ 1.55/ndb/src/ndbapi/ndberror.c	2007-03-02 09:05:59 +07:00
@@ -264,6 +264,7 @@ ErrorBundle ErrorCodes[] = {
   /**
    * Application error
    */
+  { 299,  AE, "Operation not allowed or aborted due to single user mode" },
   { 763,  AE, "Alter table requires cluster nodes to have exact same version" },
   { 823,  AE, "Too much attrinfo from application in tuple manager" },
   { 831,  AE, "Too many nullable/bitfields in table definition" },
Thread
bk commit into 5.0 tree (tomas:1.2393) BUG#25275tomas2 Mar