33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
|
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
|
-
+
|
** without error.
**
** Panic if anything goes wrong. If this procedure returns it means
** that everything is OK.
*/
static void verify_rid(int rid){
Blob uuid, hash, content;
if( db_int(0, "SELECT size FROM blob WHERE rid=%d", rid)<0 ){
if( content_size(rid, 0)<0 ){
return; /* No way to verify phantoms */
}
blob_zero(&uuid);
db_blob(&uuid, "SELECT uuid FROM blob WHERE rid=%d", rid);
if( blob_size(&uuid)!=UUID_SIZE ){
fossil_panic("not a valid rid: %d", rid);
}
|