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.2466 07/03/07 00:31:12 tomas@stripped +13 -0
Merge poseidon.mysql.com:/home/tomas/mysql-5.1
into poseidon.mysql.com:/home/tomas/mysql-5.1-new-ndb
storage/ndb/tools/restore/consumer_restore.cpp
1.41 07/03/07 00:30:53 tomas@stripped +0 -0
Auto merged
storage/ndb/test/ndbapi/testNodeRestart.cpp
1.44 07/03/07 00:30:53 tomas@stripped +0 -0
Auto merged
storage/ndb/src/ndbapi/SignalSender.cpp
1.17 07/03/07 00:30:53 tomas@stripped +0 -0
Auto merged
storage/ndb/src/ndbapi/ClusterMgr.hpp
1.19 07/03/07 00:30:53 tomas@stripped +0 -0
Auto merged
storage/ndb/src/mgmsrv/MgmtSrvr.cpp
1.122 07/03/07 00:30:53 tomas@stripped +0 -0
Auto merged
storage/ndb/src/kernel/blocks/dblqh/DblqhMain.cpp
1.142 07/03/07 00:30:53 tomas@stripped +0 -0
Auto merged
storage/ndb/src/kernel/blocks/dbdih/DbdihMain.cpp
1.110 07/03/07 00:30:52 tomas@stripped +0 -1
Auto merged
storage/ndb/src/kernel/blocks/dbdict/Dbdict.cpp
1.116 07/03/07 00:30:51 tomas@stripped +0 -0
Auto merged
storage/ndb/src/kernel/blocks/cmvmi/Cmvmi.cpp
1.47 07/03/07 00:30:51 tomas@stripped +0 -0
Auto merged
storage/ndb/src/common/debugger/EventLogger.cpp
1.38 07/03/07 00:30:51 tomas@stripped +0 -0
Auto merged
storage/myisam/mi_open.c
1.119 07/03/07 00:30:51 tomas@stripped +0 -0
Auto merged
sql/ha_ndbcluster.cc
1.417 07/03/07 00:30:51 tomas@stripped +0 -0
Auto merged
client/sql_string.h
1.20 07/03/07 00:30:50 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.37/storage/ndb/src/common/debugger/EventLogger.cpp 2007-02-22 00:04:07 +07:00
+++ 1.38/storage/ndb/src/common/debugger/EventLogger.cpp 2007-03-07 00:30:51 +07:00
@@ -608,21 +608,21 @@ void getTextTransporterError(QQQQ) {
lenth = sizeof(TransporterErrorString)/sizeof(struct myTransporterError);
for(i=0; i<lenth; i++)
{
- if(theData[2] == TransporterErrorString[i].errorNum)
+ if(theData[2] == (Uint32) TransporterErrorString[i].errorNum)
{
BaseString::snprintf(m_text, m_text_len,
- "Transporter to node %d reported error 0x%x: %s",
- theData[1],
- theData[2],
- TransporterErrorString[i].errorString);
+ "Transporter to node %d reported error 0x%x: %s",
+ theData[1],
+ theData[2],
+ TransporterErrorString[i].errorString);
break;
}
}
if(i == lenth)
BaseString::snprintf(m_text, m_text_len,
- "Transporter to node %d reported error 0x%x: unknown error",
- theData[1],
- theData[2]);
+ "Transporter to node %d reported error 0x%x: unknown error",
+ theData[1],
+ theData[2]);
}
void getTextTransporterWarning(QQQQ) {
getTextTransporterError(m_text, m_text_len, theData);
@@ -1043,6 +1043,7 @@ EventLogger::close()
}
#ifdef NOT_USED
+
static NdbOut&
operator<<(NdbOut& out, const LogLevel & ll)
{
--- 1.115/storage/ndb/src/kernel/blocks/dbdict/Dbdict.cpp 2007-02-23 18:13:51 +07:00
+++ 1.116/storage/ndb/src/kernel/blocks/dbdict/Dbdict.cpp 2007-03-07 00:30:51 +07:00
@@ -3758,6 +3758,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);
@@ -3950,6 +3959,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){
@@ -6542,6 +6560,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){
@@ -7749,6 +7776,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;
@@ -8391,6 +8425,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.109/storage/ndb/src/kernel/blocks/dbdih/DbdihMain.cpp 2007-02-23 18:13:51 +07:00
+++ 1.110/storage/ndb/src/kernel/blocks/dbdih/DbdihMain.cpp 2007-03-07 00:30:52 +07:00
@@ -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* sig
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);
--- 1.141/storage/ndb/src/kernel/blocks/dblqh/DblqhMain.cpp 2007-02-26 14:11:56 +07:00
+++ 1.142/storage/ndb/src/kernel/blocks/dblqh/DblqhMain.cpp 2007-03-07 00:30:53 +07:00
@@ -441,6 +441,7 @@ void Dblqh::execCONTINUEB(Signal* signal
else
{
jam();
+ cstartRecReq = 2;
ndbrequire(c_redo_complete_fragments.isEmpty());
StartRecConf * conf = (StartRecConf*)signal->getDataPtrSend();
conf->startingNodeId = getOwnNodeId();
@@ -11936,7 +11937,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;
@@ -12248,6 +12249,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:
@@ -14017,7 +14022,7 @@ void Dblqh::execRESTORE_LCP_CONF(Signal*
return;
}
- if (c_lcp_restoring_fragments.isEmpty() && cstartRecReq == ZTRUE)
+ if (c_lcp_restoring_fragments.isEmpty() && cstartRecReq == 1)
{
jam();
/* ----------------------------------------------------------------
@@ -14058,7 +14063,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;
@@ -14072,6 +14077,7 @@ void Dblqh::execSTART_RECREQ(Signal* sig
*------------------------------------------------------------------------ */
if(cstartType == NodeState::ST_INITIAL_NODE_RESTART){
jam();
+ cstartRecReq = 2;
StartRecConf * conf = (StartRecConf*)signal->getDataPtrSend();
conf->startingNodeId = getOwnNodeId();
sendSignal(cmasterDihBlockref, GSN_START_RECCONF, signal,
@@ -15893,6 +15899,7 @@ void Dblqh::srFourthComp(Signal* signal)
return;
}
}
+ cstartRecReq = 2;
StartRecConf * conf = (StartRecConf*)signal->getDataPtrSend();
conf->startingNodeId = getOwnNodeId();
sendSignal(cmasterDihBlockref, GSN_START_RECCONF, signal,
@@ -16761,7 +16768,7 @@ void Dblqh::initialiseRecordsLab(Signal*
cnoActiveCopy = 0;
ccurrentGcprec = RNIL;
caddNodeState = ZFALSE;
- cstartRecReq = ZFALSE;
+ cstartRecReq = 0;
cnewestGci = 0;
cnewestCompletedGci = 0;
crestartOldestGci = 0;
--- 1.43/storage/ndb/test/ndbapi/testNodeRestart.cpp 2007-02-21 21:45:07 +07:00
+++ 1.44/storage/ndb/test/ndbapi/testNodeRestart.cpp 2007-03-07 00:30:53 +07:00
@@ -1353,6 +1353,68 @@ runBug26481(NDBT_Context* ctx, NDBT_Step
return NDBT_OK;
}
+int
+runBug26450(NDBT_Context* ctx, NDBT_Step* step)
+{
+ Uint32 i;
+ int result = NDBT_OK;
+ int loops = ctx->getNumLoops();
+ int records = ctx->getNumRecords();
+ NdbRestarter res;
+ Ndb* pNdb = GETNDB(step);
+
+ int node = res.getRandomNotMasterNodeId(rand());
+ Vector<int> nodes;
+ for (unsigned i = 0; i<res.getNumDbNodes(); i++)
+ {
+ if (res.getDbNodeId(i) != node)
+ nodes.push_back(res.getDbNodeId(i));
+ }
+
+ if (res.restartAll())
+ return NDBT_FAILED;
+
+ if (res.waitClusterStarted())
+ return NDBT_FAILED;
+
+ ndbout_c("node: %d", node);
+ if (res.restartOneDbNode(node, false, true, true))
+ return NDBT_FAILED;
+
+ if (res.waitNodesNoStart(&node, 1))
+ return NDBT_FAILED;
+
+ if (runClearTable(ctx, step))
+ return NDBT_FAILED;
+
+ for (i = 0; i < 2; i++)
+ {
+ if (res.restartAll(false, true, i > 0))
+ return NDBT_FAILED;
+
+ if (res.waitClusterNoStart())
+ return NDBT_FAILED;
+
+ if (res.startNodes(nodes.getBase(), nodes.size()))
+ return NDBT_FAILED;
+
+ if (res.waitNodesStarted(nodes.getBase(), nodes.size()))
+ return NDBT_FAILED;
+ }
+
+ if (res.startNodes(&node, 1))
+ return NDBT_FAILED;
+
+ if (res.waitNodesStarted(&node, 1))
+ return NDBT_FAILED;
+
+ HugoTransactions trans (* ctx->getTab());
+ if (trans.selectCount(pNdb) != 0)
+ return NDBT_FAILED;
+
+ return NDBT_OK;
+}
+
NDBT_TESTSUITE(testNodeRestart);
TESTCASE("NoLoad",
"Test that one node at a time can be stopped and then restarted "\
@@ -1696,6 +1758,10 @@ TESTCASE("Bug26457", ""){
}
TESTCASE("Bug26481", ""){
INITIALIZER(runBug26481);
+}
+TESTCASE("Bug26450", ""){
+ INITIALIZER(runLoadTable);
+ INITIALIZER(runBug26450);
}
NDBT_TESTSUITE_END(testNodeRestart);
--- 1.40/storage/ndb/tools/restore/consumer_restore.cpp 2007-02-23 18:13:51 +07:00
+++ 1.41/storage/ndb/tools/restore/consumer_restore.cpp 2007-03-07 00:30:53 +07:00
@@ -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 &&
| Thread |
|---|
| • bk commit into 5.1 tree (tomas:1.2466) | tomas | 6 Mar |