From: Vsevolod Stakhov Date: Mon, 11 Jan 2016 14:54:33 +0000 (+0000) Subject: Incompatible change: sqlite3 and per_user behaviour X-Git-Tag: 1.1.0~68 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=48012e1b39ce064553a4112afa5679b4894b79ad;p=rspamd.git Incompatible change: sqlite3 and per_user behaviour Now both redis and sqlite3 follows the common principles for per-user statistics: 1) If per-user statistics is enabled check per-user tokens ONLY 2) If per-user statistics is not enabled then check common tokens ONLY If you need old behaviour, then you'd need to use separate classifier for per-user statistics. --- diff --git a/src/libstat/backends/sqlite3_backend.c b/src/libstat/backends/sqlite3_backend.c index ab1d24a71..7000226e2 100644 --- a/src/libstat/backends/sqlite3_backend.c +++ b/src/libstat/backends/sqlite3_backend.c @@ -160,7 +160,7 @@ static struct rspamd_sqlite3_prstmt prepared_stmts[RSPAMD_STAT_BACKEND_MAX] = .sql = "SELECT value FROM tokens " "LEFT JOIN languages ON tokens.language=languages.id " "LEFT JOIN users ON tokens.user=users.id " - "WHERE token=?1 AND (users.id=?2 OR users.id=0) " + "WHERE token=?1 AND (users.id=?2) " "AND (languages.id=?3 OR languages.id=0);", .stmt = NULL, .args = "III",