Fossil

Check-in [f763b841]
Login

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

Overview
Comment:Fix a bug introduced by recent optimization efforts.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: f763b841982b46ddffc46f3eec9d8b55c9808137
User & Date: drh 2008-03-10 16:46:40
Context
2008-03-11
19:21
Fixed Win32 build breakage check-in: dbb2cee1 user: mjanssen tags: trunk
2008-03-10
16:46
Fix a bug introduced by recent optimization efforts. check-in: f763b841 user: drh tags: trunk
2008-03-08
19:42
Additional speed improvements for clone and rebuild. check-in: 043d63d4 user: drh tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to src/content.c.

439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
  }else{
    /* We are creating a new entry */
    db_prepare(&s1,
      "INSERT INTO blob(rcvid,size,uuid,content)"
      "VALUES(%d,%d,'%b',:data)",
       g.rcvid, size, &hash
    );
    blob_compress(pBlob, &cmpr);
    db_exec(&s1);
    rid = db_last_insert_rowid();
    if( !pBlob ){
      db_multi_exec("INSERT OR IGNORE INTO phantom VALUES(%d)", rid);
    }
  }
  blob_reset(&cmpr);







|







439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
  }else{
    /* We are creating a new entry */
    db_prepare(&s1,
      "INSERT INTO blob(rcvid,size,uuid,content)"
      "VALUES(%d,%d,'%b',:data)",
       g.rcvid, size, &hash
    );
    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);
    }
  }
  blob_reset(&cmpr);