Bert and I were just discussing the checksums in PRISTINE. We think its
primary key should be SHA-1 always. A secondary index can be built on
the MD5 column if required.
Can we patch the docco like this?
[[[
* subversion/libsvn_wc/wc-metadata.sql
(PRISTINE): Define "checksum" as always being SHA-1.
Document the uniqueness properties of both checksum fields.
Document when "md5_checksum" can be null.
]]]
[[[
Index: subversion/libsvn_wc/wc-metadata.sql
===================================================================
--- subversion/libsvn_wc/wc-metadata.sql (revision 911752)
+++ subversion/libsvn_wc/wc-metadata.sql (working copy)
@@ -172,7 +172,9 @@
and ACTUAL_NODE tables.
*/
CREATE TABLE PRISTINE (
- /* ### the hash algorithm (MD5 or SHA-1) is encoded in this value */
+ /* The SHA-1 checksum of the pristine text. This is a unique key. The
+ SHA-1 checksum of a pristine text is assumed to be unique among all
+ pristine texts referenced from this database. */
checksum TEXT NOT NULL PRIMARY KEY,
/* ### enumerated values specifying type of compression. NULL implies
@@ -189,7 +191,8 @@
refcount INTEGER NOT NULL,
/* Alternative MD5 checksum used for communicating with older
- repositories. */
+ repositories. Not guaranteed to be unique among table rows.
+ NULL if not (yet) calculated. */
md5_checksum TEXT
);
]]]
- Julian
Received on 2010-02-19 10:35:03 CET