This commit is contained in:
Michael Kolupaev 2014-04-18 14:37:26 +04:00
parent 30db4e41ec
commit 2ff0b62529
2 changed files with 3 additions and 3 deletions

View File

@ -299,8 +299,8 @@ public:
if (!Poco::File(path).exists())
return false;
ReadBufferFromFile file(path, std::min(static_cast<size_t>(DBMS_DEFAULT_BUFFER_SIZE), Poco::File(path).getSize()));
checksums.readText(file);
assertEOF(file);
if (checksums.readText(file))
assertEOF(file);
return true;
}
};

View File

@ -877,7 +877,7 @@ bool MergeTreeData::DataPart::Checksums::readText(ReadBuffer & in)
throw Exception("Bad checksums format version: " + DB::toString(format_version), ErrorCodes::UNKNOWN_FORMAT);
if (format_version == 1)
return false;
DB::assertString("\n",in);
DB::assertString("\n", in);
DB::readText(count, in);
DB::assertString(" files:\n", in);