Below is the list of changes that have just been committed into a local
5.1 repository of ndbdev. When ndbdev 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-06-02 16:26:37+02:00, jmiller@stripped +3 -0
Updated patch for testing the fix to Bug#28770
storage/ndb/src/kernel/blocks/ERROR_codes.txt@stripped, 2007-06-02 16:21:52+02:00,
jmiller@stripped +1 -0
Updated to include error 6100 text for: Bug#28770
storage/ndb/src/kernel/blocks/dbdict/Dbdict.cpp@stripped, 2007-06-02 16:16:15+02:00,
jmiller@stripped +11 -0
Updated patch to include setting up the signal with a read error: Bug#28770
storage/ndb/test/ndbapi/testSystemRestart.cpp@stripped, 2007-06-02 16:25:58+02:00,
jmiller@stripped +49 -0
Updated testSystemRestart to include a test case to insert the 6100 Error for :
Bug#28770
# 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: jmiller
# Host: ndb08.mysql.com
# Root: /data1/mysql-5.1-telco4
--- 1.43/storage/ndb/src/kernel/blocks/ERROR_codes.txt 2007-06-02 16:26:49 +02:00
+++ 1.44/storage/ndb/src/kernel/blocks/ERROR_codes.txt 2007-06-02 16:26:49 +02:00
@@ -503,6 +503,7 @@
6003 Crash in participant @ CreateTabReq::Prepare
6004 Crash in participant @ CreateTabReq::Commit
6005 Crash in participant @ CreateTabReq::CreateDrop
+6100 Fail on readTableFile for READ_TAB_FILE1 (28770)
Dbtup:
4014 - handleInsert - Out of undo buffer
--- 1.138/storage/ndb/src/kernel/blocks/dbdict/Dbdict.cpp 2007-06-02 16:26:49 +02:00
+++ 1.139/storage/ndb/src/kernel/blocks/dbdict/Dbdict.cpp 2007-06-02 16:26:49 +02:00
@@ -804,6 +804,17 @@
readSchemaConf(signal ,fsPtr);
break;
case FsConnectRecord::READ_TAB_FILE1:
+ if(ERROR_INSERTED(6100)){
+ jam();
+ #ifdef EVENT_DEBUG
+ printf("Error 6100 inserted, setting up signal\n");
+ #endif
+ FsRef * const fsRef = (FsRef *)&signal->theData[0];
+ fsRef->setErrorCode(fsRef->errorCode, NDBD_EXIT_AFS_UNKNOWN);
+ fsRef->osErrorCode = ~0; // Indicate local error
+ execFSREADREF(signal);
+ return;
+ }//Testing how DICT behave if read of file 1 fails (Bug#28770)
case FsConnectRecord::READ_TAB_FILE2:
jam();
readTableConf(signal ,fsPtr);
--- 1.14/storage/ndb/test/ndbapi/testSystemRestart.cpp 2007-06-02 16:26:50 +02:00
+++ 1.15/storage/ndb/test/ndbapi/testSystemRestart.cpp 2007-06-02 16:26:50 +02:00
@@ -1267,6 +1267,42 @@
return result;
}
+int
+runBug28770(NDBT_Context* ctx, NDBT_Step* step) {
+ Ndb* pNdb = GETNDB(step);
+ NdbRestarter restarter;
+ int result = NDBT_OK;
+ int count = 0;
+ Uint32 i = 0;
+ Uint32 loops = 2;
+ int records = ctx->getNumRecords();
+ UtilTransactions utilTrans(*ctx->getTab());
+ HugoTransactions hugoTrans(*ctx->getTab());
+
+ g_info << "Loading records..." << endl;
+ hugoTrans.loadTable(pNdb, records);
+
+
+ while(i<=loops && result != NDBT_FAILED){
+ g_info << "Loop " << i << "/"<< loops <<" started"
<< endl;
+ CHECK(restarter.restartAll(false, true, false) == 0);
+ NdbSleep_SecSleep(3);
+ CHECK(restarter.waitClusterNoStart() == 0);
+ restarter.insertErrorInAllNodes(6100);
+ CHECK(restarter.startAll()== 0);
+ CHECK(restarter.waitClusterStarted() == 0);
+ CHECK(utilTrans.selectCount(pNdb, 64, &count) == 0);
+ CHECK(count == records);
+ i++;
+ }
+
+
+ ndbout << " runBug28770 finished" << endl;
+
+ return result;
+}
+
+
NDBT_TESTSUITE(testSystemRestart);
TESTCASE("SR1",
"Basic system restart test. Focus on testing restart from REDO log.\n"
@@ -1452,6 +1488,19 @@
{
INITIALIZER(runWaitStarted);
STEP(runBug27434);
+}
+TESTCASE("Bug28770",
+ "Check readTableFile1 fails, readTableFile2 succeeds\n"
+ "1. Restart all node -nostart\n"
+ "2. Insert error 6100 into all nodes\n"
+ "3. Start all nodes\n"
+ "4. Ensure cluster start\n"
+ "5. Read and verify reocrds\n"
+ "6. Repeat until looping is completed\n"){
+ INITIALIZER(runWaitStarted);
+ INITIALIZER(runClearTable);
+ STEP(runBug28770);
+ FINALIZER(runClearTable);
}
NDBT_TESTSUITE_END(testSystemRestart);
| Thread |
|---|
| • bk commit into 5.1 tree (jmiller:1.2515) BUG#28770 | Jonathan Miller | 2 Jun |