Fossil

Check-in [25e80d2e]
Login

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

Overview
Comment:When adding a new artifact from a delta, read the delta header in order to insert the correct size into the blob table.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1:25e80d2e6efa8a713291bb29771cf19cdb88bd7e
User & Date: drh 2010-12-24 00:27:32
Context
2010-12-24
00:50
Tweaks to the mingw makefile as suggested by Ross on the mailing list. check-in: a300bee1 user: drh tags: trunk
00:27
When adding a new artifact from a delta, read the delta header in order to insert the correct size into the blob table. check-in: 25e80d2e user: drh tags: trunk
2010-12-23
22:12
Documentation update: Back out the claim that Git uses multiple DAGs because I now believe that claim is incorrect. check-in: 24c33b00 user: drh tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to src/content.c.

449
450
451
452
453
454
455



456




457
458
459
460
461
462
463
  if( zUuid==0 ){
    assert( pBlob!=0 );
    assert( nBlob==0 );
    sha1sum_blob(pBlob, &hash);
  }else{
    blob_init(&hash, zUuid, -1);
  }



  size = nBlob ? nBlob : blob_size(pBlob);




  db_begin_transaction();

  /* Check to see if the entry already exists and if it does whether
  ** or not the entry is a phantom
  */
  db_prepare(&s1, "SELECT rid, size FROM blob WHERE uuid=%B", &hash);
  if( db_step(&s1)==SQLITE_ROW ){







>
>
>
|
>
>
>
>







449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
  if( zUuid==0 ){
    assert( pBlob!=0 );
    assert( nBlob==0 );
    sha1sum_blob(pBlob, &hash);
  }else{
    blob_init(&hash, zUuid, -1);
  }
  if( nBlob ){
    size = nBlob;
  }else{
    size = blob_size(pBlob);
    if( srcId ){
      size = delta_output_size(blob_buffer(pBlob), size);
    }
  }
  db_begin_transaction();

  /* Check to see if the entry already exists and if it does whether
  ** or not the entry is a phantom
  */
  db_prepare(&s1, "SELECT rid, size FROM blob WHERE uuid=%B", &hash);
  if( db_step(&s1)==SQLITE_ROW ){