From f1cda8f6a1f089e028c493725ba88650a472ae88 Mon Sep 17 00:00:00 2001 From: Janos SUTO Date: Mon, 25 Mar 2024 13:37:37 +0100 Subject: [PATCH] Fixes #1356, Reindex fix Signed-off-by: Janos SUTO --- src/message.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/message.c b/src/message.c index 644929d1..01d9d7cc 100644 --- a/src/message.c +++ b/src/message.c @@ -50,7 +50,7 @@ int store_index_data(struct session_data *sdata, struct parser_state *state, str char a[4*MAXBUFSIZE+4*SMALLBUFSIZE]; char *query=NULL; - snprintf(a, sizeof(a)-1, "INSERT INTO %s (id, arrived, sent, size, direction, folder, attachments, attachment_types, sender, rcpt, senderdomain, rcptdomain, subject, body) VALUES (%llu,%ld,%ld,%d,%d,%d,%d,'%s','", cfg->sphxdb, id, sdata->now, sdata->sent, sdata->tot_len, sdata->direction, data->folder, state->n_attachments, sdata->attachments); + snprintf(a, sizeof(a)-1, "REPLACE INTO %s (id, arrived, sent, size, direction, folder, attachments, attachment_types, sender, rcpt, senderdomain, rcptdomain, subject, body) VALUES (%llu,%ld,%ld,%d,%d,%d,%d,'%s','", cfg->sphxdb, id, sdata->now, sdata->sent, sdata->tot_len, sdata->direction, data->folder, state->n_attachments, sdata->attachments); int ret = append_string_to_buffer(&query, a);