Fossil

Check-in [88f2715f]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:On the test-integrity command, make a blob size mismatch a warning, not a fatal error.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1:88f2715f360873357b89bbe9cbc89848ee26b086
User & Date: drh 2010-12-23 21:54:30
Context
2010-12-23
22:12
Documentation update: Back out the claim that Git uses multiple DAGs because I now believe that claim is incorrect. check-in: 24c33b00 user: drh tags: trunk
21:54
On the test-integrity command, make a blob size mismatch a warning, not a fatal error. check-in: 88f2715f user: drh tags: trunk
18:26
Add a progress indicator for test-integrity. check-in: 4ba6a2c9 user: drh tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to src/content.c.

775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
    fflush(stdout);
    if( size<0 ){
      printf("skip phantom %d %s\n", rid, zUuid);
      continue;  /* Ignore phantoms */
    }
    content_get(rid, &content);
    if( blob_size(&content)!=size ){
      fossil_fatal("size mismatch on blob rid=%d:  %d vs %d",
                   rid, blob_size(&content), size);
    }
    sha1sum_blob(&content, &cksum);
    if( strcmp(blob_str(&cksum), zUuid)!=0 ){
      fossil_fatal("checksum mismatch on blob rid=%d: %s vs %s",
                   rid, blob_str(&cksum), zUuid);
    }
    blob_reset(&cksum);
    blob_reset(&content);
    n2++;
  }
  db_finalize(&q);
  printf("%d non-phantom blobs (out of %d total) verified\n", n2, n1);
}







|
|













775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
    fflush(stdout);
    if( size<0 ){
      printf("skip phantom %d %s\n", rid, zUuid);
      continue;  /* Ignore phantoms */
    }
    content_get(rid, &content);
    if( blob_size(&content)!=size ){
      fossil_warning("size mismatch on blob rid=%d:  %d vs %d",
                     rid, blob_size(&content), size);
    }
    sha1sum_blob(&content, &cksum);
    if( strcmp(blob_str(&cksum), zUuid)!=0 ){
      fossil_fatal("checksum mismatch on blob rid=%d: %s vs %s",
                   rid, blob_str(&cksum), zUuid);
    }
    blob_reset(&cksum);
    blob_reset(&content);
    n2++;
  }
  db_finalize(&q);
  printf("%d non-phantom blobs (out of %d total) verified\n", n2, n1);
}