Commit f527479f authored by tomas@whalegate.ndb.mysql.com's avatar tomas@whalegate.ndb.mysql.com

Merge whalegate.ndb.mysql.com:/home/tomas/mysql-5.0-ndb

into  whalegate.ndb.mysql.com:/home/tomas/mysql-5.1-single-user
parents 60e28cc9 b027b84a
...@@ -78,9 +78,9 @@ typedef ndbd_exit_classification_enum ndbd_exit_classification; ...@@ -78,9 +78,9 @@ typedef ndbd_exit_classification_enum ndbd_exit_classification;
#define NDBD_EXIT_SR_RESTARTCONFLICT 2311 #define NDBD_EXIT_SR_RESTARTCONFLICT 2311
#define NDBD_EXIT_NO_MORE_UNDOLOG 2312 #define NDBD_EXIT_NO_MORE_UNDOLOG 2312
#define NDBD_EXIT_SR_UNDOLOG 2313 #define NDBD_EXIT_SR_UNDOLOG 2313
#define NDBD_EXIT_SR_SCHEMAFILE 2310
#define NDBD_EXIT_SINGLE_USER_MODE 2314 #define NDBD_EXIT_SINGLE_USER_MODE 2314
#define NDBD_EXIT_NODE_DECLARED_DEAD 2315 #define NDBD_EXIT_NODE_DECLARED_DEAD 2315
#define NDBD_EXIT_SR_SCHEMAFILE 2316
#define NDBD_EXIT_MEMALLOC 2327 #define NDBD_EXIT_MEMALLOC 2327
#define NDBD_EXIT_BLOCK_JBUFCONGESTION 2334 #define NDBD_EXIT_BLOCK_JBUFCONGESTION 2334
#define NDBD_EXIT_TIME_QUEUE_SHORT 2335 #define NDBD_EXIT_TIME_QUEUE_SHORT 2335
......
...@@ -1371,14 +1371,24 @@ void Dbdict::readSchemaConf(Signal* signal, ...@@ -1371,14 +1371,24 @@ void Dbdict::readSchemaConf(Signal* signal,
for (Uint32 n = 0; n < xsf->noOfPages; n++) { for (Uint32 n = 0; n < xsf->noOfPages; n++) {
SchemaFile * sf = &xsf->schemaPage[n]; SchemaFile * sf = &xsf->schemaPage[n];
bool ok = bool ok = false;
memcmp(sf->Magic, NDB_SF_MAGIC, sizeof(sf->Magic)) == 0 && if (memcmp(sf->Magic, NDB_SF_MAGIC, sizeof(sf->Magic)) != 0)
sf->FileSize != 0 && { jam(); }
sf->FileSize % NDB_SF_PAGE_SIZE == 0 && else if (sf->FileSize == 0)
sf->FileSize == sf0->FileSize && { jam(); }
sf->PageNumber == n && else if (sf->FileSize % NDB_SF_PAGE_SIZE != 0)
computeChecksum((Uint32*)sf, NDB_SF_PAGE_SIZE_IN_WORDS) == 0; { jam(); }
ndbrequireErr(ok || !crashInd, NDBD_EXIT_SR_SCHEMAFILE); 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) { if (! ok) {
jam(); jam();
ndbrequireErr(fsPtr.p->fsState == FsConnectRecord::READ_SCHEMA1, ndbrequireErr(fsPtr.p->fsState == FsConnectRecord::READ_SCHEMA1,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment