summaryrefslogtreecommitdiff
path: root/ndb/src
diff options
context:
space:
mode:
authorjonas@perch.ndb.mysql.com <>2006-06-01 08:51:57 +0200
committerjonas@perch.ndb.mysql.com <>2006-06-01 08:51:57 +0200
commita143136b4ce09f6e04f7e9e68461818d2c55f580 (patch)
tree8ac3f46c5ef75841e420dc6f976607e95517395b /ndb/src
parente5963d6a173c6fc1167734e2e1ad93de61b61df4 (diff)
parentc7939ee558215aaf5c820c4766880073d12a3bea (diff)
downloadmariadb-git-a143136b4ce09f6e04f7e9e68461818d2c55f580.tar.gz
Merge joreland@bk-internal.mysql.com:/home/bk/mysql-5.0
into perch.ndb.mysql.com:/home/jonas/src/mysql-5.0
Diffstat (limited to 'ndb/src')
-rw-r--r--ndb/src/kernel/blocks/ERROR_codes.txt3
-rw-r--r--ndb/src/kernel/blocks/dbdih/DbdihMain.cpp24
-rw-r--r--ndb/src/kernel/blocks/dbtc/DbtcMain.cpp8
3 files changed, 32 insertions, 3 deletions
diff --git a/ndb/src/kernel/blocks/ERROR_codes.txt b/ndb/src/kernel/blocks/ERROR_codes.txt
index 985ae933a75..f8e3d11f222 100644
--- a/ndb/src/kernel/blocks/ERROR_codes.txt
+++ b/ndb/src/kernel/blocks/ERROR_codes.txt
@@ -63,6 +63,9 @@ Delay GCP_SAVEREQ by 10 secs
7165: Delay INCL_NODE_REQ in starting node yeilding error in GCP_PREPARE
+7030: Delay in GCP_PREPARE until node has completed a node failure
+7031: Delay in GCP_PREPARE and die 3s later
+
ERROR CODES FOR TESTING NODE FAILURE, LOCAL CHECKPOINT HANDLING:
-----------------------------------------------------------------
diff --git a/ndb/src/kernel/blocks/dbdih/DbdihMain.cpp b/ndb/src/kernel/blocks/dbdih/DbdihMain.cpp
index c8254052a56..3ebad7f0cd2 100644
--- a/ndb/src/kernel/blocks/dbdih/DbdihMain.cpp
+++ b/ndb/src/kernel/blocks/dbdih/DbdihMain.cpp
@@ -5425,6 +5425,12 @@ Dbdih::checkLocalNodefailComplete(Signal* signal, Uint32 failedNodeId,
return;
}
+ if (ERROR_INSERTED(7030))
+ {
+ ndbout_c("Reenable GCP_PREPARE");
+ CLEAR_ERROR_INSERT_VALUE;
+ }
+
NFCompleteRep * const nf = (NFCompleteRep *)&signal->theData[0];
nf->blockNo = DBDIH;
nf->nodeId = cownNodeId;
@@ -7484,6 +7490,16 @@ void Dbdih::execGCP_PREPARE(Signal* signal)
{
jamEntry();
CRASH_INSERTION(7005);
+
+ if (ERROR_INSERTED(7030))
+ {
+ cgckptflag = true;
+ ndbout_c("Delayed GCP_PREPARE 5s");
+ sendSignalWithDelay(reference(), GSN_GCP_PREPARE, signal, 5000,
+ signal->getLength());
+ return;
+ }
+
Uint32 masterNodeId = signal->theData[0];
Uint32 gci = signal->theData[1];
BlockReference retRef = calcDihBlockRef(masterNodeId);
@@ -7496,6 +7512,14 @@ void Dbdih::execGCP_PREPARE(Signal* signal)
cgcpParticipantState = GCP_PARTICIPANT_PREPARE_RECEIVED;
cnewgcp = gci;
+ if (ERROR_INSERTED(7031))
+ {
+ ndbout_c("Crashing delayed in GCP_PREPARE 3s");
+ signal->theData[0] = 9999;
+ sendSignalWithDelay(CMVMI_REF, GSN_NDB_TAMPER, signal, 3000, 1);
+ return;
+ }
+
signal->theData[0] = cownNodeId;
signal->theData[1] = gci;
sendSignal(retRef, GSN_GCP_PREPARECONF, signal, 2, JBA);
diff --git a/ndb/src/kernel/blocks/dbtc/DbtcMain.cpp b/ndb/src/kernel/blocks/dbtc/DbtcMain.cpp
index c1475ec44cf..193e1fea08b 100644
--- a/ndb/src/kernel/blocks/dbtc/DbtcMain.cpp
+++ b/ndb/src/kernel/blocks/dbtc/DbtcMain.cpp
@@ -7071,18 +7071,20 @@ Dbtc::nodeFailCheckTransactions(Signal* signal,
{
jam();
Ptr<ApiConnectRecord> transPtr;
+ Uint32 TtcTimer = ctcTimer;
+ Uint32 TapplTimeout = c_appl_timeout_value;
for (transPtr.i = transPtrI; transPtr.i < capiConnectFilesize; transPtr.i++)
{
ptrCheckGuard(transPtr, capiConnectFilesize, apiConnectRecord);
if (transPtr.p->m_transaction_nodes.get(failedNodeId))
{
jam();
+
// Force timeout regardless of state
- Uint32 save = c_appl_timeout_value;
c_appl_timeout_value = 1;
- setApiConTimer(transPtr.i, 0, __LINE__);
+ setApiConTimer(transPtr.i, TtcTimer - 2, __LINE__);
timeOutFoundLab(signal, transPtr.i, ZNODEFAIL_BEFORE_COMMIT);
- c_appl_timeout_value = save;
+ c_appl_timeout_value = TapplTimeout;
}
// Send CONTINUEB to continue later