aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2019-09-08 14:10:35 +0100
committerVsevolod Stakhov <vsevolod@highsecure.ru>2019-09-08 14:10:35 +0100
commit76b863e79e39ec5e1c99cee6e4263abe02f6f8d0 (patch)
tree7516b52ef5db7f8455d09faf6fdf60e83cf82c1e
parent0214b14323f8d59aec6a7520ed124116eeca93a7 (diff)
downloadrspamd-76b863e79e39ec5e1c99cee6e4263abe02f6f8d0.tar.gz
rspamd-76b863e79e39ec5e1c99cee6e4263abe02f6f8d0.zip
[Fix] Clickhouse: Fix retention query quoting
Reported by: Javier Angulo
-rw-r--r--src/plugins/lua/clickhouse.lua2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/plugins/lua/clickhouse.lua b/src/plugins/lua/clickhouse.lua
index 5c8eb5d4d..1505b51aa 100644
--- a/src/plugins/lua/clickhouse.lua
+++ b/src/plugins/lua/clickhouse.lua
@@ -841,7 +841,7 @@ end
local function do_remove_partition(ev_base, cfg, table_name, partition_id)
lua_util.debugm(N, rspamd_config, "removing partition %s.%s", table_name, partition_id)
local upstream = settings.upstream:get_upstream_round_robin()
- local remove_partition_sql = "ALTER TABLE ${table_name} ${remove_method} PARTITION ${partition_id}"
+ local remove_partition_sql = "ALTER TABLE ${table_name} ${remove_method} PARTITION '${partition_id}'"
local remove_method = (settings.retention.method == 'drop') and 'DROP' or 'DETACH'
local sql_params = {
['table_name'] = table_name,