Commit 71d5a20d authored by jonas@perch.ndb.mysql.com's avatar jonas@perch.ndb.mysql.com

Merge joreland@bk-internal.mysql.com:/home/bk/mysql-4.1

into  perch.ndb.mysql.com:/home/jonas/src/mysql-4.1
parents 86132d5d d09e065e
...@@ -232,6 +232,7 @@ ...@@ -232,6 +232,7 @@
#define ZSCAN_MARKERS 18 #define ZSCAN_MARKERS 18
#define ZOPERATION_EVENT_REP 19 #define ZOPERATION_EVENT_REP 19
#define ZPREP_DROP_TABLE 20 #define ZPREP_DROP_TABLE 20
#define ZENABLE_EXPAND_CHECK 21
/* ------------------------------------------------------------------------- */ /* ------------------------------------------------------------------------- */
/* NODE STATE DURING SYSTEM RESTART, VARIABLES CNODES_SR_STATE */ /* NODE STATE DURING SYSTEM RESTART, VARIABLES CNODES_SR_STATE */
......
...@@ -434,6 +434,33 @@ void Dblqh::execCONTINUEB(Signal* signal) ...@@ -434,6 +434,33 @@ void Dblqh::execCONTINUEB(Signal* signal)
checkDropTab(signal); checkDropTab(signal);
return; return;
break; break;
case ZENABLE_EXPAND_CHECK:
{
jam();
fragptr.i = signal->theData[1];
if (fragptr.i != RNIL)
{
jam();
ptrCheckGuard(fragptr, cfragrecFileSize, fragrecord);
signal->theData[0] = fragptr.p->tabRef;
signal->theData[1] = fragptr.p->fragId;
sendSignal(DBACC_REF, GSN_EXPANDCHECK2, signal, 2, JBB);
signal->theData[0] = ZENABLE_EXPAND_CHECK;
signal->theData[1] = fragptr.p->nextFrag;
sendSignal(DBLQH_REF, GSN_CONTINUEB, signal, 2, JBB);
return;
}
else
{
jam();
StartRecConf * conf = (StartRecConf*)signal->getDataPtrSend();
conf->startingNodeId = getOwnNodeId();
sendSignal(cmasterDihBlockref, GSN_START_RECCONF, signal,
StartRecConf::SignalLength, JBB);
return;
}
}
default: default:
ndbrequire(false); ndbrequire(false);
break; break;
...@@ -15503,20 +15530,21 @@ void Dblqh::srFourthComp(Signal* signal) ...@@ -15503,20 +15530,21 @@ void Dblqh::srFourthComp(Signal* signal)
} else if ((cstartType == NodeState::ST_NODE_RESTART) || } else if ((cstartType == NodeState::ST_NODE_RESTART) ||
(cstartType == NodeState::ST_SYSTEM_RESTART)) { (cstartType == NodeState::ST_SYSTEM_RESTART)) {
jam(); jam();
if(cstartType == NodeState::ST_SYSTEM_RESTART)
{
jam();
signal->theData[0] = ZENABLE_EXPAND_CHECK;
signal->theData[1] = c_redo_log_complete_frags;
sendSignal(DBLQH_REF, GSN_CONTINUEB, signal, 2, JBB);
}
else
{
jam();
StartRecConf * conf = (StartRecConf*)signal->getDataPtrSend(); StartRecConf * conf = (StartRecConf*)signal->getDataPtrSend();
conf->startingNodeId = getOwnNodeId(); conf->startingNodeId = getOwnNodeId();
sendSignal(cmasterDihBlockref, GSN_START_RECCONF, signal, sendSignal(cmasterDihBlockref, GSN_START_RECCONF, signal,
StartRecConf::SignalLength, JBB); StartRecConf::SignalLength, JBB);
if(cstartType == NodeState::ST_SYSTEM_RESTART){
fragptr.i = c_redo_log_complete_frags;
while(fragptr.i != RNIL){
ptrCheckGuard(fragptr, cfragrecFileSize, fragrecord);
signal->theData[0] = fragptr.p->tabRef;
signal->theData[1] = fragptr.p->fragId;
sendSignal(DBACC_REF, GSN_EXPANDCHECK2, signal, 2, JBB);
fragptr.i = fragptr.p->nextFrag;
}
} }
} else { } else {
ndbrequire(false); ndbrequire(false);
......
...@@ -6978,6 +6978,18 @@ void Dbtc::checkScanActiveInFailedLqh(Signal* signal, ...@@ -6978,6 +6978,18 @@ void Dbtc::checkScanActiveInFailedLqh(Signal* signal,
found = true; found = true;
} }
} }
ScanFragList deliv(c_scan_frag_pool, scanptr.p->m_delivered_scan_frags);
for(deliv.first(ptr); !ptr.isNull(); deliv.next(ptr))
{
jam();
if (refToNode(ptr.p->lqhBlockref) == failedNodeId)
{
jam();
found = true;
break;
}
}
} }
if(found){ if(found){
jam(); jam();
......
...@@ -26,12 +26,12 @@ public: ...@@ -26,12 +26,12 @@ public:
void init() { m_confs.clear(); m_nRefs = 0; } void init() { m_confs.clear(); m_nRefs = 0; }
template<typename SignalClass> template<typename SignalClass>
void init(SafeCounterManager& mgr, bool init(SafeCounterManager& mgr,
NodeReceiverGroup rg, Uint16 GSN, Uint32 senderData) NodeReceiverGroup rg, Uint16 GSN, Uint32 senderData)
{ {
init(); init();
SafeCounter tmp(mgr, m_sc); SafeCounter tmp(mgr, m_sc);
tmp.init<SignalClass>(rg, GSN, senderData); return tmp.init<SignalClass>(rg, GSN, senderData);
} }
bool ignoreRef(SafeCounterManager& mgr, Uint32 nodeId) bool ignoreRef(SafeCounterManager& mgr, Uint32 nodeId)
......
...@@ -230,10 +230,13 @@ inline ...@@ -230,10 +230,13 @@ inline
bool bool
SafeCounter::init(NodeReceiverGroup rg, Uint16 GSN, Uint32 senderData){ SafeCounter::init(NodeReceiverGroup rg, Uint16 GSN, Uint32 senderData){
bool b = init<Ref>(rg.m_block, GSN, senderData); if (init<Ref>(rg.m_block, GSN, senderData))
{
m_nodes = rg.m_nodes; m_nodes = rg.m_nodes;
m_count = m_nodes.count(); m_count = m_nodes.count();
return b; return true;
}
return false;
} }
template<typename Ref> template<typename Ref>
...@@ -241,10 +244,13 @@ inline ...@@ -241,10 +244,13 @@ inline
bool bool
SafeCounter::init(NodeReceiverGroup rg, Uint32 senderData){ SafeCounter::init(NodeReceiverGroup rg, Uint32 senderData){
bool b = init<Ref>(rg.m_block, Ref::GSN, senderData); if (init<Ref>(rg.m_block, Ref::GSN, senderData))
{
m_nodes = rg.m_nodes; m_nodes = rg.m_nodes;
m_count = m_nodes.count(); m_count = m_nodes.count();
return b; return true;
}
return false;
} }
inline inline
......
...@@ -30,6 +30,7 @@ extern my_bool opt_core; ...@@ -30,6 +30,7 @@ extern my_bool opt_core;
#define MAX_LINE_LENGTH 255 #define MAX_LINE_LENGTH 255
#define KEY_INTERNAL 0 #define KEY_INTERNAL 0
#define MAX_INT_RNIL 0xfffffeff #define MAX_INT_RNIL 0xfffffeff
#define MAX_PORT_NO 65535
#define _STR_VALUE(x) #x #define _STR_VALUE(x) #x
#define STR_VALUE(x) _STR_VALUE(x) #define STR_VALUE(x) _STR_VALUE(x)
...@@ -426,7 +427,7 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = { ...@@ -426,7 +427,7 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = {
ConfigInfo::CI_INT, ConfigInfo::CI_INT,
UNDEFINED, UNDEFINED,
"1", "1",
STR_VALUE(MAX_INT_RNIL) }, STR_VALUE(MAX_PORT_NO) },
{ {
CFG_DB_NO_REPLICAS, CFG_DB_NO_REPLICAS,
...@@ -1430,7 +1431,7 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = { ...@@ -1430,7 +1431,7 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = {
ConfigInfo::CI_INT, ConfigInfo::CI_INT,
NDB_PORT, NDB_PORT,
"0", "0",
STR_VALUE(MAX_INT_RNIL) }, STR_VALUE(MAX_PORT_NO) },
{ {
KEY_INTERNAL, KEY_INTERNAL,
...@@ -1442,7 +1443,7 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = { ...@@ -1442,7 +1443,7 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = {
ConfigInfo::CI_INT, ConfigInfo::CI_INT,
UNDEFINED, UNDEFINED,
"0", "0",
STR_VALUE(MAX_INT_RNIL) }, STR_VALUE(MAX_PORT_NO) },
{ {
CFG_NODE_ARBIT_RANK, CFG_NODE_ARBIT_RANK,
...@@ -1573,7 +1574,7 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = { ...@@ -1573,7 +1574,7 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = {
ConfigInfo::CI_INT, ConfigInfo::CI_INT,
MANDATORY, MANDATORY,
"0", "0",
STR_VALUE(MAX_INT_RNIL) }, STR_VALUE(MAX_PORT_NO) },
{ {
CFG_TCP_SEND_BUFFER_SIZE, CFG_TCP_SEND_BUFFER_SIZE,
...@@ -1679,7 +1680,7 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = { ...@@ -1679,7 +1680,7 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = {
ConfigInfo::CI_INT, ConfigInfo::CI_INT,
MANDATORY, MANDATORY,
"0", "0",
STR_VALUE(MAX_INT_RNIL) }, STR_VALUE(MAX_PORT_NO) },
{ {
CFG_SHM_SIGNUM, CFG_SHM_SIGNUM,
...@@ -1879,7 +1880,7 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = { ...@@ -1879,7 +1880,7 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = {
ConfigInfo::CI_INT, ConfigInfo::CI_INT,
MANDATORY, MANDATORY,
"0", "0",
STR_VALUE(MAX_INT_RNIL) }, STR_VALUE(MAX_PORT_NO) },
{ {
CFG_SCI_HOST1_ID_0, CFG_SCI_HOST1_ID_0,
......
...@@ -294,6 +294,7 @@ int runRestarts(NDBT_Context* ctx, NDBT_Step* step){ ...@@ -294,6 +294,7 @@ int runRestarts(NDBT_Context* ctx, NDBT_Step* step){
} }
i++; i++;
} }
ctx->stopTest();
return result; return result;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment