Below is the list of changes that have just been committed into a local
5.0 repository of jonas. When jonas 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, 2006-08-28 10:26:21+02:00, jonas@stripped +1 -0
ndb - bug#21615
Improve error message when detecting corrupted REDO log
ndb/src/kernel/blocks/dblqh/DblqhMain.cpp@stripped, 2006-08-28 10:26:19+02:00, jonas@stripped +48 -30
Improve error message when detecting corrupted REDO log
# 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: jonas
# Host: perch.ndb.mysql.com
# Root: /home/jonas/src/50-work
--- 1.92/ndb/src/kernel/blocks/dblqh/DblqhMain.cpp 2006-08-28 10:26:24 +02:00
+++ 1.93/ndb/src/kernel/blocks/dblqh/DblqhMain.cpp 2006-08-28 10:26:24 +02:00
@@ -14622,6 +14622,8 @@
LogFileRecordPtr nextLogFilePtr;
LogPageRecordPtr tmpLogPagePtr;
Uint32 logWord;
+ Uint32 line;
+ const char * crash_msg = 0;
jamEntry();
logPartPtr.i = signal->theData[0];
@@ -14832,8 +14834,14 @@
/* PLACE THAN IN THE FIRST PAGE OF A NEW FILE IN THE FIRST POSITION AFTER THE*/
/* HEADER. */
/*---------------------------------------------------------------------------*/
- ndbrequire(logPagePtr.p->logPageWord[ZCURR_PAGE_INDEX] ==
- (ZPAGE_HEADER_SIZE + ZPOS_NO_FD));
+ if (unlikely(logPagePtr.p->logPageWord[ZCURR_PAGE_INDEX] !=
+ (ZPAGE_HEADER_SIZE + ZPOS_NO_FD)))
+ {
+ line = __LINE__;
+ logWord = logPagePtr.p->logPageWord[ZCURR_PAGE_INDEX];
+ crash_msg = "ZFD_TYPE at incorrect position!";
+ goto crash;
+ }
{
Uint32 noFdDescriptors =
logPagePtr.p->logPageWord[ZPAGE_HEADER_SIZE + ZPOS_NO_FD];
@@ -14870,19 +14878,10 @@
/*---------------------------------------------------------------------------*/
/* SEND A SIGNAL TO THE SIGNAL LOG AND THEN CRASH THE SYSTEM. */
/*---------------------------------------------------------------------------*/
- signal->theData[0] = RNIL;
- signal->theData[1] = logPartPtr.i;
- Uint32 tmp = logFilePtr.p->fileName[3];
- tmp = (tmp >> 8) & 0xff;// To get the Directory, DXX.
- signal->theData[2] = tmp;
- signal->theData[3] = logFilePtr.p->fileNo;
- signal->theData[4] = logFilePtr.p->currentFilepage;
- signal->theData[5] = logFilePtr.p->currentMbyte;
- signal->theData[6] = logPagePtr.p->logPageWord[ZCURR_PAGE_INDEX];
- signal->theData[7] = ~0;
- signal->theData[8] = __LINE__;
- sendSignal(cownref, GSN_DEBUG_SIG, signal, 9, JBA);
- return;
+ line = __LINE__;
+ logWord = ZNEXT_MBYTE_TYPE;
+ crash_msg = "end of log wo/ having found last GCI";
+ goto crash;
}//if
}//if
/*---------------------------------------------------------------------------*/
@@ -14937,19 +14936,9 @@
/*---------------------------------------------------------------------------*/
/* SEND A SIGNAL TO THE SIGNAL LOG AND THEN CRASH THE SYSTEM. */
/*---------------------------------------------------------------------------*/
- signal->theData[0] = RNIL;
- signal->theData[1] = logPartPtr.i;
- Uint32 tmp = logFilePtr.p->fileName[3];
- tmp = (tmp >> 8) & 0xff;// To get the Directory, DXX.
- signal->theData[2] = tmp;
- signal->theData[3] = logFilePtr.p->fileNo;
- signal->theData[4] = logFilePtr.p->currentMbyte;
- signal->theData[5] = logFilePtr.p->currentFilepage;
- signal->theData[6] = logPagePtr.p->logPageWord[ZCURR_PAGE_INDEX];
- signal->theData[7] = logWord;
- signal->theData[8] = __LINE__;
- sendSignal(cownref, GSN_DEBUG_SIG, signal, 9, JBA);
- return;
+ line = __LINE__;
+ crash_msg = "Invalid logword";
+ goto crash;
break;
}//switch
/*---------------------------------------------------------------------------*/
@@ -14957,6 +14946,35 @@
// that we reach a new page.
/*---------------------------------------------------------------------------*/
} while (1);
+ return;
+
+crash:
+ signal->theData[0] = RNIL;
+ signal->theData[1] = logPartPtr.i;
+ Uint32 tmp = logFilePtr.p->fileName[3];
+ tmp = (tmp >> 8) & 0xff;// To get the Directory, DXX.
+ signal->theData[2] = tmp;
+ signal->theData[3] = logFilePtr.p->fileNo;
+ signal->theData[4] = logFilePtr.p->currentMbyte;
+ signal->theData[5] = logFilePtr.p->currentFilepage;
+ signal->theData[6] = logPagePtr.p->logPageWord[ZCURR_PAGE_INDEX];
+ signal->theData[7] = logWord;
+ signal->theData[8] = line;
+
+ char buf[255];
+ BaseString::snprintf(buf, sizeof(buf),
+ "Error while reading REDO log. from %d\n"
+ "D=%d, F=%d Mb=%d FP=%d W1=%d W2=%d : %s",
+ signal->theData[8],
+ signal->theData[2],
+ signal->theData[3],
+ signal->theData[4],
+ signal->theData[5],
+ signal->theData[6],
+ signal->theData[7],
+ crash_msg ? crash_msg : "");
+
+ progError(__LINE__, NDBD_EXIT_SR_REDOLOG, buf);
}//Dblqh::execSr()
/*---------------------------------------------------------------------------*/
@@ -14972,8 +14990,8 @@
UintR tdebug;
jamEntry();
- logPagePtr.i = signal->theData[0];
- tdebug = logPagePtr.p->logPageWord[0];
+ //logPagePtr.i = signal->theData[0];
+ //tdebug = logPagePtr.p->logPageWord[0];
char buf[100];
BaseString::snprintf(buf, 100,
| Thread |
|---|
| • bk commit into 5.0 tree (jonas:1.2243) BUG#21615 | jonas | 28 Aug |