@@ -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);