Commit 7fe87018 authored by jonas@eel.(none)'s avatar jonas@eel.(none)

bug#12027 - ndb

  When detecting corrupt schema file.
  Make sure to close it (as it will be opened later when rewriting a clean copy)
parent 3aede000
...@@ -369,6 +369,9 @@ void Dbdict::execFSCLOSECONF(Signal* signal) ...@@ -369,6 +369,9 @@ void Dbdict::execFSCLOSECONF(Signal* signal)
jam(); jam();
closeWriteTableConf(signal, fsPtr); closeWriteTableConf(signal, fsPtr);
break; break;
case FsConnectRecord::FsConnectRecord::OPEN_READ_SCHEMA2:
openSchemaFile(signal, 1, fsPtr.i, false);
break;
default: default:
jamLine((fsPtr.p->fsState & 0xFFF)); jamLine((fsPtr.p->fsState & 0xFFF));
ndbrequire(false); ndbrequire(false);
...@@ -1012,10 +1015,13 @@ void Dbdict::readSchemaConf(Signal* signal, ...@@ -1012,10 +1015,13 @@ void Dbdict::readSchemaConf(Signal* signal,
void Dbdict::readSchemaRef(Signal* signal, void Dbdict::readSchemaRef(Signal* signal,
FsConnectRecordPtr fsPtr) FsConnectRecordPtr fsPtr)
{ {
/**
* First close corrupt file
*/
fsPtr.p->fsState = FsConnectRecord::OPEN_READ_SCHEMA2; fsPtr.p->fsState = FsConnectRecord::OPEN_READ_SCHEMA2;
openSchemaFile(signal, 1, fsPtr.i, false); closeFile(signal, fsPtr.p->filePtr, fsPtr.i);
return; return;
}//Dbdict::readSchemaRef() }
void Dbdict::closeReadSchemaConf(Signal* signal, void Dbdict::closeReadSchemaConf(Signal* signal,
FsConnectRecordPtr fsPtr) FsConnectRecordPtr fsPtr)
......
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