]> source.dussan.org Git - rspamd.git/commitdiff
[Fix] Fix inserting values to the sources list
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Mon, 27 Jun 2016 12:55:08 +0000 (13:55 +0100)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Mon, 27 Jun 2016 12:55:08 +0000 (13:55 +0100)
src/libserver/fuzzy_backend.c

index ad7f5c4e5129c8c69e06d9c6b6ce3ceaf3aa613f..6f312818af884efa747e8b6af261e0451517f43b 100644 (file)
@@ -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