Diff
Not logged in

Differences From:

File src/content.c part of check-in [71ed18cc4b] - Do not attempt to verify phantoms. Set the default max message size at 500K instead of 1MB. Updates to the todo list. by drh on 2007-08-01 02:03:31. [view]

To:

File src/content.c part of check-in [73bddaebb9] - The delta compress on xfer is working better now, but still needs work. by drh on 2007-08-09 17:42:59. [view]

@@ -197,8 +197,9 @@
     );
     blob_compress(pBlob, &cmpr);
     db_bind_blob(&s1, ":data", &cmpr);
     db_exec(&s1);
+    db_multi_exec("DELETE FROM phantom WHERE rid=%d", rid);
   }else{
     /* We are creating a new entry */
     db_prepare(&s1,
       "INSERT INTO blob(rcvid,size,uuid,content)"
@@ -210,8 +211,11 @@
       db_bind_blob(&s1, ":data", &cmpr);
     }
     db_exec(&s1);
     rid = db_last_insert_rowid();
+    if( !pBlob ){
+      db_multi_exec("INSERT OR IGNORE INTO phantom VALUES(%d)", rid);
+    }
   }
 
 
   /* Finish the transaction and cleanup */