From 58e57625c45ad7deb2deb648786b41781f1e589f Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 25 Aug 2005 13:16:29 +0200 Subject: bug#12027 - ndb When detecting corrupt schema file. Make sure to close it (as it will be opened later when rewriting a clean copy) ndb/src/kernel/blocks/dbdict/Dbdict.cpp: bug#12027 When detecting corrupt schema file. Make sure to close it (as it will be opened later when rewriting a clean copy) --- ndb/src/kernel/blocks/dbdict/Dbdict.cpp | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'ndb') diff --git a/ndb/src/kernel/blocks/dbdict/Dbdict.cpp b/ndb/src/kernel/blocks/dbdict/Dbdict.cpp index f60720a1345..5ad225f3f37 100644 --- a/ndb/src/kernel/blocks/dbdict/Dbdict.cpp +++ b/ndb/src/kernel/blocks/dbdict/Dbdict.cpp @@ -369,6 +369,9 @@ void Dbdict::execFSCLOSECONF(Signal* signal) jam(); closeWriteTableConf(signal, fsPtr); break; + case FsConnectRecord::FsConnectRecord::OPEN_READ_SCHEMA2: + openSchemaFile(signal, 1, fsPtr.i, false); + break; default: jamLine((fsPtr.p->fsState & 0xFFF)); ndbrequire(false); @@ -1012,10 +1015,13 @@ void Dbdict::readSchemaConf(Signal* signal, void Dbdict::readSchemaRef(Signal* signal, FsConnectRecordPtr fsPtr) { + /** + * First close corrupt file + */ fsPtr.p->fsState = FsConnectRecord::OPEN_READ_SCHEMA2; - openSchemaFile(signal, 1, fsPtr.i, false); + closeFile(signal, fsPtr.p->filePtr, fsPtr.i); return; -}//Dbdict::readSchemaRef() +} void Dbdict::closeReadSchemaConf(Signal* signal, FsConnectRecordPtr fsPtr) -- cgit v1.2.1