Fixed verification query

This commit is contained in:
Dan Stahr
2017-08-12 19:14:11 +01:00
parent a0d63bf003
commit 8a116fbf8d
@@ -789,7 +789,7 @@ ON
if (itemswithnoblocklisthash != 0)
throw new InvalidDataException(string.Format("Found {0} file(s) with missing blocklist hashes", itemswithnoblocklisthash));
if (cmd.ExecuteScalarInt64(@"SELECT COUNT(*) FROM ""Blockset"" WHERE ""Length"" != 0 AND ""ID"" NOT IN (SELECT ""BlocksetId"" FROM ""BlocksetEntry"")") != 0)
if (cmd.ExecuteScalarInt64(@"SELECT COUNT(*) FROM ""Blockset"" WHERE ""Length"" > 0 AND ""ID"" NOT IN (SELECT ""BlocksetId"" FROM ""BlocksetEntry"")") != 0)
{
throw new Exception("Detected non-empty blocksets with no associated blocks!");
}