From 7b153c407bde87583349afb494669adf1adca222 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ren=C3=A9=20Canna=C3=B2?= Date: Thu, 14 Sep 2017 01:10:59 +0200 Subject: [PATCH] Bugfixes for ClickHouse, unitialized variables --- lib/ClickHouse_Server.cpp | 4 ++-- lib/ProxySQL_Admin.cpp | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/lib/ClickHouse_Server.cpp b/lib/ClickHouse_Server.cpp index 40096c2e8..ab63741b8 100644 --- a/lib/ClickHouse_Server.cpp +++ b/lib/ClickHouse_Server.cpp @@ -1941,8 +1941,8 @@ bool ClickHouse_Session::init() { bool ret=false; char *hostname = NULL; char *port = NULL; - hostname = GloClickHouseServer->get_variable(hostname); - port = GloClickHouseServer->get_variable(port); + hostname = GloClickHouseServer->get_variable("hostname"); + port = GloClickHouseServer->get_variable("port"); try { co.SetHost(hostname); co.SetPort(atoi(port)); diff --git a/lib/ProxySQL_Admin.cpp b/lib/ProxySQL_Admin.cpp index 0397ab306..912bcb4a7 100644 --- a/lib/ProxySQL_Admin.cpp +++ b/lib/ProxySQL_Admin.cpp @@ -3425,15 +3425,15 @@ bool ProxySQL_Admin::init() { #ifdef PROXYSQLCLICKHOUSE void ProxySQL_Admin::init_clickhouse_variables() { -// flush_clickhouse_variables___runtime_to_database(configdb, false, false, false); -// flush_clickhouse_variables___runtime_to_database(admindb, false, true, false); + flush_clickhouse_variables___runtime_to_database(configdb, false, false, false); + flush_clickhouse_variables___runtime_to_database(admindb, false, true, false); flush_clickhouse_variables___database_to_runtime(admindb,true); } #endif /* CLICKHOUSE */ void ProxySQL_Admin::init_sqliteserver_variables() { -// flush_sqliteserver_variables___runtime_to_database(configdb, false, false, false); -// flush_sqliteserver_variables___runtime_to_database(admindb, false, true, false); + flush_sqliteserver_variables___runtime_to_database(configdb, false, false, false); + flush_sqliteserver_variables___runtime_to_database(admindb, false, true, false); flush_sqliteserver_variables___database_to_runtime(admindb,true); }