Below is the list of changes that have just been committed into a local
5.0 repository of tomas. When tomas 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-05-15 09:03:00+02:00, tomas@stripped +3 -0
Bug #26386 ndbd wont start after changing schema
backported error code from 5.1
split error check when reading schema file
ndb/include/mgmapi/ndbd_exit_codes.h@stripped, 2007-05-15 09:02:58+02:00,
tomas@stripped +1 -0
backported error code from 5.1
ndb/src/kernel/blocks/dbdict/Dbdict.cpp@stripped, 2007-05-15 09:02:58+02:00,
tomas@stripped +18 -8
backported error code from 5.1
split error check when reading schema file
ndb/src/kernel/error/ndbd_exit_codes.c@stripped, 2007-05-15 09:02:58+02:00,
tomas@stripped +1 -0
backported error code from 5.1
# 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: tomas
# Host: whalegate.ndb.mysql.com
# Root: /home/tomas/mysql-5.0-ndb
--- 1.80/ndb/src/kernel/blocks/dbdict/Dbdict.cpp 2007-04-26 16:48:50 +02:00
+++ 1.81/ndb/src/kernel/blocks/dbdict/Dbdict.cpp 2007-05-15 09:02:58 +02:00
@@ -1069,14 +1069,24 @@
for (Uint32 n = 0; n < xsf->noOfPages; n++) {
SchemaFile * sf = &xsf->schemaPage[n];
- bool ok =
- memcmp(sf->Magic, NDB_SF_MAGIC, sizeof(sf->Magic)) == 0 &&
- sf->FileSize != 0 &&
- sf->FileSize % NDB_SF_PAGE_SIZE == 0 &&
- sf->FileSize == sf0->FileSize &&
- sf->PageNumber == n &&
- computeChecksum((Uint32*)sf, NDB_SF_PAGE_SIZE_IN_WORDS) == 0;
- ndbrequire(ok || !crashInd);
+ bool ok = false;
+ if (memcmp(sf->Magic, NDB_SF_MAGIC, sizeof(sf->Magic)) != 0)
+ { jam(); }
+ else if (sf->FileSize == 0)
+ { jam(); }
+ else if (sf->FileSize % NDB_SF_PAGE_SIZE != 0)
+ { jam(); }
+ else if (sf->FileSize != sf0->FileSize)
+ { jam(); }
+ else if (sf->PageNumber != n)
+ { jam(); }
+ else if (computeChecksum((Uint32*)sf, NDB_SF_PAGE_SIZE_IN_WORDS) != 0)
+ { jam(); }
+ else if (crashInd)
+ { jam(); }
+ else
+ ok = true;
+ ndbrequireErr(ok, NDBD_EXIT_SR_SCHEMAFILE);
if (! ok) {
jam();
ndbrequire(fsPtr.p->fsState == FsConnectRecord::READ_SCHEMA1);
--- 1.13/ndb/include/mgmapi/ndbd_exit_codes.h 2007-05-15 08:34:36 +02:00
+++ 1.14/ndb/include/mgmapi/ndbd_exit_codes.h 2007-05-15 09:02:58 +02:00
@@ -80,6 +80,7 @@
#define NDBD_EXIT_SR_UNDOLOG 2313
#define NDBD_EXIT_SINGLE_USER_MODE 2314
#define NDBD_EXIT_NODE_DECLARED_DEAD 2315
+#define NDBD_EXIT_SR_SCHEMAFILE 2316
#define NDBD_EXIT_MEMALLOC 2327
#define NDBD_EXIT_BLOCK_JBUFCONGESTION 2334
#define NDBD_EXIT_TIME_QUEUE_SHORT 2335
--- 1.16/ndb/src/kernel/error/ndbd_exit_codes.c 2007-05-15 08:34:36 +02:00
+++ 1.17/ndb/src/kernel/error/ndbd_exit_codes.c 2007-05-15 09:02:58 +02:00
@@ -65,6 +65,7 @@
{NDBD_EXIT_NODE_NOT_DEAD, XRE, "Internal node state conflict, "
"most probably resolved by restarting node again"},
{NDBD_EXIT_SR_REDOLOG, XFI, "Error while reading the REDO log"},
+ {NDBD_EXIT_SR_SCHEMAFILE, XFI, "Error while reading the schema file"},
/* Currently unused? */
{2311, XIE, "Conflict when selecting restart type"},
{NDBD_EXIT_NO_MORE_UNDOLOG, XCR,
| Thread |
|---|
| • bk commit into 5.0 tree (tomas:1.2487) BUG#26386 | tomas | 15 May |