Fix a bug in signature loading for sub-file incrementals.
authorMichael Vrable <mvrable@cs.ucsd.edu>
Sat, 31 May 2008 00:22:08 +0000 (17:22 -0700)
committerMichael Vrable <mvrable@turin.ucsd.edu>
Sat, 31 May 2008 00:22:08 +0000 (17:22 -0700)
Signatures for sub-file chunks were being written properly, but were not
being loaded properly (signature data and the algorithm string were
being swapped), so no sub-file incrementals were being generated.

localdb.cc

index ecf83aa..2f5af6e 100644 (file)
@@ -535,7 +535,7 @@ bool LocalDb::LoadChunkSignatures(ObjectReference ref,
     sqlite3_stmt *stmt;
     int found = false;
 
-    stmt = Prepare("select algorithm, signatures from subblock_signatures "
+    stmt = Prepare("select signatures, algorithm from subblock_signatures "
                    "where blockid = (select blockid from block_index "
                    "                 where segmentid = ? and object = ?)");
     sqlite3_bind_int64(stmt, 1, SegmentToId(ref.get_segment()));