diff --git a/ndb/src/kernel/blocks/dbdict/printSchemafile/printSchemafile.cpp b/ndb/src/kernel/blocks/dbdict/printSchemaFile.cpp similarity index 89% rename from ndb/src/kernel/blocks/dbdict/printSchemafile/printSchemafile.cpp rename to ndb/src/kernel/blocks/dbdict/printSchemaFile.cpp index bf721a0b30a2c20ded39c9d6d83e79da579f1def..0ba52878b7cb92fad34da2ecf811874b1ac238de 100644 --- a/ndb/src/kernel/blocks/dbdict/printSchemafile/printSchemafile.cpp +++ b/ndb/src/kernel/blocks/dbdict/printSchemaFile.cpp @@ -1,3 +1,11 @@ +#if 0 +make -f Makefile -f - printSchemaFile <<'_eof_' +printSchemaFile: printSchemaFile.cpp + $(CXXCOMPILE) -o $@ $@.cpp -L../../../common/util/.libs -lgeneral +_eof_ +exit $? +#endif + /* Copyright (C) 2003 MySQL AB This program is free software; you can redistribute it and/or modify @@ -92,6 +100,13 @@ NDB_COMMAND(printSchemafile, } print(filename, (SchemaFile *)&buf[0]); + + Uint32 chk = 0, i; + for (i = 0; i < bytes/4; i++) + chk ^= buf[i]; + if (chk != 0) + ndbout << "Invalid checksum!" << endl; + delete [] buf; return 0; } diff --git a/ndb/src/kernel/blocks/dbdict/printSchemafile/Makefile b/ndb/src/kernel/blocks/dbdict/printSchemafile/Makefile deleted file mode 100644 index 1b097e2ce3780fb50ac109dea85c349d54e18263..0000000000000000000000000000000000000000 --- a/ndb/src/kernel/blocks/dbdict/printSchemafile/Makefile +++ /dev/null @@ -1,12 +0,0 @@ -include .defs.mk - -TYPE := ndbapi - -BIN_TARGET := printSchemafile -BIN_TARGET_ARCHIVES := portlib general - -CCFLAGS_LOC += -I.. - -SOURCES := printSchemafile.cpp - -include $(NDB_TOP)/Epilogue.mk