summaryrefslogtreecommitdiffstats
path: root/src/libstat
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2016-01-11 14:54:33 +0000
committerVsevolod Stakhov <vsevolod@highsecure.ru>2016-01-11 14:54:33 +0000
commit48012e1b39ce064553a4112afa5679b4894b79ad (patch)
tree14ae81c971a1547ea10c8b09cf4ef79734d0b672 /src/libstat
parent942615ae25310a4aacf32530ae6aee76655f1970 (diff)
downloadrspamd-48012e1b39ce064553a4112afa5679b4894b79ad.tar.gz
rspamd-48012e1b39ce064553a4112afa5679b4894b79ad.zip
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.
Diffstat (limited to 'src/libstat')
-rw-r--r--src/libstat/backends/sqlite3_backend.c2
1 files changed, 1 insertions, 1 deletions
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",