diff options
author | unknown <tulin/mysqldev@mysql.com/production.mysql.com> | 2007-03-08 04:27:41 +0100 |
---|---|---|
committer | unknown <tulin/mysqldev@mysql.com/production.mysql.com> | 2007-03-08 04:27:41 +0100 |
commit | b45970db7d21cac2af9aab3ae9bdc987a5bb7e51 (patch) | |
tree | 6f627a4ed3186a44f5f3ba8215d0bcea61f901ad /storage | |
parent | e911ded78a73c525dd5dbc97a3fca1eaf08d67eb (diff) | |
parent | 57097f69561750163d788d78056bf213dc3b0d62 (diff) | |
download | mariadb-git-b45970db7d21cac2af9aab3ae9bdc987a5bb7e51.tar.gz |
Merge bk-internal:/home/bk/mysql-5.1-new-ndb
into mysql.com:/data0/mysqldev/users/tomas/mysql-5.1-new-maint
client/sql_string.h:
Auto merged
storage/myisam/mi_open.c:
Auto merged
storage/ndb/src/common/debugger/EventLogger.cpp:
Auto merged
storage/ndb/src/kernel/blocks/dblqh/DblqhMain.cpp:
Auto merged
storage/ndb/test/ndbapi/testNodeRestart.cpp:
Auto merged
Diffstat (limited to 'storage')
10 files changed, 65 insertions, 8 deletions
diff --git a/storage/ndb/include/kernel/signaldata/AlterTable.hpp b/storage/ndb/include/kernel/signaldata/AlterTable.hpp index 6469e673370..3d348f8582a 100644 --- a/storage/ndb/include/kernel/signaldata/AlterTable.hpp +++ b/storage/ndb/include/kernel/signaldata/AlterTable.hpp @@ -212,7 +212,8 @@ public: NullablePrimaryKey = 740, UnsupportedChange = 741, BackupInProgress = 762, - IncompatibleVersions = 763 + IncompatibleVersions = 763, + SingleUser = 299 }; private: diff --git a/storage/ndb/include/kernel/signaldata/CreateIndx.hpp b/storage/ndb/include/kernel/signaldata/CreateIndx.hpp index 58a5c2ced93..74f1237c383 100644 --- a/storage/ndb/include/kernel/signaldata/CreateIndx.hpp +++ b/storage/ndb/include/kernel/signaldata/CreateIndx.hpp @@ -208,6 +208,7 @@ public: AllocationError = 4252, CreateIndexTableFailed = 4253, DuplicateAttributes = 4258, + SingleUser = 299, TableIsTemporary = 776, TableIsNotTemporary = 777, NoLoggingTemporaryIndex = 778 diff --git a/storage/ndb/include/kernel/signaldata/CreateTable.hpp b/storage/ndb/include/kernel/signaldata/CreateTable.hpp index 4257c0b20eb..6ee304fcad8 100644 --- a/storage/ndb/include/kernel/signaldata/CreateTable.hpp +++ b/storage/ndb/include/kernel/signaldata/CreateTable.hpp @@ -92,6 +92,7 @@ public: InvalidPrimaryKeySize = 739, NullablePrimaryKey = 740, InvalidCharset = 743, + SingleUser = 299, InvalidTablespace = 755, VarsizeBitfieldNotSupported = 757, NotATablespace = 758, diff --git a/storage/ndb/include/kernel/signaldata/DropIndx.hpp b/storage/ndb/include/kernel/signaldata/DropIndx.hpp index 01d500f2d84..6e3b183995f 100644 --- a/storage/ndb/include/kernel/signaldata/DropIndx.hpp +++ b/storage/ndb/include/kernel/signaldata/DropIndx.hpp @@ -172,7 +172,8 @@ public: IndexNotFound = 4243, BadRequestType = 4247, InvalidName = 4248, - NotAnIndex = 4254 + NotAnIndex = 4254, + SingleUser = 299 }; STATIC_CONST( SignalLength = DropIndxConf::SignalLength + 3 ); diff --git a/storage/ndb/include/kernel/signaldata/DropTable.hpp b/storage/ndb/include/kernel/signaldata/DropTable.hpp index 36268b23be1..c0a4596e1dc 100644 --- a/storage/ndb/include/kernel/signaldata/DropTable.hpp +++ b/storage/ndb/include/kernel/signaldata/DropTable.hpp @@ -58,7 +58,8 @@ public: InvalidTableVersion = 241, DropInProgress = 283, NoDropTableRecordAvailable = 1229, - BackupInProgress = 761 + BackupInProgress = 761, + SingleUser = 299 }; }; diff --git a/storage/ndb/src/common/debugger/signaldata/PackedSignal.cpp b/storage/ndb/src/common/debugger/signaldata/PackedSignal.cpp index 54048bcbb35..a5f585c23f0 100644 --- a/storage/ndb/src/common/debugger/signaldata/PackedSignal.cpp +++ b/storage/ndb/src/common/debugger/signaldata/PackedSignal.cpp @@ -96,6 +96,8 @@ printPACKED_SIGNAL(FILE * output, const Uint32 * theData, Uint32 len, Uint16 rec } default: fprintf(output, "Unknown signal type\n"); + i = len; // terminate printing + break; } }//for fprintf(output, "--------- End Packed Signals ----------\n"); diff --git a/storage/ndb/src/kernel/blocks/dbdict/Dbdict.cpp b/storage/ndb/src/kernel/blocks/dbdict/Dbdict.cpp index 15362a7c34e..767095ad56a 100644 --- a/storage/ndb/src/kernel/blocks/dbdict/Dbdict.cpp +++ b/storage/ndb/src/kernel/blocks/dbdict/Dbdict.cpp @@ -3758,6 +3758,15 @@ Dbdict::execCREATE_TABLE_REQ(Signal* signal){ break; } + if(getNodeState().getSingleUserMode() && + (refToNode(signal->getSendersBlockRef()) != + getNodeState().getSingleUserApi())) + { + jam(); + parseRecord.errorCode = CreateTableRef::SingleUser; + break; + } + CreateTableRecordPtr createTabPtr; c_opCreateTable.seize(createTabPtr); @@ -3950,6 +3959,15 @@ Dbdict::execALTER_TABLE_REQ(Signal* signal) 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){ @@ -6542,6 +6560,15 @@ Dbdict::execDROP_TABLE_REQ(Signal* signal){ 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){ @@ -7749,6 +7776,13 @@ Dbdict::execCREATE_INDX_REQ(Signal* signal) jam(); tmperr = CreateIndxRef::Busy; } + else if(getNodeState().getSingleUserMode() && + (refToNode(senderRef) != + getNodeState().getSingleUserApi())) + { + jam(); + tmperr = CreateIndxRef::SingleUser; + } if (tmperr != CreateIndxRef::NoError) { releaseSections(signal); OpCreateIndex opBusy; @@ -8392,6 +8426,13 @@ Dbdict::execDROP_INDX_REQ(Signal* signal) jam(); tmperr = DropIndxRef::Busy; } + else if(getNodeState().getSingleUserMode() && + (refToNode(senderRef) != + getNodeState().getSingleUserApi())) + { + jam(); + tmperr = DropIndxRef::SingleUser; + } if (tmperr != DropIndxRef::NoError) { err = tmperr; goto error; diff --git a/storage/ndb/src/kernel/blocks/dbdih/DbdihMain.cpp b/storage/ndb/src/kernel/blocks/dbdih/DbdihMain.cpp index 4934fca68c5..5e89f3f1d95 100644 --- a/storage/ndb/src/kernel/blocks/dbdih/DbdihMain.cpp +++ b/storage/ndb/src/kernel/blocks/dbdih/DbdihMain.cpp @@ -2098,8 +2098,11 @@ void Dbdih::gcpBlockedLab(Signal* signal) /*-------------------------------------------------------------------------*/ Uint32 startVersion = getNodeInfo(c_nodeStartMaster.startNode).m_version; - if ((getMajor(startVersion) == 4 && startVersion >= NDBD_INCL_NODECONF_VERSION_4) || - (getMajor(startVersion) == 5 && startVersion >= NDBD_INCL_NODECONF_VERSION_5)) + if ((getMajor(startVersion) == 4 && + startVersion >= NDBD_INCL_NODECONF_VERSION_4) || + (getMajor(startVersion) == 5 && + startVersion >= NDBD_INCL_NODECONF_VERSION_5) || + (getMajor(startVersion) > 5)) { c_INCL_NODEREQ_Counter.setWaitingFor(c_nodeStartMaster.startNode); } @@ -2342,8 +2345,11 @@ void Dbdih::execINCL_NODEREQ(Signal* signal) CRASH_INSERTION(7171); Uint32 masterVersion = getNodeInfo(refToNode(cmasterdihref)).m_version; - if ((NDB_VERSION_MAJOR == 4 && masterVersion >= NDBD_INCL_NODECONF_VERSION_4) || - (NDB_VERSION_MAJOR == 5 && masterVersion >= NDBD_INCL_NODECONF_VERSION_5)) + if ((NDB_VERSION_MAJOR == 4 && + masterVersion >= NDBD_INCL_NODECONF_VERSION_4) || + (NDB_VERSION_MAJOR == 5 && + masterVersion >= NDBD_INCL_NODECONF_VERSION_5) || + (NDB_VERSION_MAJOR > 5)) { signal->theData[0] = getOwnNodeId(); signal->theData[1] = getOwnNodeId(); @@ -14230,7 +14236,7 @@ Dbdih::execDUMP_STATE_ORD(Signal* signal) } if(arg == DumpStateOrd::EnableUndoDelayDataWrite){ - g_eventLogger.info("Dbdih:: delay write of datapages for table = %s", + g_eventLogger.info("Dbdih:: delay write of datapages for table = %d", dumpState->args[1]); // Send this dump to ACC and TUP EXECUTE_DIRECT(DBACC, GSN_DUMP_STATE_ORD, signal, 2); diff --git a/storage/ndb/src/ndbapi/ndberror.c b/storage/ndb/src/ndbapi/ndberror.c index 8e70f5ee250..193177fbd54 100644 --- a/storage/ndb/src/ndbapi/ndberror.c +++ b/storage/ndb/src/ndbapi/ndberror.c @@ -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" }, diff --git a/storage/ndb/tools/restore/consumer_restore.cpp b/storage/ndb/tools/restore/consumer_restore.cpp index 0e1c3f506f8..03cf3e6ddb7 100644 --- a/storage/ndb/tools/restore/consumer_restore.cpp +++ b/storage/ndb/tools/restore/consumer_restore.cpp @@ -669,6 +669,8 @@ err: bool BackupRestore::createSystable(const TableS & tables){ + if (!m_restore && !m_restore_meta && !m_restore_epoch) + return true; const char *tablename = tables.getTableName(); if( strcmp(tablename, NDB_REP_DB "/def/" NDB_APPLY_TABLE) != 0 && |