Below is the list of changes that have just been committed into a local
5.1 repository of mikron. When mikron 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@stripped, 2007-03-02 18:30:15+01:00, mikron@stripped +22 -0
Merge mikael-ronstr-ms-dator.local:/Users/mikron/mysql_clones/latest_cluster
into mikael-ronstr-ms-dator.local:/Users/mikron/mysql_clones/latest_wl3683
MERGE: 1.2409.2.7
configure.in@stripped, 2007-03-02 18:30:13+01:00, mikron@stripped +2 -5
manual merge
MERGE: 1.420.3.5
sql/mysqld.cc@stripped, 2007-03-02 16:59:08+01:00, mikron@stripped +0 -0
Auto merged
MERGE: 1.609.1.1
sql/sql_class.cc@stripped, 2007-03-02 16:59:08+01:00, mikron@stripped +0 -0
Auto merged
MERGE: 1.308.2.3
storage/ndb/include/kernel/GlobalSignalNumbers.h@stripped, 2007-03-02 16:59:08+01:00, mikron@stripped +0 -0
Auto merged
MERGE: 1.32.1.2
storage/ndb/include/kernel/signaldata/DumpStateOrd.hpp@stripped, 2007-03-02 16:59:09+01:00, mikron@stripped +0 -0
Auto merged
MERGE: 1.14.1.2
storage/ndb/include/ndbapi/NdbTransaction.hpp@stripped, 2007-03-02 16:59:10+01:00, mikron@stripped +0 -0
Auto merged
MERGE: 1.53.1.1
storage/ndb/src/kernel/blocks/dbdict/Dbdict.cpp@stripped, 2007-03-02 16:59:11+01:00, mikron@stripped +0 -0
Auto merged
MERGE: 1.113.1.2
storage/ndb/src/kernel/blocks/dbdict/Dbdict.hpp@stripped, 2007-03-02 16:59:11+01:00, mikron@stripped +0 -0
Auto merged
MERGE: 1.46.1.2
storage/ndb/src/kernel/blocks/dbdih/Dbdih.hpp@stripped, 2007-03-02 16:59:11+01:00, mikron@stripped +0 -0
Auto merged
MERGE: 1.25.2.2
storage/ndb/src/kernel/blocks/dbdih/DbdihMain.cpp@stripped, 2007-03-02 16:59:13+01:00, mikron@stripped +0 -0
Auto merged
MERGE: 1.99.1.5
storage/ndb/src/kernel/blocks/dblqh/Dblqh.hpp@stripped, 2007-03-02 16:59:14+01:00, mikron@stripped +0 -0
Auto merged
MERGE: 1.57.1.2
storage/ndb/src/kernel/blocks/dblqh/DblqhMain.cpp@stripped, 2007-03-02 18:30:13+01:00, mikron@stripped +0 -1
manual merge
MERGE: 1.130.2.7
storage/ndb/src/kernel/blocks/ndbcntr/Ndbcntr.hpp@stripped, 2007-03-02 16:59:17+01:00, mikron@stripped +0 -0
Auto merged
MERGE: 1.9.1.1
storage/ndb/src/kernel/blocks/ndbcntr/NdbcntrMain.cpp@stripped, 2007-03-02 16:59:18+01:00, mikron@stripped +0 -0
Auto merged
MERGE: 1.44.1.2
storage/ndb/src/kernel/blocks/qmgr/Qmgr.hpp@stripped, 2007-03-02 16:59:22+01:00, mikron@stripped +0 -0
Auto merged
MERGE: 1.16.2.5
storage/ndb/src/kernel/blocks/qmgr/QmgrMain.cpp@stripped, 2007-03-02 16:59:22+01:00, mikron@stripped +0 -0
Auto merged
MERGE: 1.47.1.7
storage/ndb/src/kernel/blocks/suma/Suma.cpp@stripped, 2007-03-02 16:59:23+01:00, mikron@stripped +0 -0
Auto merged
MERGE: 1.51.1.5
storage/ndb/src/kernel/vm/DynArr256.cpp@stripped, 2007-03-02 16:59:24+01:00, mikron@stripped +0 -0
Auto merged
MERGE: 1.2.1.1
storage/ndb/src/mgmsrv/ConfigInfo.cpp@stripped, 2007-03-02 16:59:24+01:00, mikron@stripped +0 -0
Auto merged
MERGE: 1.97.2.1
storage/ndb/src/ndbapi/NdbScanOperation.cpp@stripped, 2007-03-02 16:59:26+01:00, mikron@stripped +0 -0
Auto merged
MERGE: 1.105.1.6
storage/ndb/test/ndbapi/testNodeRestart.cpp@stripped, 2007-03-02 16:59:26+01:00, mikron@stripped +0 -0
Auto merged
MERGE: 1.39.1.2
storage/ndb/test/run-test/daily-basic-tests.txt@stripped, 2007-03-02 16:59:27+01:00, mikron@stripped +0 -0
Auto merged
MERGE: 1.64.1.4
# 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: mikron
# Host: 21.37.251.10.in-addr.arpa
# Root: /Users/mikron/mysql_clones/latest_wl3683/RESYNC
--- 1.435/configure.in 2007-02-13 22:57:03 +01:00
+++ 1.436/configure.in 2007-03-02 18:30:13 +01:00
@@ -7,12 +7,12 @@
AC_CANONICAL_SYSTEM
# The Docs Makefile.am parses this line!
# remember to also update version.c in ndb
-AM_INIT_AUTOMAKE(mysql, 5.1.16-ndb-6.2.0)
+AM_INIT_AUTOMAKE(mysql, 5.1.16-ndb-6.3.1)
AM_CONFIG_HEADER(config.h)
NDB_VERSION_MAJOR=6
-NDB_VERSION_MINOR=2
-NDB_VERSION_BUILD=0
+NDB_VERSION_MINOR=3
+NDB_VERSION_BUILD=1
NDB_VERSION_STATUS="-beta"
PROTOCOL_VERSION=10
--- 1.3/storage/ndb/src/kernel/vm/DynArr256.cpp 2007-01-17 16:27:41 +01:00
+++ 1.4/storage/ndb/src/kernel/vm/DynArr256.cpp 2007-03-02 16:59:24 +01:00
@@ -303,7 +303,6 @@
Uint32 idx = 0;
Uint32 alloc[5];
Uint32 sz = m_head.m_sz;
- Uint32 shl = 0;
for (; pos >= g_max_sizes[sz]; sz++);
--- 1.66/storage/ndb/test/run-test/daily-basic-tests.txt 2007-02-06 08:56:05 +01:00
+++ 1.67/storage/ndb/test/run-test/daily-basic-tests.txt 2007-03-02 16:59:27 +01:00
@@ -81,6 +81,10 @@
max-time: 500
cmd: testBasic
+args: -n DeleteRead
+
+max-time: 500
+cmd: testBasic
args: -n PkReadAndLocker T6 D1 D2
max-time: 500
@@ -461,7 +465,7 @@
cmd: testScan
args: -n Bug24447 T1
-max-time: 500
+max-time: 1000
cmd: testScan
args: -n ScanVariants
@@ -520,6 +524,10 @@
max-time: 1000
cmd: testNodeRestart
args: -n Bug25554 T1
+
+max-time: 1000
+cmd: testNodeRestart
+args: -n Bug25984
#
# DICT TESTS
--- 1.34/storage/ndb/include/kernel/GlobalSignalNumbers.h 2007-02-06 08:56:03 +01:00
+++ 1.35/storage/ndb/include/kernel/GlobalSignalNumbers.h 2007-03-02 16:59:08 +01:00
@@ -90,7 +90,8 @@
#define GSN_TCSEIZEREF 38
#define GSN_TCSEIZEREQ 39
-/* 40 unused */
+#define GSN_TCKEY_FAILREFCONF_R 40
+
/* 41 unused */
/* 42 unused */
/* 43 unused */
--- 1.16/storage/ndb/include/kernel/signaldata/DumpStateOrd.hpp 2007-02-06 08:56:03 +01:00
+++ 1.17/storage/ndb/include/kernel/signaldata/DumpStateOrd.hpp 2007-03-02 16:59:09 +01:00
@@ -107,7 +107,10 @@
CmvmiDumpLongSignalMemory = 2601,
CmvmiSetRestartOnErrorInsert = 2602,
CmvmiTestLongSigWithDelay = 2603,
-
+ CmvmiDumpSubscriptions = 2604, /* note: done to respective outfile
+ to be able to debug if events
+ for some reason does not end up
+ in clusterlog */
LCPContinue = 5900,
// 7000 DIH
// 7001 DIH
--- 1.54/storage/ndb/include/ndbapi/NdbTransaction.hpp 2007-01-30 19:45:41 +01:00
+++ 1.55/storage/ndb/include/ndbapi/NdbTransaction.hpp 2007-03-02 16:59:10 +01:00
@@ -764,8 +764,8 @@
* 1) Bitmask with used nodes
* 2) Bitmask with nodes failed during op
*/
- Uint32 m_db_nodes[2];
- Uint32 m_failed_db_nodes[2];
+ Uint32 m_db_nodes[NDB_API_NDB_NODE_BITMASK_SIZE];
+ Uint32 m_failed_db_nodes[NDB_API_NDB_NODE_BITMASK_SIZE];
int report_node_failure(Uint32 id);
--- 1.99/storage/ndb/src/mgmsrv/ConfigInfo.cpp 2007-02-12 08:29:55 +01:00
+++ 1.100/storage/ndb/src/mgmsrv/ConfigInfo.cpp 2007-03-02 16:59:24 +01:00
@@ -1707,7 +1707,7 @@
false,
ConfigInfo::CI_INT,
MANDATORY,
- "1", "63" },
+ "1", MAX_NODES_STRING },
{
CFG_CONNECTION_SEND_SIGNAL_ID,
@@ -1944,7 +1944,7 @@
false,
ConfigInfo::CI_INT,
MANDATORY,
- "1", "63" },
+ "1", MAX_NODES_STRING },
{
CFG_CONNECTION_SEND_SIGNAL_ID,
@@ -2076,7 +2076,7 @@
false,
ConfigInfo::CI_INT,
MANDATORY,
- "1", "63" },
+ "1", MAX_NODES_STRING },
{
CFG_CONNECTION_HOSTNAME_1,
--- 1.115/storage/ndb/src/kernel/blocks/dbdict/Dbdict.cpp 2007-02-06 08:56:04 +01:00
+++ 1.116/storage/ndb/src/kernel/blocks/dbdict/Dbdict.cpp 2007-03-02 16:59:11 +01:00
@@ -6119,11 +6119,6 @@
tablePtr.p->defaultNoPartFlag = c_tableDesc.DefaultNoPartFlag;
tablePtr.p->linearHashFlag = c_tableDesc.LinearHashFlag;
- Uint64 maxRows =
- (((Uint64)tablePtr.p->maxRowsHigh) << 32) + tablePtr.p->maxRowsLow;
- Uint64 minRows =
- (((Uint64)tablePtr.p->minRowsHigh) << 32) + tablePtr.p->minRowsLow;
-
{
Rope frm(c_rope_pool, tablePtr.p->frmData);
tabRequire(frm.assign(c_tableDesc.FrmData, c_tableDesc.FrmLen),
--- 1.48/storage/ndb/src/kernel/blocks/dbdict/Dbdict.hpp 2007-02-06 08:56:04 +01:00
+++ 1.49/storage/ndb/src/kernel/blocks/dbdict/Dbdict.hpp 2007-03-02 16:59:11 +01:00
@@ -1131,6 +1131,7 @@
* seize/release invokes ctor/dtor automatically.
*/
struct OpRecordCommon {
+ OpRecordCommon() {}
Uint32 key; // key shared between master and slaves
Uint32 nextHash;
Uint32 prevHash;
@@ -1146,6 +1147,7 @@
* Create table record
*/
struct CreateTableRecord : OpRecordCommon {
+ CreateTableRecord() {}
Uint32 m_senderRef;
Uint32 m_senderData;
Uint32 m_coordinatorRef;
@@ -1189,6 +1191,7 @@
* Drop table record
*/
struct DropTableRecord : OpRecordCommon {
+ DropTableRecord() {}
DropTableReq m_request;
Uint32 m_requestType;
--- 1.29/storage/ndb/src/kernel/blocks/dbdih/Dbdih.hpp 2007-02-07 19:31:59 +01:00
+++ 1.30/storage/ndb/src/kernel/blocks/dbdih/Dbdih.hpp 2007-03-02 16:59:11 +01:00
@@ -1312,6 +1312,7 @@
private:
struct LcpState {
+ LcpState() {}
LcpStatus lcpStatus;
Uint32 lcpStatusUpdatedPlace;
@@ -1418,6 +1419,7 @@
private:
class MasterTakeOverState {
public:
+ MasterTakeOverState() {}
void set(LcpMasterTakeOverState s, Uint32 line) {
state = s; updatePlace = line;
}
@@ -1505,6 +1507,7 @@
* SwitchReplicaRecord - Should only be used by master
*/
struct SwitchReplicaRecord {
+ SwitchReplicaRecord() {}
void clear(){}
Uint32 nodeId;
--- 1.104/storage/ndb/src/kernel/blocks/dbdih/DbdihMain.cpp 2007-03-01 18:49:48 +01:00
+++ 1.105/storage/ndb/src/kernel/blocks/dbdih/DbdihMain.cpp 2007-03-02 16:59:13 +01:00
@@ -1451,11 +1451,58 @@
void Dbdih::execDIH_RESTARTREQ(Signal* signal)
{
jamEntry();
- cntrlblockref = signal->theData[0];
- if(m_ctx.m_config.getInitialStart()){
- sendSignal(cntrlblockref, GSN_DIH_RESTARTREF, signal, 1, JBB);
- } else {
- readGciFileLab(signal);
+ if (signal->theData[0])
+ {
+ jam();
+ cntrlblockref = signal->theData[0];
+ if(m_ctx.m_config.getInitialStart()){
+ sendSignal(cntrlblockref, GSN_DIH_RESTARTREF, signal, 1, JBB);
+ } else {
+ readGciFileLab(signal);
+ }
+ }
+ else
+ {
+ /**
+ * Precondition, (not checked)
+ * atleast 1 node in each node group
+ */
+ Uint32 i;
+ NdbNodeBitmask mask;
+ mask.assign(NdbNodeBitmask::Size, signal->theData + 1);
+ Uint32 *node_gcis = signal->theData+1+NdbNodeBitmask::Size;
+ Uint32 node_group_gcis[MAX_NDB_NODES+1];
+ bzero(node_group_gcis, sizeof(node_group_gcis));
+ for (i = 0; i<MAX_NDB_NODES; i++)
+ {
+ if (mask.get(i))
+ {
+ jam();
+ Uint32 ng = Sysfile::getNodeGroup(i, SYSFILE->nodeGroups);
+ ndbrequire(ng < MAX_NDB_NODES);
+ Uint32 gci = node_gcis[i];
+ if (gci > node_group_gcis[ng])
+ {
+ jam();
+ node_group_gcis[ng] = gci;
+ }
+ }
+ }
+ for (i = 0; i<MAX_NDB_NODES && node_group_gcis[i] == 0; i++);
+
+ Uint32 gci = node_group_gcis[i];
+ for (i++ ; i<MAX_NDB_NODES; i++)
+ {
+ jam();
+ if (node_group_gcis[i] && node_group_gcis[i] != gci)
+ {
+ jam();
+ signal->theData[0] = i;
+ return;
+ }
+ }
+ signal->theData[0] = MAX_NDB_NODES;
+ return;
}
return;
}//Dbdih::execDIH_RESTARTREQ()
@@ -1782,10 +1829,26 @@
*/
SYSFILE->lastCompletedGCI[nodePtr.i] = 0;
ndbrequire(nodePtr.p->nodeStatus != NodeRecord::ALIVE);
- warningEvent("Making filesystem for node %d unusable",
+ warningEvent("Making filesystem for node %d unusable (need --initial)",
nodePtr.i);
}
+ else if (nodePtr.p->nodeStatus == NodeRecord::ALIVE &&
+ SYSFILE->lastCompletedGCI[nodePtr.i] == 0)
+ {
+ jam();
+ CRASH_INSERTION(7170);
+ char buf[255];
+ BaseString::snprintf(buf, sizeof(buf),
+ "Cluster requires this node to be started "
+ " with --initial as partial start has been performed"
+ " and this filesystem is unusable");
+ progError(__LINE__,
+ NDBD_EXIT_SR_RESTARTCONFLICT,
+ buf);
+ ndbrequire(false);
+ }
}
+
/**
* This set which GCI we will try to restart to
*/
@@ -2078,8 +2141,8 @@
return;
}//if
if (getNodeStatus(nodeId) != NodeRecord::DEAD){
- ndbout << "nodeStatus in START_PERMREQ = "
- << (Uint32) getNodeStatus(nodeId) << endl;
+ g_eventLogger.error("nodeStatus in START_PERMREQ = %u",
+ (Uint32) getNodeStatus(nodeId));
ndbrequire(false);
}//if
@@ -4492,9 +4555,9 @@
jam();
break;
default:
- ndbout_c("outstanding gsn: %s(%d)",
- getSignalName(c_nodeStartMaster.m_outstandingGsn),
- c_nodeStartMaster.m_outstandingGsn);
+ g_eventLogger.error("outstanding gsn: %s(%d)",
+ getSignalName(c_nodeStartMaster.m_outstandingGsn),
+ c_nodeStartMaster.m_outstandingGsn);
ndbrequire(false);
}
@@ -4947,9 +5010,10 @@
failedNodePtr.p->activeStatus = Sysfile::NS_NotActive_NotTakenOver;
break;
default:
- ndbout << "activeStatus = " << (Uint32) failedNodePtr.p->activeStatus;
- ndbout << " at failure after NODE_FAILREP of node = ";
- ndbout << failedNodePtr.i << endl;
+ g_eventLogger.error("activeStatus = %u "
+ "at failure after NODE_FAILREP of node = %u",
+ (Uint32) failedNodePtr.p->activeStatus,
+ failedNodePtr.i);
ndbrequire(false);
break;
}//switch
@@ -5104,7 +5168,7 @@
/**
* Node failure during master take over...
*/
- ndbout_c("Nodefail during master take over");
+ g_eventLogger.info("Nodefail during master take over");
}
setLocalNodefailHandling(signal, nodeId, NF_LCP_TAKE_OVER);
@@ -5350,7 +5414,8 @@
if (latestLcpId > SYSFILE->latestLCP_ID) {
jam();
#if 0
- ndbout_c("Dbdih: Setting SYSFILE->latestLCP_ID to %d", latestLcpId);
+ g_eventLogger.info("Dbdih: Setting SYSFILE->latestLCP_ID to %d",
+ latestLcpId);
SYSFILE->latestLCP_ID = latestLcpId;
#endif
SYSFILE->keepGCI = oldestKeepGci;
@@ -6009,7 +6074,7 @@
if (ERROR_INSERTED(7030))
{
- ndbout_c("Reenable GCP_PREPARE");
+ g_eventLogger.info("Reenable GCP_PREPARE");
CLEAR_ERROR_INSERT_VALUE;
}
@@ -6182,7 +6247,7 @@
c_lcpState.setLcpStatus(LCP_STATUS_IDLE, __LINE__);
#if 0
if(c_copyGCISlave.m_copyReason == CopyGCIReq::LOCAL_CHECKPOINT){
- ndbout_c("Dbdih: Also resetting c_copyGCISlave");
+ g_eventLogger.info("Dbdih: Also resetting c_copyGCISlave");
c_copyGCISlave.m_copyReason = CopyGCIReq::IDLE;
c_copyGCISlave.m_expectedNextWord = 0;
}
@@ -6267,7 +6332,7 @@
if(c_lcpState.lcpStatus == LCP_TAB_SAVED){
#ifdef VM_TRACE
- ndbout_c("Sending extra GSN_LCP_COMPLETE_REP to new master");
+ g_eventLogger.info("Sending extra GSN_LCP_COMPLETE_REP to new master");
#endif
sendLCP_COMPLETE_REP(signal);
}
@@ -6423,7 +6488,7 @@
nodePtr.p->lcpStateAtTakeOver = lcpState;
#ifdef VM_TRACE
- ndbout_c("MASTER_LCPCONF");
+ g_eventLogger.info("MASTER_LCPCONF");
printMASTER_LCP_CONF(stdout, &signal->theData[0], 0, 0);
#endif
@@ -6500,7 +6565,7 @@
// protocol.
/* --------------------------------------------------------------------- */
#ifdef VM_TRACE
- ndbout_c("MASTER_LCPhandling:: LMTOS_ALL_IDLE -> checkLcpStart");
+ g_eventLogger.info("MASTER_LCPhandling:: LMTOS_ALL_IDLE -> checkLcpStart");
#endif
checkLcpStart(signal, __LINE__);
break;
@@ -6511,7 +6576,7 @@
// protocol by calculating the keep gci and storing the new lcp id.
/* --------------------------------------------------------------------- */
#ifdef VM_TRACE
- ndbout_c("MASTER_LCPhandling:: LMTOS_COPY_ONGOING -> storeNewLcpId");
+ g_eventLogger.info("MASTER_LCPhandling:: LMTOS_COPY_ONGOING -> storeNewLcpId");
#endif
if (c_lcpState.lcpStatus == LCP_STATUS_ACTIVE) {
jam();
@@ -6522,7 +6587,7 @@
/*---------------------------------------------------------------------*/
Uint32 lcpId = SYSFILE->latestLCP_ID;
#ifdef VM_TRACE
- ndbout_c("Decreasing latestLCP_ID from %d to %d", lcpId, lcpId - 1);
+ g_eventLogger.info("Decreasing latestLCP_ID from %d to %d", lcpId, lcpId - 1);
#endif
SYSFILE->latestLCP_ID--;
}//if
@@ -6539,10 +6604,10 @@
* complete before finalising the LCP process.
* ------------------------------------------------------------------ */
#ifdef VM_TRACE
- ndbout_c("MASTER_LCPhandling:: LMTOS_ALL_ACTIVE -> "
- "startLcpRoundLoopLab(table=%u, fragment=%u)",
- c_lcpMasterTakeOverState.minTableId,
- c_lcpMasterTakeOverState.minFragId);
+ g_eventLogger.info("MASTER_LCPhandling:: LMTOS_ALL_ACTIVE -> "
+ "startLcpRoundLoopLab(table=%u, fragment=%u)",
+ c_lcpMasterTakeOverState.minTableId,
+ c_lcpMasterTakeOverState.minFragId);
#endif
c_lcpState.keepGci = SYSFILE->keepGCI;
@@ -7946,8 +8011,8 @@
if (cgcpSameCounter == 1200) {
jam();
#ifdef VM_TRACE
- ndbout << "System crash due to GCP Stop in state = ";
- ndbout << (Uint32) cgcpStatus << endl;
+ g_eventLogger.error("System crash due to GCP Stop in state = %u",
+ (Uint32) cgcpStatus);
#endif
crashSystemAtGcpStop(signal);
return;
@@ -7960,8 +8025,8 @@
if (cgcpSameCounter == 1200) {
jam();
#ifdef VM_TRACE
- ndbout << "System crash due to GCP Stop in state = ";
- ndbout << (Uint32) cgcpStatus << endl;
+ g_eventLogger.error("System crash due to GCP Stop in state = %u",
+ (Uint32) cgcpStatus);
#endif
crashSystemAtGcpStop(signal);
return;
@@ -8152,7 +8217,7 @@
getNodeState().startLevel == NodeState::SL_STARTED){
jam();
#if 0
- ndbout_c("Dbdih: Clearing initial start ongoing");
+ g_eventLogger.info("Dbdih: Clearing initial start ongoing");
#endif
Sysfile::clearInitialStartOngoing(SYSFILE->systemRestartBits);
}
@@ -8171,7 +8236,7 @@
if (ERROR_INSERTED(7030))
{
cgckptflag = true;
- ndbout_c("Delayed GCP_PREPARE 5s");
+ g_eventLogger.info("Delayed GCP_PREPARE 5s");
sendSignalWithDelay(reference(), GSN_GCP_PREPARE, signal, 5000,
signal->getLength());
return;
@@ -8191,7 +8256,7 @@
if (ERROR_INSERTED(7031))
{
- ndbout_c("Crashing delayed in GCP_PREPARE 3s");
+ g_eventLogger.info("Crashing delayed in GCP_PREPARE 3s");
signal->theData[0] = 9999;
sendSignalWithDelay(CMVMI_REF, GSN_NDB_TAMPER, signal, 3000, 1);
return;
@@ -8729,7 +8794,7 @@
* This is LCP master takeover
*/
#ifdef VM_TRACE
- ndbout_c("initLcpLab aborted due to LCP master takeover - 1");
+ g_eventLogger.info("initLcpLab aborted due to LCP master takeover - 1");
#endif
c_lcpState.setLcpStatus(LCP_STATUS_IDLE, __LINE__);
sendMASTER_LCPCONF(signal);
@@ -8742,7 +8807,7 @@
* Master take over but has not yet received MASTER_LCPREQ
*/
#ifdef VM_TRACE
- ndbout_c("initLcpLab aborted due to LCP master takeover - 2");
+ g_eventLogger.info("initLcpLab aborted due to LCP master takeover - 2");
#endif
return;
}
@@ -10051,9 +10116,10 @@
{
CRASH_INSERTION(7009);
if (c_lcpState.lcpStatus != LCP_STATUS_IDLE) {
- ndbout << "lcpStatus = " << (Uint32) c_lcpState.lcpStatus;
- ndbout << "lcpStatusUpdatedPlace = " <<
- c_lcpState.lcpStatusUpdatedPlace << endl;
+ g_eventLogger.error("lcpStatus = %u"
+ "lcpStatusUpdatedPlace = %d",
+ (Uint32) c_lcpState.lcpStatus,
+ c_lcpState.lcpStatusUpdatedPlace);
ndbrequire(false);
return;
}//if
@@ -10638,9 +10704,8 @@
if(tabPtr.p->tabStatus == TabRecord::TS_DROPPING){
jam();
- ndbout_c("TS_DROPPING - Neglecting to save Table: %d Frag: %d - ",
- tableId,
- fragId);
+ g_eventLogger.info("TS_DROPPING - Neglecting to save Table: %d Frag: %d - ",
+ tableId, fragId);
} else {
jam();
/**
@@ -10770,7 +10835,7 @@
};
#ifdef VM_TRACE
- ndbout_c("Fragment Replica(node=%d) not found", nodeId);
+ g_eventLogger.info("Fragment Replica(node=%d) not found", nodeId);
replicaPtr.i = fragPtrP->oldStoredReplicas;
while(replicaPtr.i != RNIL){
ptrCheckGuard(replicaPtr, creplicaFileSize, replicaRecord);
@@ -10783,9 +10848,9 @@
}//if
};
if(replicaPtr.i != RNIL){
- ndbout_c("...But was found in oldStoredReplicas");
+ g_eventLogger.info("...But was found in oldStoredReplicas");
} else {
- ndbout_c("...And wasn't found in oldStoredReplicas");
+ g_eventLogger.info("...And wasn't found in oldStoredReplicas");
}
#endif
ndbrequire(false);
@@ -10852,8 +10917,8 @@
if(lcpNo != replicaPtr.p->nextLcp){
if (handle_invalid_lcp_no(lcpReport, replicaPtr))
{
- ndbout_c("lcpNo = %d replicaPtr.p->nextLcp = %d",
- lcpNo, replicaPtr.p->nextLcp);
+ g_eventLogger.error("lcpNo = %d replicaPtr.p->nextLcp = %d",
+ lcpNo, replicaPtr.p->nextLcp);
ndbrequire(false);
}
}
@@ -10889,7 +10954,7 @@
// Not all fragments in table have been checkpointed.
/* ----------------------------------------------------------------- */
if(0)
- ndbout_c("reportLcpCompletion: fragment %d not ready", fid);
+ g_eventLogger.info("reportLcpCompletion: fragment %d not ready", fid);
return false;
}//if
}//for
@@ -11006,7 +11071,7 @@
jamEntry();
#if 0
- ndbout_c("LCP_COMPLETE_REP");
+ g_eventLogger.info("LCP_COMPLETE_REP");
printLCP_COMPLETE_REP(stdout,
signal->getDataPtr(),
signal->length(), number());
@@ -11092,7 +11157,7 @@
if(c_lcpMasterTakeOverState.state != LMTOS_IDLE){
jam();
#ifdef VM_TRACE
- ndbout_c("Exiting from allNodesLcpCompletedLab");
+ g_eventLogger.info("Exiting from allNodesLcpCompletedLab");
#endif
return;
}
@@ -11329,14 +11394,14 @@
infoEvent("Detected GCP stop...sending kill to %s",
c_GCP_SAVEREQ_Counter.getText());
- ndbout_c("Detected GCP stop...sending kill to %s",
- c_GCP_SAVEREQ_Counter.getText());
+ g_eventLogger.error("Detected GCP stop...sending kill to %s",
+ c_GCP_SAVEREQ_Counter.getText());
return;
}
case GCP_SAVE_LQH_FINISHED:
- ndbout_c("m_copyReason: %d m_waiting: %d",
- c_copyGCIMaster.m_copyReason,
- c_copyGCIMaster.m_waiting);
+ g_eventLogger.error("m_copyReason: %d m_waiting: %d",
+ c_copyGCIMaster.m_copyReason,
+ c_copyGCIMaster.m_waiting);
break;
case GCP_READY: // shut up lint
case GCP_PREPARE_SENT:
@@ -11344,11 +11409,11 @@
break;
}
- ndbout_c("c_copyGCISlave: sender{Data, Ref} %d %x reason: %d nextWord: %d",
- c_copyGCISlave.m_senderData,
- c_copyGCISlave.m_senderRef,
- c_copyGCISlave.m_copyReason,
- c_copyGCISlave.m_expectedNextWord);
+ g_eventLogger.error("c_copyGCISlave: sender{Data, Ref} %d %x reason: %d nextWord: %d",
+ c_copyGCISlave.m_senderData,
+ c_copyGCISlave.m_senderRef,
+ c_copyGCISlave.m_copyReason,
+ c_copyGCISlave.m_expectedNextWord);
FileRecordPtr file0Ptr;
file0Ptr.i = crestartInfoFile[0];
@@ -12655,7 +12720,7 @@
(buf, sizeof(buf),
"Illegal initial start, no alive node in nodegroup %u", i);
progError(__LINE__,
- NDBD_EXIT_SR_RESTARTCONFLICT,
+ NDBD_EXIT_INSUFFICENT_NODES,
buf);
}
@@ -12795,14 +12860,23 @@
/* THAT THE NEW REPLICA IS NOT STARTED YET AND REPLICA_LAST_GCI IS*/
/* SET TO -1 TO INDICATE THAT IT IS NOT DEAD YET. */
/*----------------------------------------------------------------------*/
+ Uint32 lastGCI = SYSFILE->lastCompletedGCI[nodeId];
arrGuardErr(ncrReplicaPtr.p->noCrashedReplicas + 1, 8,
NDBD_EXIT_MAX_CRASHED_REPLICAS);
ncrReplicaPtr.p->replicaLastGci[ncrReplicaPtr.p->noCrashedReplicas] =
- SYSFILE->lastCompletedGCI[nodeId];
+ lastGCI;
ncrReplicaPtr.p->noCrashedReplicas = ncrReplicaPtr.p->noCrashedReplicas + 1;
ncrReplicaPtr.p->createGci[ncrReplicaPtr.p->noCrashedReplicas] = 0;
ncrReplicaPtr.p->replicaLastGci[ncrReplicaPtr.p->noCrashedReplicas] =
(Uint32)-1;
+
+ if (ncrReplicaPtr.p->noCrashedReplicas == 7 && lastGCI)
+ {
+ jam();
+ SYSFILE->lastCompletedGCI[nodeId] = 0;
+ warningEvent("Making filesystem for node %d unusable (need --initial)",
+ nodeId);
+ }
}//Dbdih::newCrashedReplica()
/*************************************************************************/
@@ -13558,9 +13632,9 @@
nodePtr.i = getOwnNodeId();
ptrAss(nodePtr, nodeRecord);
ndbrequire(nodePtr.p->activeStatus == Sysfile::NS_Active);
- ndbout_c("NR: setLcpActiveStatusEnd - m_participatingLQH");
+ g_eventLogger.info("NR: setLcpActiveStatusEnd - m_participatingLQH");
} else {
- ndbout_c("NR: setLcpActiveStatusEnd - !m_participatingLQH");
+ g_eventLogger.info("NR: setLcpActiveStatusEnd - !m_participatingLQH");
}
}
@@ -14392,8 +14466,8 @@
}
if(arg == DumpStateOrd::EnableUndoDelayDataWrite){
- ndbout << "Dbdih:: delay write of datapages for table = "
- << dumpState->args[1]<< endl;
+ g_eventLogger.info("Dbdih:: delay write of datapages for table = %s",
+ dumpState->args[1]);
// Send this dump to ACC and TUP
EXECUTE_DIRECT(DBACC, GSN_DUMP_STATE_ORD, signal, 2);
EXECUTE_DIRECT(DBTUP, GSN_DUMP_STATE_ORD, signal, 2);
@@ -14410,13 +14484,13 @@
}//if
if (signal->theData[0] == DumpStateOrd::DihMinTimeBetweenLCP) {
// Set time between LCP to min value
- ndbout << "Set time between LCP to min value" << endl;
+ g_eventLogger.info("Set time between LCP to min value");
c_lcpState.clcpDelay = 0; // TimeBetweenLocalCheckpoints.min
return;
}
if (signal->theData[0] == DumpStateOrd::DihMaxTimeBetweenLCP) {
// Set time between LCP to max value
- ndbout << "Set time between LCP to max value" << endl;
+ g_eventLogger.info("Set time between LCP to max value");
c_lcpState.clcpDelay = 31; // TimeBetweenLocalCheckpoints.max
return;
}
@@ -14452,7 +14526,7 @@
{
cgcpDelay = signal->theData[1];
}
- ndbout_c("Setting time between gcp : %d", cgcpDelay);
+ g_eventLogger.info("Setting time between gcp : %d", cgcpDelay);
}
if (arg == 7021 && signal->getLength() == 2)
@@ -14575,7 +14649,7 @@
while(index < count){
if(nodePtr.p->queuedChkpt[index].tableId == tabPtr.i){
jam();
- // ndbout_c("Unqueuing %d", index);
+ // g_eventLogger.info("Unqueuing %d", index);
count--;
for(Uint32 i = index; i<count; i++){
@@ -14615,7 +14689,7 @@
if(checkLcpAllTablesDoneInLqh()){
jam();
- ndbout_c("This is the last table");
+ g_eventLogger.info("This is the last table");
/**
* Then check if saving of tab info is done for all tables
@@ -14624,7 +14698,7 @@
checkLcpCompletedLab(signal);
if(a != c_lcpState.lcpStatus){
- ndbout_c("And all tables are written to already written disk");
+ g_eventLogger.info("And all tables are written to already written disk");
}
}
break;
--- 1.58/storage/ndb/src/kernel/blocks/dblqh/Dblqh.hpp 2007-01-17 16:27:41 +01:00
+++ 1.59/storage/ndb/src/kernel/blocks/dblqh/Dblqh.hpp 2007-03-02 16:59:14 +01:00
@@ -493,6 +493,7 @@
typedef Ptr<Databuf> DatabufPtr;
struct ScanRecord {
+ ScanRecord() {}
enum ScanState {
SCAN_FREE = 0,
WAIT_STORED_PROC_COPY = 1,
@@ -2542,6 +2543,9 @@
void initData();
void initRecords();
+ bool validate_filter(Signal*);
+ bool match_and_print(Signal*, Ptr<TcConnectionrec>);
+
void define_backup(Signal*);
void execDEFINE_BACKUP_REF(Signal*);
void execDEFINE_BACKUP_CONF(Signal*);
@@ -2898,6 +2902,7 @@
*
*/
struct CommitAckMarker {
+ CommitAckMarker() {}
Uint32 transid1;
Uint32 transid2;
@@ -2924,6 +2929,7 @@
void scanMarkers(Signal* signal, Uint32 tcNodeFail, Uint32 bucket, Uint32 i);
struct Counters {
+ Counters() {}
Uint32 operations;
inline void clear(){
--- 1.133/storage/ndb/src/kernel/blocks/dblqh/DblqhMain.cpp 2007-02-06 08:56:04 +01:00
+++ 1.134/storage/ndb/src/kernel/blocks/dblqh/DblqhMain.cpp 2007-03-02 18:30:13 +01:00
@@ -582,6 +582,26 @@
{
jamEntry();
m_backup_ptr = RNIL;
+ DefineBackupRef* ref = (DefineBackupRef*)signal->getDataPtrSend();
+ int err_code = 0;
+ char * extra_msg = NULL;
+
+ switch(ref->errorCode){
+ case DefineBackupRef::Undefined:
+ case DefineBackupRef::FailedToSetupFsBuffers:
+ case DefineBackupRef::FailedToAllocateBuffers:
+ case DefineBackupRef::FailedToAllocateTables:
+ case DefineBackupRef::FailedAllocateTableMem:
+ case DefineBackupRef::FailedToAllocateFileRecord:
+ case DefineBackupRef::FailedToAllocateAttributeRecord:
+ case DefineBackupRef::FailedInsertFileHeader:
+ case DefineBackupRef::FailedInsertTableList:
+ jam();
+ err_code = NDBD_EXIT_INVALID_CONFIG;
+ extra_msg = "Probably Backup parameters configuration error, Please consult the manual";
+ progError(__LINE__, err_code, extra_msg);
+ }
+
sendsttorryLab(signal);
}
@@ -3146,20 +3166,23 @@
{
TcConnectionrec * const regTcPtr = tcConnectptr.p;
if (regTcPtr->operation != ZREAD) {
- if (regTcPtr->opExec != 1) {
- if (saveTupattrbuf(signal, dataPtr, length) == ZOK) {
- ;
- } else {
- jam();
+ if (regTcPtr->operation != ZDELETE)
+ {
+ if (regTcPtr->opExec != 1) {
+ if (saveTupattrbuf(signal, dataPtr, length) == ZOK) {
+ ;
+ } else {
+ jam();
/* ------------------------------------------------------------------------- */
/* WE MIGHT BE WAITING FOR RESPONSE FROM SOME BLOCK HERE. THUS WE NEED TO */
/* GO THROUGH THE STATE MACHINE FOR THE OPERATION. */
/* ------------------------------------------------------------------------- */
- localAbortStateHandlerLab(signal);
- return;
+ localAbortStateHandlerLab(signal);
+ return;
+ }//if
}//if
}//if
- }//if
+ }
c_tup->receive_attrinfo(signal, regTcPtr->tupConnectrec, dataPtr, length);
}//Dblqh::lqhAttrinfoLab()
@@ -5698,6 +5721,8 @@
ptrCheckGuard(nextHashptr, ctcConnectrecFileSize, tcConnectionrec);
nextHashptr.p->prevHashRec = prevHashptr.i;
}//if
+
+ regTcPtr->prevHashRec = regTcPtr->nextHashRec = RNIL;
}//Dblqh::deleteTransidHash()
/* -------------------------------------------------------------------------
@@ -7205,7 +7230,8 @@
TRACE_OP(regTcPtr, "ACC_ABORTCONF");
signal->theData[0] = regTcPtr->tupConnectrec;
EXECUTE_DIRECT(DBTUP, GSN_TUP_ABORTREQ, signal, 1);
-
+
+ jamEntry();
continueAbortLab(signal);
return;
}//Dblqh::execACC_ABORTCONF()
@@ -8333,7 +8359,6 @@
const Uint32 scanLockMode = ScanFragReq::getLockMode(reqinfo);
const Uint8 keyinfo = ScanFragReq::getKeyinfoFlag(reqinfo);
const Uint8 rangeScan = ScanFragReq::getRangeScanFlag(reqinfo);
- const Uint8 tupScan = ScanFragReq::getTupScanFlag(reqinfo);
ptrCheckGuard(tabptr, ctabrecFileSize, tablerec);
if(tabptr.p->tableStatus != Tablerec::TABLE_DEFINED){
@@ -8394,6 +8419,7 @@
ZNIL);
tcConnectptr.p->save1 = 4;
tcConnectptr.p->primKeyLen = keyLen + 4; // hard coded in execKEYINFO
+ tcConnectptr.p->applRef = scanFragReq->resultRef;
errorCode = initScanrec(scanFragReq);
if (errorCode != ZOK) {
jam();
@@ -9822,8 +9848,10 @@
const Uint32 scanOp = scanP->m_curr_batch_size_rows;
const Uint32 nodeId = refToNode(ref);
const bool connectedToNode = getNodeInfo(nodeId).m_connected;
- //const Uint32 type = getNodeInfo(nodeId).m_type;
- //const bool is_api= (type >= NodeInfo::API && type <= NodeInfo::REP);
+#ifdef NOT_USED
+ const Uint32 type = getNodeInfo(nodeId).m_type;
+ const bool is_api= (type >= NodeInfo::API && type <= NodeInfo::REP);
+#endif
const bool longable = true; // TODO is_api && !old_dest;
Uint32 * dst = keyInfo->keyData;
@@ -9924,7 +9952,9 @@
return;
}
ScanFragConf * conf = (ScanFragConf*)&signal->theData[0];
- //NodeId tc_node_id= refToNode(tcConnectptr.p->clientBlockref);
+#ifdef NOT_USED
+ NodeId tc_node_id= refToNode(tcConnectptr.p->clientBlockref);
+#endif
Uint32 trans_id1= tcConnectptr.p->transid[0];
Uint32 trans_id2= tcConnectptr.p->transid[1];
@@ -10069,6 +10099,7 @@
tcConnectptr.p->tcOprec = tcConnectptr.i;
tcConnectptr.p->schemaVersion = scanptr.p->scanSchemaVersion;
tcConnectptr.p->savePointId = gci;
+ tcConnectptr.p->applRef = 0;
scanptr.p->scanState = ScanRecord::WAIT_ACC_COPY;
AccScanReq * req = (AccScanReq*)&signal->theData[0];
req->senderData = scanptr.i;
@@ -15195,8 +15226,6 @@
2.5 TEMPORARY VARIABLES
-----------------------
*/
- UintR tdebug;
-
jamEntry();
//logPagePtr.i = signal->theData[0];
//tdebug = logPagePtr.p->logPageWord[0];
@@ -18370,6 +18399,220 @@
}//if
}//Dblqh::writeNextLog()
+bool
+Dblqh::validate_filter(Signal* signal)
+{
+ Uint32 * start = signal->theData + 1;
+ Uint32 * end = signal->theData + signal->getLength();
+ if (start == end)
+ {
+ infoEvent("No filter specified, not listing...");
+ return false;
+ }
+
+ while(start < end)
+ {
+ switch(* start){
+ case 0: // Table
+ case 1: // API Node
+ case 3: // TC Node
+ start += 2;
+ break;
+ case 2: // Transid
+ start += 3;
+ break;
+ default:
+ infoEvent("Invalid filter op: 0x%x pos: %d",
+ * start,
+ start - (signal->theData + 1));
+ return false;
+ }
+ }
+
+ if (start != end)
+ {
+ infoEvent("Invalid filter, unexpected end");
+ return false;
+ }
+
+ return true;
+}
+
+bool
+Dblqh::match_and_print(Signal* signal, Ptr<TcConnectionrec> tcRec)
+{
+ Uint32 len = signal->getLength();
+ Uint32* start = signal->theData + 3;
+ Uint32* end = signal->theData + len;
+ while (start < end)
+ {
+ switch(* start){
+ case 0:
+ if (tcRec.p->tableref != * (start + 1))
+ return false;
+ start += 2;
+ break;
+ case 1:
+ if (refToNode(tcRec.p->applRef) != * (start + 1))
+ return false;
+ start += 2;
+ break;
+ case 2:
+ if (tcRec.p->transid[0] != * (start + 1) ||
+ tcRec.p->transid[1] != * (start + 2))
+ return false;
+ start += 3;
+ break;
+ case 3:
+ if (refToNode(tcRec.p->tcBlockref) != * (start + 1))
+ return false;
+ start += 2;
+ break;
+ default:
+ ndbassert(false);
+ return false;
+ }
+ }
+
+ if (start != end)
+ {
+ ndbassert(false);
+ return false;
+ }
+
+ /**
+ * Do print
+ */
+ Uint32 *temp = signal->theData + 25;
+ memcpy(temp, signal->theData, 4 * len);
+
+ char state[20];
+ const char* op = "<Unknown>";
+ if (tcRec.p->tcScanRec != RNIL)
+ {
+ ScanRecordPtr sp;
+ sp.i = tcRec.p->tcScanRec;
+ c_scanRecordPool.getPtr(sp);
+
+ if (sp.p->scanLockMode)
+ op = "SCAN-EX";
+ else if(sp.p->scanLockHold)
+ op = "SCAN-SH";
+ else
+ op = "SCAN";
+
+ switch(sp.p->scanState){
+ case ScanRecord::WAIT_NEXT_SCAN:
+ BaseString::snprintf(state, sizeof(state), "WaitNextScan");
+ break;
+ case ScanRecord::IN_QUEUE:
+ BaseString::snprintf(state, sizeof(state), "InQueue");
+ break;
+ case ScanRecord::SCAN_FREE:
+ case ScanRecord::WAIT_STORED_PROC_COPY:
+ case ScanRecord::WAIT_STORED_PROC_SCAN:
+ case ScanRecord::WAIT_NEXT_SCAN_COPY:
+ case ScanRecord::WAIT_DELETE_STORED_PROC_ID_SCAN:
+ case ScanRecord::WAIT_DELETE_STORED_PROC_ID_COPY:
+ case ScanRecord::WAIT_ACC_COPY:
+ case ScanRecord::WAIT_ACC_SCAN:
+ case ScanRecord::WAIT_SCAN_NEXTREQ:
+ case ScanRecord::WAIT_CLOSE_SCAN:
+ case ScanRecord::WAIT_CLOSE_COPY:
+ case ScanRecord::WAIT_RELEASE_LOCK:
+ case ScanRecord::WAIT_TUPKEY_COPY:
+ case ScanRecord::WAIT_LQHKEY_COPY:
+ BaseString::snprintf(state, sizeof(state), "%u", sp.p->scanState);
+ }
+ }
+ else
+ {
+ switch(tcRec.p->operation){
+ case ZREAD:
+ if (tcRec.p->lockType)
+ op = "READ-EX";
+ else if(!tcRec.p->dirtyOp)
+ op = "READ-SH";
+ else
+ op = "READ";
+ break;
+ case ZINSERT: op = "INSERT"; break;
+ case ZUPDATE: op = "UPDATE"; break;
+ case ZDELETE: op = "DELETE"; break;
+ case ZWRITE: op = "WRITE"; break;
+ }
+
+ switch(tcRec.p->transactionState){
+ case TcConnectionrec::IDLE:
+ case TcConnectionrec::WAIT_ACC:
+ BaseString::snprintf(state, sizeof(state), "In lock queue");
+ break;
+ case TcConnectionrec::WAIT_TUPKEYINFO:
+ case TcConnectionrec::WAIT_ATTR:
+ BaseString::snprintf(state, sizeof(state), "WaitData");
+ break;
+ case TcConnectionrec::WAIT_TUP:
+ BaseString::snprintf(state, sizeof(state), "Running");
+ break;
+ case TcConnectionrec::PREPARED:
+ BaseString::snprintf(state, sizeof(state), "Prepared");
+ break;
+ case TcConnectionrec::COMMITTED:
+ BaseString::snprintf(state, sizeof(state), "Committed");
+ break;
+ case TcConnectionrec::STOPPED:
+ case TcConnectionrec::LOG_QUEUED:
+ case TcConnectionrec::LOG_COMMIT_WRITTEN_WAIT_SIGNAL:
+ case TcConnectionrec::LOG_COMMIT_QUEUED_WAIT_SIGNAL:
+ case TcConnectionrec::COMMIT_STOPPED:
+ case TcConnectionrec::LOG_COMMIT_QUEUED:
+ case TcConnectionrec::COMMIT_QUEUED:
+ case TcConnectionrec::WAIT_ACC_ABORT:
+ case TcConnectionrec::ABORT_QUEUED:
+ case TcConnectionrec::ABORT_STOPPED:
+ case TcConnectionrec::WAIT_AI_AFTER_ABORT:
+ case TcConnectionrec::LOG_ABORT_QUEUED:
+ case TcConnectionrec::WAIT_TUP_TO_ABORT:
+ case TcConnectionrec::WAIT_SCAN_AI:
+ case TcConnectionrec::SCAN_STATE_USED:
+ case TcConnectionrec::SCAN_FIRST_STOPPED:
+ case TcConnectionrec::SCAN_CHECK_STOPPED:
+ case TcConnectionrec::SCAN_STOPPED:
+ case TcConnectionrec::SCAN_RELEASE_STOPPED:
+ case TcConnectionrec::SCAN_CLOSE_STOPPED:
+ case TcConnectionrec::COPY_CLOSE_STOPPED:
+ case TcConnectionrec::COPY_FIRST_STOPPED:
+ case TcConnectionrec::COPY_STOPPED:
+ case TcConnectionrec::SCAN_TUPKEY:
+ case TcConnectionrec::COPY_TUPKEY:
+ case TcConnectionrec::TC_NOT_CONNECTED:
+ case TcConnectionrec::PREPARED_RECEIVED_COMMIT:
+ case TcConnectionrec::LOG_COMMIT_WRITTEN:
+ BaseString::snprintf(state, sizeof(state), "%u",
+ tcRec.p->transactionState);
+ }
+ }
+
+ char buf[100];
+ BaseString::snprintf(buf, sizeof(buf),
+ "OP[%u]: Tab: %d frag: %d TC: %u API: %d(0x%x)"
+ "transid: 0x%x 0x%x op: %s state: %s",
+ tcRec.i,
+ tcRec.p->tableref,
+ tcRec.p->fragmentid,
+ refToNode(tcRec.p->tcBlockref),
+ refToNode(tcRec.p->applRef),
+ refToBlock(tcRec.p->applRef),
+ tcRec.p->transid[0], tcRec.p->transid[1],
+ op,
+ state);
+
+ infoEvent(buf);
+
+ memcpy(signal->theData, temp, 4*len);
+ return true;
+}
+
void
Dblqh::execDUMP_STATE_ORD(Signal* signal)
{
@@ -18469,7 +18712,7 @@
ScanRecordPtr sp;
sp.i = recordNo;
- c_scanRecordPool.getPtr(scanptr);
+ c_scanRecordPool.getPtr(sp);
if (sp.p->scanState != ScanRecord::SCAN_FREE){
dumpState->args[0] = DumpStateOrd::LqhDumpOneScanRec;
dumpState->args[1] = recordNo;
@@ -18828,6 +19071,183 @@
}
#endif
+ if (arg == 2350)
+ {
+ jam();
+ Uint32 len = signal->getLength() - 1;
+ if (len + 3 > 25)
+ {
+ jam();
+ infoEvent("Too long filter");
+ return;
+ }
+ if (validate_filter(signal))
+ {
+ jam();
+ memmove(signal->theData + 3, signal->theData + 1, 4 * len);
+ signal->theData[0] = 2351;
+ signal->theData[1] = 0; // Bucket
+ signal->theData[2] = RNIL; // Record
+ sendSignal(reference(), GSN_DUMP_STATE_ORD, signal, len + 3, JBB);
+
+ infoEvent("Starting dump of operations");
+ }
+ return;
+ }
+
+ if (arg == 2351)
+ {
+ jam();
+ Uint32 bucket = signal->theData[1];
+ Uint32 record = signal->theData[2];
+ Uint32 len = signal->getLength();
+ TcConnectionrecPtr tcRec;
+ if (record != RNIL)
+ {
+ jam();
+ /**
+ * Check that record is still in use...
+ */
+ tcRec.i = record;
+ ptrCheckGuard(tcRec, ttcConnectrecFileSize, regTcConnectionrec);
+
+ Uint32 hashIndex = (tcRec.p->transid[0] ^ tcRec.p->tcOprec) & 1023;
+ if (hashIndex != bucket)
+ {
+ jam();
+ record = RNIL;
+ }
+ else
+ {
+ jam();
+ if (tcRec.p->nextHashRec == RNIL &&
+ tcRec.p->prevHashRec == RNIL &&
+ ctransidHash[hashIndex] != record)
+ {
+ jam();
+ record = RNIL;
+ }
+ }
+
+ if (record == RNIL)
+ {
+ jam();
+ signal->theData[2] = RNIL;
+ sendSignal(reference(), GSN_DUMP_STATE_ORD, signal,
+ signal->getLength(), JBB);
+ return;
+ }
+ }
+ else if ((record = ctransidHash[bucket]) == RNIL)
+ {
+ jam();
+ bucket++;
+ if (bucket < 1024)
+ {
+ jam();
+ signal->theData[1] = bucket;
+ signal->theData[2] = RNIL;
+ sendSignal(reference(), GSN_DUMP_STATE_ORD, signal,
+ signal->getLength(), JBB);
+ }
+ else
+ {
+ jam();
+ infoEvent("End of operation dump");
+ }
+
+ return;
+ }
+ else
+ {
+ jam();
+ tcRec.i = record;
+ ptrCheckGuard(tcRec, ttcConnectrecFileSize, regTcConnectionrec);
+ }
+
+ for (Uint32 i = 0; i<32; i++)
+ {
+ jam();
+ bool print = match_and_print(signal, tcRec);
+
+ tcRec.i = tcRec.p->nextHashRec;
+ if (tcRec.i == RNIL || print)
+ {
+ jam();
+ break;
+ }
+
+ ptrCheckGuard(tcRec, ttcConnectrecFileSize, regTcConnectionrec);
+ }
+
+ if (tcRec.i == RNIL)
+ {
+ jam();
+ bucket++;
+ if (bucket < 1024)
+ {
+ jam();
+ signal->theData[1] = bucket;
+ signal->theData[2] = RNIL;
+ sendSignal(reference(), GSN_DUMP_STATE_ORD, signal, len, JBB);
+ }
+ else
+ {
+ jam();
+ infoEvent("End of operation dump");
+ }
+
+ return;
+ }
+ else
+ {
+ jam();
+ signal->theData[2] = tcRec.i;
+ sendSignalWithDelay(reference(), GSN_DUMP_STATE_ORD, signal, 200, len);
+ return;
+ }
+ }
+
+ if (arg == 2352 && signal->getLength() == 2)
+ {
+ jam();
+ Uint32 i;
+ Uint32 opNo = signal->theData[1];
+ TcConnectionrecPtr tcRec;
+ if (opNo < ttcConnectrecFileSize)
+ {
+ jam();
+ tcRec.i = opNo;
+ ptrCheckGuard(tcRec, ttcConnectrecFileSize, regTcConnectionrec);
+
+ Uint32 keyLen = tcRec.p->primKeyLen;
+ BaseString key;
+ for(i = 0; i<keyLen && i < 4; i++)
+ {
+ jam();
+ key.appfmt("0x%x ", tcRec.p->tupkeyData[i]);
+ }
+
+ if (keyLen > 4)
+ {
+ jam();
+ tcConnectptr = tcRec;
+ sendKeyinfoAcc(signal, 4);
+ for (i = 4; i<keyLen; i++)
+ {
+ jam();
+ key.appfmt("0x%x ", signal->theData[i]);
+ }
+ }
+
+ char buf[100];
+ BaseString::snprintf(buf, sizeof(buf),
+ "OP[%u]: transid: 0x%x 0x%x key: %s",
+ tcRec.i,
+ tcRec.p->transid[0], tcRec.p->transid[1], key.c_str());
+ infoEvent(buf);
+ }
+ }
}//Dblqh::execDUMP_STATE_ORD()
void Dblqh::execSET_VAR_REQ(Signal* signal)
--- 1.10/storage/ndb/src/kernel/blocks/ndbcntr/Ndbcntr.hpp 2007-01-17 16:27:41 +01:00
+++ 1.11/storage/ndb/src/kernel/blocks/ndbcntr/Ndbcntr.hpp 2007-03-02 16:59:17 +01:00
@@ -81,6 +81,7 @@
*/
struct StartRecord {
+ StartRecord() {}
Uint64 m_startTime;
void reset();
--- 1.47/storage/ndb/src/kernel/blocks/ndbcntr/NdbcntrMain.cpp 2007-02-14 00:21:29 +01:00
+++ 1.48/storage/ndb/src/kernel/blocks/ndbcntr/NdbcntrMain.cpp 2007-03-02 16:59:18 +01:00
@@ -91,6 +91,7 @@
static const Uint32 ALL_BLOCKS_SZ = sizeof(ALL_BLOCKS)/sizeof(BlockInfo);
static BlockReference readConfigOrder[ALL_BLOCKS_SZ] = {
+ NDBFS_REF, // let it run first to make sure it can start the threads
CMVMI_REF,
DBTUP_REF,
DBACC_REF,
@@ -99,7 +100,6 @@
DBTUX_REF,
DBDICT_REF,
DBDIH_REF,
- NDBFS_REF,
NDBCNTR_REF,
QMGR_REF,
TRIX_REF,
@@ -865,7 +865,6 @@
*/
const bool allNodes = c_start.m_waiting.equal(c_allDefinedNodes);
const bool allClusterNodes = c_start.m_waiting.equal(c_clusterNodes);
- const Uint64 now = NdbTick_CurrentMillisecond();
if(!allClusterNodes){
jam();
@@ -1438,7 +1437,6 @@
const bool tMasterFailed = allFailed.get(cmasterNodeId);
const bool tStarted = !failedStarted.isclear();
const bool tStarting = !failedStarting.isclear();
- const bool tWaiting = !failedWaiting.isclear();
if(tMasterFailed){
jam();
@@ -2528,8 +2526,6 @@
void Ndbcntr::execABORT_ALL_REF(Signal* signal){
jamEntry();
- AbortAllRef *abortAllRef = (AbortAllRef *)&signal->theData[0];
- AbortAllRef::ErrorCode errorCode = (AbortAllRef::ErrorCode) abortAllRef->errorCode;
StopRef * const stopRef = (StopRef *)&signal->theData[0];
stopRef->senderData = c_stopRec.stopReq.senderData;
--- 1.20/storage/ndb/src/kernel/blocks/qmgr/Qmgr.hpp 2007-02-14 00:16:35 +01:00
+++ 1.21/storage/ndb/src/kernel/blocks/qmgr/Qmgr.hpp 2007-03-02 16:59:22 +01:00
@@ -105,6 +105,7 @@
};
struct StartRecord {
+ StartRecord() {}
void reset(){
m_startKey++;
m_startNode = 0;
@@ -128,6 +129,7 @@
Uint32 m_president_candidate_gci;
Uint16 m_regReqReqSent;
Uint16 m_regReqReqRecv;
+ Uint32 m_node_gci[MAX_NDB_NODES];
} c_start;
NdbNodeBitmask c_definedNodes; // DB nodes in config
@@ -173,6 +175,7 @@
};
struct ArbitRec {
+ ArbitRec() {}
ArbitState state; // state
bool newstate; // flag to initialize new state
unsigned thread; // identifies a continueB "thread"
@@ -182,6 +185,7 @@
NdbNodeBitmask newMask; // new nodes to process in RUN state
Uint8 sendCount; // control send/recv of signals
Uint8 recvCount;
+ Uint8 m_disabled;
NdbNodeBitmask recvMask; // left to recv
Uint32 code; // code field from signal
Uint32 failureNr; // cfailureNr at arbitration start
--- 1.51/storage/ndb/src/kernel/blocks/qmgr/QmgrMain.cpp 2007-02-14 00:21:30 +01:00
+++ 1.52/storage/ndb/src/kernel/blocks/qmgr/QmgrMain.cpp 2007-03-02 16:59:22 +01:00
@@ -269,7 +269,18 @@
* we have all nodes (or a winning majority).
*/
if (cpresident == getOwnNodeId())
- handleArbitStart(signal);
+ {
+ if (arbitRec.m_disabled == false)
+ {
+ jam();
+ handleArbitStart(signal);
+ }
+ else
+ {
+ jam();
+ infoEvent("Arbitration disabled");
+ }
+ }
break;
}
@@ -863,7 +874,6 @@
jamEntry();
const CmRegConf * const cmRegConf = (CmRegConf *)&signal->theData[0];
- Uint32 presidentNodeId = cmRegConf->presidentNodeId;
if (!ndbCompatible_ndb_ndb(NDB_VERSION, cmRegConf->presidentVersion)) {
jam();
@@ -1108,7 +1118,8 @@
jam();
c_start.m_starting_nodes_w_log.set(TaddNodeno);
}
-
+ c_start.m_node_gci[TaddNodeno] = node_gci;
+
skip_nodes.bitAND(c_definedNodes);
c_start.m_skip_nodes.bitOR(skip_nodes);
@@ -1257,6 +1268,7 @@
wait.bitANDC(tmp);
Uint32 retVal = 0;
+ Uint32 incompleteng = MAX_NDB_NODES; // Illegal value
NdbNodeBitmask report_mask;
if ((c_start.m_latest_gci == 0) ||
@@ -1289,7 +1301,6 @@
/**
* Check for missing node group directly
*/
- char buf[100];
NdbNodeBitmask check;
check.assign(c_definedNodes);
check.bitANDC(c_start.m_starting_nodes); // Not connected nodes
@@ -1342,7 +1353,7 @@
report_mask.assign(c_definedNodes);
report_mask.bitANDC(c_start.m_starting_nodes);
retVal = 1;
- goto start_report;
+ goto check_log;
case CheckNodeGroups::Partitioning:
ndbrequire(result != CheckNodeGroups::Lose);
signal->theData[1] =
@@ -1350,7 +1361,7 @@
report_mask.assign(c_definedNodes);
report_mask.bitANDC(c_start.m_starting_nodes);
retVal = 1;
- goto start_report;
+ goto check_log;
}
}
@@ -1374,12 +1385,7 @@
case CheckNodeGroups::Partitioning:
if (now < partitioned_timeout && result != CheckNodeGroups::Win)
{
- signal->theData[1] = c_restartPartionedTimeout == (Uint32) ~0 ? 4 : 5;
- signal->theData[2] = Uint32((partitioned_timeout - now + 500) / 1000);
- report_mask.assign(c_definedNodes);
- report_mask.bitANDC(c_start.m_starting_nodes);
- retVal = 0;
- goto start_report;
+ goto missinglog;
}
// Fall through...
case CheckNodeGroups::Win:
@@ -1387,12 +1393,61 @@
all ? 0x8001 : (result == CheckNodeGroups::Win ? 0x8002 : 0x8003);
report_mask.assign(c_definedNodes);
report_mask.bitANDC(c_start.m_starting_nodes);
- retVal = 1;
- goto start_report;
+ retVal = 2;
+ goto check_log;
}
}
ndbrequire(false);
+check_log:
+ jam();
+ {
+ Uint32 save[4+4*NdbNodeBitmask::Size];
+ memcpy(save, signal->theData, sizeof(save));
+
+ signal->theData[0] = 0;
+ c_start.m_starting_nodes.copyto(NdbNodeBitmask::Size, signal->theData+1);
+ memcpy(signal->theData+1+NdbNodeBitmask::Size, c_start.m_node_gci,
+ 4*MAX_NDB_NODES);
+ EXECUTE_DIRECT(DBDIH, GSN_DIH_RESTARTREQ, signal,
+ 1+NdbNodeBitmask::Size+MAX_NDB_NODES);
+
+ incompleteng = signal->theData[0];
+ memcpy(signal->theData, save, sizeof(save));
+
+ if (incompleteng != MAX_NDB_NODES)
+ {
+ jam();
+ if (retVal == 1)
+ {
+ jam();
+ goto incomplete_log;
+ }
+ else if (retVal == 2)
+ {
+ if (now <= partitioned_timeout)
+ {
+ jam();
+ goto missinglog;
+ }
+ else
+ {
+ goto incomplete_log;
+ }
+ }
+ ndbrequire(false);
+ }
+ }
+ goto start_report;
+
+missinglog:
+ signal->theData[1] = c_restartPartionedTimeout == (Uint32) ~0 ? 4 : 5;
+ signal->theData[2] = Uint32((partitioned_timeout - now + 500) / 1000);
+ report_mask.assign(c_definedNodes);
+ report_mask.bitANDC(c_start.m_starting_nodes);
+ retVal = 0;
+ goto start_report;
+
start_report:
jam();
{
@@ -1413,17 +1468,32 @@
missing_nodegroup:
jam();
- char buf[100], mask1[100], mask2[100];
- c_start.m_starting_nodes.getText(mask1);
- tmp.assign(c_start.m_starting_nodes);
- tmp.bitANDC(c_start.m_starting_nodes_w_log);
- tmp.getText(mask2);
- BaseString::snprintf(buf, sizeof(buf),
- "Unable to start missing node group! "
- " starting: %s (missing fs for: %s)",
- mask1, mask2);
- progError(__LINE__, NDBD_EXIT_SR_RESTARTCONFLICT, buf);
- return 0; // Deadcode
+ {
+ char buf[100], mask1[100], mask2[100];
+ c_start.m_starting_nodes.getText(mask1);
+ tmp.assign(c_start.m_starting_nodes);
+ tmp.bitANDC(c_start.m_starting_nodes_w_log);
+ tmp.getText(mask2);
+ BaseString::snprintf(buf, sizeof(buf),
+ "Unable to start missing node group! "
+ " starting: %s (missing fs for: %s)",
+ mask1, mask2);
+ progError(__LINE__, NDBD_EXIT_INSUFFICENT_NODES, buf);
+ return 0; // Deadcode
+ }
+
+incomplete_log:
+ jam();
+ {
+ char buf[100], mask1[100];
+ c_start.m_starting_nodes.getText(mask1);
+ BaseString::snprintf(buf, sizeof(buf),
+ "Incomplete log for node group: %d! "
+ " starting nodes: %s",
+ incompleteng, mask1);
+ progError(__LINE__, NDBD_EXIT_INSUFFICENT_NODES, buf);
+ return 0; // Deadcode
+ }
}
void
@@ -2158,9 +2228,11 @@
setHbApiDelay(hbDBAPI);
setArbitTimeout(arbitTimeout);
+ arbitRec.m_disabled = false;
arbitRec.state = ARBIT_NULL; // start state for all nodes
arbitRec.apiMask[0].clear(); // prepare for ARBIT_CFG
+ Uint32 sum = 0;
ArbitSignalData* const sd = (ArbitSignalData*)&signal->theData[0];
for (unsigned rank = 1; rank <= 2; rank++) {
sd->sender = getOwnNodeId();
@@ -2179,9 +2251,19 @@
sd->mask.set(nodeId);
}
}
-
+ sum += sd->mask.count();
execARBIT_CFG(signal);
}
+
+ if (sum == 0)
+ {
+ jam();
+ /**
+ * Disabled arbitration
+ */
+ arbitRec.m_disabled = true;
+ }
+
setNodeInfo(getOwnNodeId()).m_version = NDB_VERSION;
setNodeInfo(getOwnNodeId()).m_mysql_version = NDB_MYSQL_VERSION_D;
}//Qmgr::initData()
@@ -3382,7 +3464,17 @@
*/
return;
}
- handleArbitCheck(signal);
+
+ if (arbitRec.m_disabled == false)
+ {
+ jam();
+ handleArbitCheck(signal);
+ }
+ else
+ {
+ jam();
+ sendCommitFailReq(signal);
+ }
return;
}//Qmgr::execPREP_FAILCONF()
@@ -3578,8 +3670,10 @@
nodePtr.p->phase = ZFAIL_CLOSING;
nodePtr.p->failState = WAITING_FOR_NDB_FAILCONF;
setNodeInfo(nodePtr.i).m_heartbeat_cnt= 0;
+ setNodeInfo(nodePtr.i).m_version = 0;
c_clusterNodes.clear(nodePtr.i);
}//for
+ recompute_version_info(NodeInfo::DB);
/*----------------------------------------------------------------------*/
/* WE INFORM THE API'S WE HAVE CONNECTED ABOUT THE FAILED NODES. */
/*----------------------------------------------------------------------*/
--- 1.53/storage/ndb/src/kernel/blocks/suma/Suma.cpp 2007-02-06 08:56:04 +01:00
+++ 1.54/storage/ndb/src/kernel/blocks/suma/Suma.cpp 2007-03-02 16:59:23 +01:00
@@ -614,6 +614,8 @@
bool found = false;
KeyTable<Table>::Iterator it;
+ LINT_INIT(it.bucket);
+ LINT_INIT(it.curr.p);
for(c_tables.first(it);!it.isNull();c_tables.next(it))
{
LocalDLList<Subscriber> subbs(c_subscriberPool,it.curr.p->c_subscribers);
@@ -1265,7 +1267,7 @@
jam();
syncPtr.p->m_tableList.append(&subPtr.p->m_tableId, 1);
if(signal->getNoOfSections() > 0){
- SegmentedSectionPtr ptr;
+ SegmentedSectionPtr ptr(0,0,0);
signal->getSection(ptr, SubSyncReq::ATTRIBUTE_LIST);
LocalDataBuffer<15> attrBuf(c_dataBufferPool,syncPtr.p->m_attributeList);
append(attrBuf, ptr, getSectionSegmentPool());
@@ -1711,7 +1713,7 @@
Uint32 tableId = conf->tableId;
TablePtr tabPtr;
c_tablePool.getPtr(tabPtr, conf->senderData);
- SegmentedSectionPtr ptr;
+ SegmentedSectionPtr ptr(0,0,0);
signal->getSection(ptr, GetTabInfoConf::DICT_TAB_INFO);
ndbrequire(tabPtr.p->parseTable(ptr, *this));
releaseSections(signal);
@@ -3626,7 +3628,6 @@
if(c_buckets[i].m_buffer_tail != RNIL)
{
- Uint32* dst;
get_buffer_ptr(signal, i, gci, 0);
}
}
@@ -3971,9 +3972,6 @@
Suma::completeSubRemove(SubscriptionPtr subPtr)
{
DBUG_ENTER("Suma::completeSubRemove");
- Uint32 subscriptionId = subPtr.p->m_subscriptionId;
- Uint32 subscriptionKey = subPtr.p->m_subscriptionKey;
-
c_subscriptions.release(subPtr);
DBUG_PRINT("info",("c_subscriptionPool size: %d free: %d",
c_subscriptionPool.getSize(),
@@ -4566,6 +4564,7 @@
DBUG_VOID_RETURN;
}
+#ifdef NOT_USED
static
NdbOut&
operator<<(NdbOut & out, const Suma::Page_pos & pos)
@@ -4577,6 +4576,7 @@
<< " ]";
return out;
}
+#endif
Uint32*
Suma::get_buffer_ptr(Signal* signal, Uint32 buck, Uint32 gci, Uint32 sz)
@@ -4668,9 +4668,7 @@
m_out_of_buffer_gci = m_last_complete_gci - 1;
infoEvent("Out of event buffer: nodefailure will cause event failures");
- signal->theData[0] = SumaContinueB::OUT_OF_BUFFER_RELEASE;
- signal->theData[1] = 0;
- sendSignal(SUMA_REF, GSN_CONTINUEB, signal, 2, JBB);
+ out_of_buffer_release(signal, 0);
}
void
@@ -4738,7 +4736,8 @@
Uint32 count;
m_tup->allocConsPages(16, count, ref);
- ndbrequire(count > 0);
+ if (count == 0)
+ return RNIL;
ndbout_c("alloc_chunk(%d %d) - ", ref, count);
@@ -4747,6 +4746,7 @@
ptr.p->m_free = count;
Buffer_page* page;
+ LINT_INIT(page);
for(Uint32 i = 0; i<count; i++)
{
page = (Buffer_page*)m_tup->c_page_pool.getPtr(ref);
--- 1.107/storage/ndb/src/ndbapi/NdbScanOperation.cpp 2007-02-06 08:56:04 +01:00
+++ 1.108/storage/ndb/src/ndbapi/NdbScanOperation.cpp 2007-03-02 16:59:26 +01:00
@@ -852,7 +852,6 @@
tSignal = theSCAN_TABREQ;
Uint32 tupKeyLen = theTupKeyLen;
- Uint32 len = theTotalNrOfKeyWordInSignal;
Uint32 aTC_ConnectPtr = theNdbCon->theTCConPtr;
Uint64 transId = theNdbCon->theTransactionId;
@@ -995,6 +994,7 @@
newOp->theTupKeyLen = len;
newOp->theOperationType = opType;
+ newOp->m_abortOption = AbortOnError;
switch (opType) {
case (ReadRequest):
newOp->theLockMode = theLockMode;
@@ -1225,7 +1225,7 @@
* so it's safe to use [tIndexAttrId]
* (instead of looping as is NdbOperation::equal_impl)
*/
- if(type == BoundEQ && tDistrKey)
+ if(type == BoundEQ && tDistrKey && !m_multi_range)
{
theNoOfTupKeyLeft--;
return handle_distribution_key(valPtr, sizeInWords);
@@ -1311,7 +1311,8 @@
const bool order_by = scan_flags & SF_OrderBy;
const bool order_desc = scan_flags & SF_Descending;
const bool read_range_no = scan_flags & SF_ReadRangeNo;
-
+ m_multi_range = scan_flags & SF_MultiRange;
+
int res = NdbScanOperation::readTuples(lm, scan_flags, parallel, batch);
if(!res && read_range_no)
{
@@ -1361,8 +1362,6 @@
Uint32 cnt = m_accessTable->getNoOfColumns() - 1;
assert(cnt < NDB_MAX_NO_OF_ATTRIBUTES_IN_KEY);
- const NdbIndexImpl * idx = m_accessTable->m_index;
- const NdbTableImpl * tab = m_currentTable;
for(Uint32 i = 0; i<cnt; i++){
Uint32 val = theTupleKeyDefined[i][0];
switch(val){
@@ -1794,6 +1793,12 @@
int
NdbIndexScanOperation::end_of_bound(Uint32 no)
{
+ DBUG_ENTER("end_of_bound");
+ DBUG_PRINT("info", ("Range number %u", no));
+ /* Check that SF_MultiRange has been specified if more
+ than one range is specified */
+ if (no > 0 && !m_multi_range)
+ DBUG_RETURN(-1);
if(no < (1 << 13)) // Only 12-bits no of ranges
{
Uint32 bound_head = * m_first_bound_word;
@@ -1802,9 +1807,9 @@
m_first_bound_word = theKEYINFOptr + theTotalNrOfKeyWordInSignal;;
m_this_bound_start = theTupKeyLen;
- return 0;
+ DBUG_RETURN(0);
}
- return -1;
+ DBUG_RETURN(-1);
}
int
--- 1.41/storage/ndb/test/ndbapi/testNodeRestart.cpp 2007-02-06 08:56:04 +01:00
+++ 1.42/storage/ndb/test/ndbapi/testNodeRestart.cpp 2007-03-02 16:59:26 +01:00
@@ -1178,6 +1178,101 @@
return NDBT_OK;
}
+int runBug25984(NDBT_Context* ctx, NDBT_Step* step){
+
+ int result = NDBT_OK;
+ int loops = ctx->getNumLoops();
+ int records = ctx->getNumRecords();
+ NdbRestarter restarter;
+
+ if (restarter.getNumDbNodes() < 2)
+ return NDBT_OK;
+
+ if (restarter.restartAll(true, true, true))
+ return NDBT_FAILED;
+
+ if (restarter.waitClusterNoStart())
+ return NDBT_FAILED;
+
+ if (restarter.startAll())
+ return NDBT_FAILED;
+
+ if (restarter.waitClusterStarted())
+ return NDBT_FAILED;
+
+ int val2[] = { DumpStateOrd::CmvmiSetRestartOnErrorInsert, 1 };
+ int master = restarter.getMasterNodeId();
+ int victim = restarter.getRandomNodeOtherNodeGroup(master, rand());
+ if (victim == -1)
+ victim = restarter.getRandomNodeSameNodeGroup(master, rand());
+
+ restarter.restartOneDbNode(victim, false, true, true);
+
+ for (Uint32 i = 0; i<6; i++)
+ {
+ ndbout_c("Loop: %d", i);
+ if (restarter.waitNodesNoStart(&victim, 1))
+ return NDBT_FAILED;
+
+ if (restarter.dumpStateOneNode(victim, val2, 2))
+ return NDBT_FAILED;
+
+ if (restarter.insertErrorInNode(victim, 7016))
+ return NDBT_FAILED;
+
+ if (restarter.startNodes(&victim, 1))
+ return NDBT_FAILED;
+
+ if (restarter.waitNodesStartPhase(&victim, 1, 2))
+ return NDBT_FAILED;
+ }
+
+ if (restarter.waitNodesNoStart(&victim, 1))
+ return NDBT_FAILED;
+
+ if (restarter.dumpStateOneNode(victim, val2, 2))
+ return NDBT_FAILED;
+
+ if (restarter.insertErrorInNode(victim, 7170))
+ return NDBT_FAILED;
+
+ if (restarter.startNodes(&victim, 1))
+ return NDBT_FAILED;
+
+ if (restarter.waitNodesNoStart(&victim, 1))
+ return NDBT_FAILED;
+
+ if (restarter.restartAll(false, true, true))
+ return NDBT_FAILED;
+
+ if (restarter.insertErrorInAllNodes(932))
+ return NDBT_FAILED;
+
+ if (restarter.insertErrorInNode(master, 7170))
+ return NDBT_FAILED;
+
+ if (restarter.dumpStateAllNodes(val2, 2))
+ return NDBT_FAILED;
+
+ restarter.startNodes(&master, 1);
+ NdbSleep_MilliSleep(3000);
+ restarter.startAll();
+
+ if (restarter.waitClusterNoStart())
+ return NDBT_FAILED;
+
+ if (restarter.restartOneDbNode(victim, true, true, true))
+ return NDBT_FAILED;
+
+ if (restarter.startAll())
+ return NDBT_FAILED;
+
+ if (restarter.waitClusterStarted())
+ return NDBT_FAILED;
+
+ return NDBT_OK;
+}
+
NDBT_TESTSUITE(testNodeRestart);
TESTCASE("NoLoad",
@@ -1513,6 +1608,9 @@
}
TESTCASE("Bug25554", ""){
INITIALIZER(runBug25554);
+}
+TESTCASE("Bug25984", ""){
+ INITIALIZER(runBug25984);
}
NDBT_TESTSUITE_END(testNodeRestart);
| Thread |
|---|
| • bk commit into 5.1 tree (mikron:1.2433) | mikael | 2 Mar |