/ Check-in [34212aa8]
Login
SQLite training in Houston TX on 2019-11-05 (details)
Part of the 2019 Tcl Conference

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

Overview
Comment:Another fix to the hash signature algorithm in vfslog.c.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 34212aa8c405c4ff3f8045ec0cf2a860af61540f
User & Date: drh 2013-10-10 13:41:04
Context
2013-10-10
15:04
Enhancements to the vfslog.c module to show all change-counter changes and to show the hostname and pid of the process that creates each log file. check-in: af7abebe user: drh tags: trunk
13:41
Another fix to the hash signature algorithm in vfslog.c. check-in: 34212aa8 user: drh tags: trunk
13:38
Fix the hash signature algorithm in vfslog.c. Add a utility program to show the hash signatures for every page of a database file. check-in: eaf4de13 user: drh tags: trunk
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to ext/misc/vfslog.c.

   323    323       pI = (unsigned int*)p;
   324    324       for(i=0; i<n-7; i+=8){
   325    325         s0 += pI[0] + s1;
   326    326         s1 += pI[1] + s0;
   327    327         pI += 2;
   328    328       }
   329    329       for(i=0; i<8; i++) sqlite3_snprintf(3, zCksum+i*2, "%02x", p[i]);
   330         -    sqlite3_snprintf(18, zCksum+i*2, "-%08x08x", s0, s1);
          330  +    sqlite3_snprintf(18, zCksum+i*2, "-%08x%08x", s0, s1);
   331    331     }
   332    332   }
   333    333   
   334    334   /*
   335    335   ** Read data from an vlog-file.
   336    336   */
   337    337   static int vlogRead(

Changes to tool/pagesig.c.

    38     38       pI = (unsigned int*)p;
    39     39       for(i=0; i<n-7; i+=8){
    40     40         s0 += pI[0] + s1;
    41     41         s1 += pI[1] + s0;
    42     42         pI += 2;
    43     43       }
    44     44       for(i=0; i<8; i++) sprintf(zCksum+i*2, "%02x", p[i]);
    45         -    sprintf(zCksum+i*2, "-%08x08x", s0, s1);
           45  +    sprintf(zCksum+i*2, "-%08x%08x", s0, s1);
    46     46     }
    47     47   }
    48     48   
    49     49   /*
    50     50   ** Open a file.  Find its page size.  Read each page, and compute and
    51     51   ** display the page signature.
    52     52   */