From cd47af6d6ce8036f2931e1efa3eacd5fff60cb2e Mon Sep 17 00:00:00 2001 From: Vsevolod Stakhov Date: Fri, 10 Jul 2015 14:58:56 +0100 Subject: Rework sqlite3 cache. --- src/libutil/sqlite_utils.c | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'src/libutil/sqlite_utils.c') 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; @@ -101,6 +102,16 @@ rspamd_sqlite3_run_prstmt (sqlite3 *db, GArray *stmts, SQLITE_STATIC); } + 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': -- cgit v1.2.3