From: Vsevolod Stakhov Date: Fri, 19 Dec 2014 16:58:55 +0000 (+0000) Subject: Add simple insertion statement. X-Git-Tag: 0.8.0~62 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=564a3f5456476587abc3b52c0952f4443d7de3b5;p=rspamd.git Add simple insertion statement. --- diff --git a/src/libserver/fuzzy_backend.c b/src/libserver/fuzzy_backend.c index 2d33c4b92..e170a61a9 100644 --- a/src/libserver/fuzzy_backend.c +++ b/src/libserver/fuzzy_backend.c @@ -69,7 +69,8 @@ static struct rspamd_fuzzy_stmts { "id INTEGER PRIMARY KEY," "flag INTEGER NOT NULL," "digest TEXT NOT NULL," - "value INTEGER);" + "value INTEGER," + "time INTEGER);" "" "CREATE TABLE shingles(" "value INTEGER NOT NULL," @@ -106,8 +107,9 @@ static struct rspamd_fuzzy_stmts { }, { .idx = RSPAMD_FUZZY_BACKEND_INSERT, - .sql = "", - .args = "", + .sql = "INSERT INTO digests(flag, digest, value, time) VALUES" + "(?1, ?2, ?3, ?4)", + .args = "ITII", .stmt = NULL }, {