Commit 40462a07 authored by unknown's avatar unknown

Bug #28770 file already opened error when corrupt schema file

- make sure we close the first file, before opening the next

parent 07524c35
...@@ -401,6 +401,9 @@ void Dbdict::execFSCLOSECONF(Signal* signal) ...@@ -401,6 +401,9 @@ void Dbdict::execFSCLOSECONF(Signal* signal)
case FsConnectRecord::OPEN_READ_SCHEMA2: case FsConnectRecord::OPEN_READ_SCHEMA2:
openSchemaFile(signal, 1, fsPtr.i, false, false); openSchemaFile(signal, 1, fsPtr.i, false, false);
break; break;
case FsConnectRecord::OPEN_READ_TAB_FILE2:
openTableFile(signal, 1, fsPtr.i, c_readTableRecord.tableId, false);
break;
default: default:
jamLine((fsPtr.p->fsState & 0xFFF)); jamLine((fsPtr.p->fsState & 0xFFF));
ndbrequire(false); ndbrequire(false);
...@@ -780,8 +783,11 @@ void Dbdict::readTableConf(Signal* signal, ...@@ -780,8 +783,11 @@ void Dbdict::readTableConf(Signal* signal,
void Dbdict::readTableRef(Signal* signal, void Dbdict::readTableRef(Signal* signal,
FsConnectRecordPtr fsPtr) FsConnectRecordPtr fsPtr)
{ {
/**
* First close corrupt file
*/
fsPtr.p->fsState = FsConnectRecord::OPEN_READ_TAB_FILE2; fsPtr.p->fsState = FsConnectRecord::OPEN_READ_TAB_FILE2;
openTableFile(signal, 1, fsPtr.i, c_readTableRecord.tableId, false); closeFile(signal, fsPtr.p->filePtr, fsPtr.i);
return; return;
}//Dbdict::readTableRef() }//Dbdict::readTableRef()
......
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