Check-in [7aa9a2e206]
Not logged in
Overview

SHA1 Hash:7aa9a2e206454f9d4e4f71660ef0b2c03ec2300c
Date: 2008-01-28 18:29:28
User: drh
Comment:REPLACE into the event table rather than INSERT.
Timelines: ancestors | descendants | both | trunk
Other Links: files | ZIP archive | manifest

Tags And Properties
Changes
[hide diffs]

Modified src/manifest.c from [9573b5d563] to [53c15e41ed].

@@ -783,11 +783,11 @@
         int cid = db_column_int(&q, 0);
         add_mlink(rid, &m, cid, 0);
       }
       db_finalize(&q);
       db_multi_exec(
-        "INSERT INTO event(type,mtime,objid,user,comment,"
+        "REPLACE INTO event(type,mtime,objid,user,comment,"
         "                  bgcolor,brbgcolor,euser,ecomment)"
         "VALUES('ci',%.17g,%d,%Q,%Q,"
         " (SELECT value FROM tagxref WHERE tagid=%d AND rid=%d AND tagtype=1),"
         "(SELECT value FROM tagxref WHERE tagid=%d AND rid=%d AND tagtype!=1),"
         "  (SELECT value FROM tagxref WHERE tagid=%d AND rid=%d),"
@@ -845,11 +845,11 @@
     if( prior ){
       content_deltify(prior, rid, 0);
     }
     zComment = mprintf("Changes to wiki page [%h]", m.zWikiTitle);
     db_multi_exec(
-      "INSERT INTO event(type,mtime,objid,user,comment,"
+      "REPLACE INTO event(type,mtime,objid,user,comment,"
       "                  bgcolor,brbgcolor,euser,ecomment)"
       "VALUES('w',%.17g,%d,%Q,%Q,"
       " (SELECT value FROM tagxref WHERE tagid=%d AND rid=%d AND tagtype=1),"
       "(SELECT value FROM tagxref WHERE tagid=%d AND rid=%d AND tagtype!=1),"
       "  (SELECT value FROM tagxref WHERE tagid=%d AND rid=%d),"
@@ -870,15 +870,15 @@
     zTag = mprintf("tkt-%s", m.zTicketUuid);
     tag_insert(zTag, 1, 0, rid, m.rDate, rid);
     free(zTag);
     zComment = mprintf("Changes to ticket [%.10s]", m.zTicketUuid);
     db_multi_exec(
-      "INSERT INTO event(type,mtime,objid,user,comment)"
+      "REPLACE INTO event(type,mtime,objid,user,comment)"
       "VALUES('t',%.17g,%d,%Q,%Q)",
       m.rDate, rid, m.zUser, zComment
     );
     free(zComment);
   }
   db_end_transaction(0);
   manifest_clear(&m);
   return 1;
 }