]> git.ipfire.org Git - thirdparty/rspamd.git/commitdiff
Quote strings in pragmas.
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Thu, 9 Jul 2015 23:36:34 +0000 (00:36 +0100)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Thu, 9 Jul 2015 23:36:34 +0000 (00:36 +0100)
src/libserver/fuzzy_backend.c
src/libstat/learn_cache/sqlite3_cache.c

index 24a9b2412b170eb67cfc85e123b21a2a8ec59872..7cd4faa91cacc6f08873aa31c1211839f49c6792 100644 (file)
@@ -468,8 +468,8 @@ rspamd_fuzzy_backend_open (const gchar *path, GError **err)
        gchar *dir, header[4];
        gint fd, r;
        struct rspamd_fuzzy_backend *res;
-       static const char sqlite_wal[] = "PRAGMA journal_mode=WAL;",
-                       fallback_journal[] = "PRAGMA journal_mode=OFF;";
+       static const char sqlite_wal[] = "PRAGMA journal_mode=\"wal\";",
+                       fallback_journal[] = "PRAGMA journal_mode=\"off\";";
        int rc;
 
        /* First of all we check path for existence */
index a9e74edbbde0322e6a4a3a07d2ecd50059afc402..0cfea0a8304a8fb30d7805ffa137b03e79e95cd9 100644 (file)
@@ -54,8 +54,8 @@ rspamd_stat_cache_sqlite3_init(struct rspamd_stat_ctx *ctx,
        struct rspamd_stat_sqlite3_ctx *new = NULL;
        struct rspamd_classifier_config *clf;
        const ucl_object_t *obj, *elt;
-       static const char sqlite_wal[] = "PRAGMA journal_mode=WAL;",
-                       fallback_journal[] = "PRAGMA journal_mode=OFF;";
+       static const char sqlite_wal[] = "PRAGMA journal_mode=\"wal\";",
+                       fallback_journal[] = "PRAGMA journal_mode=\"off\";";
        GList *cur;
        gchar dbpath[PATH_MAX];
        sqlite3 *sqlite;