aboutsummaryrefslogtreecommitdiffstats
path: root/src/libutil/sqlite_utils.c
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2015-07-10 14:58:56 +0100
committerVsevolod Stakhov <vsevolod@highsecure.ru>2015-07-10 14:58:56 +0100
commitcd47af6d6ce8036f2931e1efa3eacd5fff60cb2e (patch)
treeece83fb6b66361778d8b9c7bf2c53e35adf45170 /src/libutil/sqlite_utils.c
parent32700f14d269267ac9b70a2eb675ba04e4aa154f (diff)
downloadrspamd-cd47af6d6ce8036f2931e1efa3eacd5fff60cb2e.tar.gz
rspamd-cd47af6d6ce8036f2931e1efa3eacd5fff60cb2e.zip
Rework sqlite3 cache.
Diffstat (limited to 'src/libutil/sqlite_utils.c')
-rw-r--r--src/libutil/sqlite_utils.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/libutil/sqlite_utils.c b/src/libutil/sqlite_utils.c
index 37f2ccb8b..5691be132 100644
--- a/src/libutil/sqlite_utils.c
+++ b/src/libutil/sqlite_utils.c
@@ -73,6 +73,7 @@ rspamd_sqlite3_run_prstmt (sqlite3 *db, GArray *stmts,
va_list ap;
sqlite3_stmt *stmt;
gint i, rowid, nargs, j;
+ gint64 len;
struct rspamd_sqlite3_prstmt *nst;
const char *argtypes;
@@ -103,6 +104,16 @@ rspamd_sqlite3_run_prstmt (sqlite3 *db, GArray *stmts,
nargs = 1;
break;
+ case 'V':
+
+ for (j = 0; j < nargs; j ++, rowid ++) {
+ len = va_arg (ap, gint64);
+ sqlite3_bind_text (stmt, rowid, va_arg (ap, const char*), len,
+ SQLITE_STATIC);
+ }
+
+ nargs = 1;
+ break;
case 'I':
for (j = 0; j < nargs; j ++, rowid ++) {