From: Vsevolod Stakhov Date: Mon, 27 Jun 2016 12:55:08 +0000 (+0100) Subject: [Fix] Fix inserting values to the sources list X-Git-Tag: 1.3.0~243 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=92eb411cf4c7e2fab21039d0e43b93e66a789842;p=thirdparty%2Frspamd.git [Fix] Fix inserting values to the sources list --- diff --git a/src/libserver/fuzzy_backend.c b/src/libserver/fuzzy_backend.c index ad7f5c4e51..6f312818af 100644 --- a/src/libserver/fuzzy_backend.c +++ b/src/libserver/fuzzy_backend.c @@ -235,7 +235,7 @@ static struct rspamd_fuzzy_stmts { }, { .idx = RSPAMD_FUZZY_BACKEND_SET_VERSION, - .sql = "UPDATE sources SET version=?1, last=?2 WHERE name=?3;", + .sql = "INSERT OR REPLACE INTO sources (name, version, last) VALUES (?3, ?1, ?2);", .args = "IIT", .stmt = NULL, .result = SQLITE_DONE