Diff
Not logged in

Differences From:

File src/manifest.c part of check-in [fb358ca492] - Progress toward getting ticketing working. We can enter a new ticket and display it. Cannot yet edit a ticket. by drh on 2007-11-24 19:33:46. Also file src/manifest.c part of check-in [d0305b305a] - Merged mainline into my branch to get the newest application. by aku on 2007-12-05 08:07:46. [view]

To:

File src/manifest.c part of check-in [6af8fdc230] - Generate CGI replies as separate header and body so that the header can be extended during the construction of the body. by drh on 2007-12-04 13:05:35. Also file src/manifest.c part of check-in [7aa9a2e206] - REPLACE into the event table rather than INSERT. by drh on 2008-01-28 18:29:28. [view]

@@ -784,9 +784,9 @@
         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),"
@@ -846,9 +846,9 @@
       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),"
@@ -871,9 +871,9 @@
     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);