Commit c8b2392b authored by unknown's avatar unknown

Merge tsmith@bk-internal.mysql.com:/home/bk/mysql-5.0-maint

into  sita.local:/Users/tsmith/m/bk/maint/50

parents b3f397df fa4da4db
......@@ -1617,7 +1617,8 @@ public:
ACTIVE_WRITE_LOG = 17, ///< A write operation during
///< writing of log
READ_SR_INVALIDATE_PAGES = 18,
WRITE_SR_INVALIDATE_PAGES = 19
WRITE_SR_INVALIDATE_PAGES = 19,
WRITE_SR_INVALIDATE_PAGES_UPDATE_PAGE0 = 20
};
/**
* We have to remember the log pages read.
......@@ -2436,7 +2437,7 @@ private:
void errorReport(Signal* signal, int place);
void warningReport(Signal* signal, int place);
void invalidateLogAfterLastGCI(Signal *signal);
void readFileInInvalidate(Signal *signal);
void readFileInInvalidate(Signal *signal, bool stepNext);
void exitFromInvalidate(Signal* signal);
Uint32 calcPageCheckSum(LogPageRecordPtr logP);
......
This diff is collapsed.
......@@ -883,6 +883,12 @@ void Dbtc::execREAD_NODESCONF(Signal* signal)
hostptr.p->hostStatus = HS_ALIVE;
c_alive_nodes.set(i);
}//if
if (NodeBitmask::get(readNodes->startedNodes, i))
{
jam();
hostptr.p->m_nf_bits = HostRecord::NF_STARTED;
}
}//if
}//for
ndbsttorry010Lab(signal);
......@@ -10223,6 +10229,7 @@ void Dbtc::inithost(Signal* signal)
hostptr.p->noOfWordsTCINDXCONF = 0;
hostptr.p->noOfPackedWordsLqh = 0;
hostptr.p->hostLqhBlockRef = calcLqhBlockRef(hostptr.i);
hostptr.p->m_nf_bits = 0;
}//for
c_alive_nodes.clear();
}//Dbtc::inithost()
......
......@@ -943,12 +943,62 @@ int runBug24717(NDBT_Context* ctx, NDBT_Step* step){
restarter.startNodes(&nodeId, 1);
for (Uint32 i = 0; i < 100; i++)
{
hugoTrans.pkReadRecords(pNdb, 100, 1, NdbOperation::LM_CommittedRead);
}
do {
for (Uint32 i = 0; i < 100; i++)
{
hugoTrans.pkReadRecords(pNdb, 100, 1, NdbOperation::LM_CommittedRead);
}
} while (restarter.waitClusterStarted(5) != 0);
}
return NDBT_OK;
}
int
runBug29364(NDBT_Context* ctx, NDBT_Step* step){
int result = NDBT_OK;
int loops = ctx->getNumLoops();
int records = ctx->getNumRecords();
NdbRestarter restarter;
Ndb* pNdb = GETNDB(step);
HugoTransactions hugoTrans(*ctx->getTab());
if (restarter.getNumDbNodes() < 4)
return NDBT_OK;
int dump0[] = { 9000, 0 } ;
int dump1[] = { 9001, 0 } ;
Uint32 ownNode = refToNode(pNdb->getReference());
dump0[1] = ownNode;
for (; loops; loops --)
{
int node0 = restarter.getDbNodeId(rand() % restarter.getNumDbNodes());
int node1 = restarter.getRandomNodeOtherNodeGroup(node0, rand());
restarter.restartOneDbNode(node0, false, true, true);
restarter.waitNodesNoStart(&node0, 1);
restarter.startNodes(&node0, 1);
restarter.waitClusterStarted();
restarter.restartOneDbNode(node1, false, true, true);
restarter.waitNodesNoStart(&node1, 1);
if (restarter.dumpStateOneNode(node1, dump0, 2))
return NDBT_FAILED;
restarter.startNodes(&node1, 1);
do {
for (Uint32 i = 0; i < 100; i++)
{
hugoTrans.pkReadRecords(pNdb, 100, 1, NdbOperation::LM_CommittedRead);
}
} while (restarter.waitClusterStarted(5) != 0);
if (restarter.dumpStateOneNode(node1, dump1, 1))
return NDBT_FAILED;
}
return NDBT_OK;
......@@ -1633,6 +1683,9 @@ TESTCASE("Bug27283", ""){
TESTCASE("Bug28717", ""){
INITIALIZER(runBug28717);
}
TESTCASE("Bug29364", ""){
INITIALIZER(runBug29364);
}
NDBT_TESTSUITE_END(testNodeRestart);
int main(int argc, const char** argv){
......
......@@ -477,6 +477,10 @@ max-time: 1000
cmd: testNodeRestart
args: -n Bug24717 T1
max-time: 1000
cmd: testNodeRestart
args: -n Bug29364 T1
max-time: 1000
cmd: testNodeRestart
args: -n Bug25364 T1
......@@ -637,6 +641,10 @@ max-time: 1000
cmd: testNdbApi
args: -n BugBug28443
max-time: 1000
cmd: testNdbApi
args: -n Bug28443
#max-time: 500
#cmd: testInterpreter
#args: T1
......
......@@ -259,8 +259,20 @@ class Ndb_cond : public Sql_alloc
~Ndb_cond()
{
if (ndb_item) delete ndb_item;
ndb_item= NULL;
if (next) delete next;
ndb_item= NULL;
/*
First item in the linked list deletes all in a loop
Note - doing it recursively causes stack issues for
big IN clauses
*/
Ndb_cond *n= next;
while (n)
{
Ndb_cond *tmp= n;
n= n->next;
tmp->next= NULL;
delete tmp;
}
next= prev= NULL;
};
Ndb_item *ndb_item;
......
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