summaryrefslogtreecommitdiff
path: root/storage
diff options
context:
space:
mode:
authorunknown <tomas@whalegate.ndb.mysql.com>2007-05-15 09:54:42 +0200
committerunknown <tomas@whalegate.ndb.mysql.com>2007-05-15 09:54:42 +0200
commit98e9cc4a8b34201c2c140a15162fbc6f99fd6951 (patch)
tree4270c78b7ed349413733c5ea2d634da086a4931d /storage
parent153dba96f9900da6762613fb0764cd928eb23b06 (diff)
parentbc5ef9ffa190133061c35def819ba329f727749e (diff)
downloadmariadb-git-98e9cc4a8b34201c2c140a15162fbc6f99fd6951.tar.gz
Merge whalegate.ndb.mysql.com:/home/tomas/mysql-5.0-ndb
into whalegate.ndb.mysql.com:/home/tomas/mysql-5.1-single-user storage/ndb/src/kernel/error/ndbd_exit_codes.c: Auto merged storage/ndb/include/mgmapi/ndbd_exit_codes.h: manual merge storage/ndb/src/kernel/blocks/dbdict/Dbdict.cpp: manual merge
Diffstat (limited to 'storage')
-rw-r--r--storage/ndb/include/mgmapi/ndbd_exit_codes.h2
-rw-r--r--storage/ndb/src/kernel/blocks/dbdict/Dbdict.cpp26
2 files changed, 19 insertions, 9 deletions
diff --git a/storage/ndb/include/mgmapi/ndbd_exit_codes.h b/storage/ndb/include/mgmapi/ndbd_exit_codes.h
index 167fbe82ed0..30578bdf722 100644
--- a/storage/ndb/include/mgmapi/ndbd_exit_codes.h
+++ b/storage/ndb/include/mgmapi/ndbd_exit_codes.h
@@ -78,9 +78,9 @@ typedef ndbd_exit_classification_enum ndbd_exit_classification;
#define NDBD_EXIT_SR_RESTARTCONFLICT 2311
#define NDBD_EXIT_NO_MORE_UNDOLOG 2312
#define NDBD_EXIT_SR_UNDOLOG 2313
-#define NDBD_EXIT_SR_SCHEMAFILE 2310
#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
diff --git a/storage/ndb/src/kernel/blocks/dbdict/Dbdict.cpp b/storage/ndb/src/kernel/blocks/dbdict/Dbdict.cpp
index de365e886a0..72b9824984d 100644
--- a/storage/ndb/src/kernel/blocks/dbdict/Dbdict.cpp
+++ b/storage/ndb/src/kernel/blocks/dbdict/Dbdict.cpp
@@ -1371,14 +1371,24 @@ void Dbdict::readSchemaConf(Signal* signal,
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;
- ndbrequireErr(ok || !crashInd, NDBD_EXIT_SR_SCHEMAFILE);
+ 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();
ndbrequireErr(fsPtr.p->fsState == FsConnectRecord::READ_SCHEMA1,