mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-21 23:21:59 +00:00
Allow force disable libs: poco netssl poco mongodb, poco data odbc
This commit is contained in:
parent
f553d1dfcc
commit
fb911f7cfa
@ -7,4 +7,5 @@ BUILD_METHOD=normal
|
|||||||
BUILD_TARGETS=clickhouse
|
BUILD_TARGETS=clickhouse
|
||||||
BUILD_TYPE=Debug
|
BUILD_TYPE=Debug
|
||||||
ENABLE_EMBEDDED_COMPILER=0
|
ENABLE_EMBEDDED_COMPILER=0
|
||||||
CMAKE_FLAGS="-D CMAKE_C_FLAGS_ADD=-g0 -D CMAKE_CXX_FLAGS_ADD=-g0 -D ENABLE_TCMALLOC=0 -D ENABLE_CAPNP=0 -D ENABLE_RDKAFKA=0 -D ENABLE_UNWIND=0 -D ENABLE_ICU=0 -D DISABLE_POCO_SSL=1 -D OPENSSL_FOUND=0 -D ENABLE_NETSSL=0 -D ENABLE_CRYPTO=0 -D Poco_NetSSL_FOUND=0 -D ENABLE_MONGODB=0 -D ENABLE_MYSQL=0 -D ENABLE_DATA_ODBC=0"
|
CMAKE_FLAGS="-D CMAKE_C_FLAGS_ADD=-g0 -D CMAKE_CXX_FLAGS_ADD=-g0 -D ENABLE_TCMALLOC=0 -D ENABLE_CAPNP=0 -D ENABLE_RDKAFKA=0 -D ENABLE_UNWIND=0 -D ENABLE_ICU=0"
|
||||||
|
CMAKE_FLAGS+=" -D ENABLE_POCO_MONGODB=0 -D ENABLE_POCO_NETSSL=0 -D ENABLE_MYSQL=0 -D ENABLE_POCO_ODBC=0"
|
||||||
|
@ -8,8 +8,21 @@ if (NOT EXISTS "${ClickHouse_SOURCE_DIR}/contrib/poco/CMakeLists.txt")
|
|||||||
set (MISSING_INTERNAL_POCO_LIBRARY 1)
|
set (MISSING_INTERNAL_POCO_LIBRARY 1)
|
||||||
endif ()
|
endif ()
|
||||||
|
|
||||||
|
set (POCO_COMPONENTS Net XML SQL Data)
|
||||||
|
if (NOT DEFINED ENABLE_POCO_NETSSL OR ENABLE_POCO_NETSSL)
|
||||||
|
list (APPEND POCO_COMPONENTS Crypto NetSSL)
|
||||||
|
endif ()
|
||||||
|
if (NOT DEFINED ENABLE_POCO_MONGODB OR ENABLE_POCO_MONGODB)
|
||||||
|
list (APPEND POCO_COMPONENTS MongoDB)
|
||||||
|
endif ()
|
||||||
|
# TODO: after new poco release with SQL library rename ENABLE_POCO_ODBC -> ENABLE_POCO_SQLODBC
|
||||||
|
if (NOT DEFINED ENABLE_POCO_ODBC OR ENABLE_POCO_ODBC)
|
||||||
|
list (APPEND POCO_COMPONENTS DataODBC)
|
||||||
|
#list (APPEND POCO_COMPONENTS SQLODBC) # future
|
||||||
|
endif ()
|
||||||
|
|
||||||
if (NOT USE_INTERNAL_POCO_LIBRARY)
|
if (NOT USE_INTERNAL_POCO_LIBRARY)
|
||||||
find_package (Poco COMPONENTS Net NetSSL XML SQL Data Crypto DataODBC MongoDB)
|
find_package (Poco COMPONENTS ${POCO_COMPONENTS})
|
||||||
endif ()
|
endif ()
|
||||||
|
|
||||||
if (Poco_INCLUDE_DIRS AND Poco_Foundation_LIBRARY)
|
if (Poco_INCLUDE_DIRS AND Poco_Foundation_LIBRARY)
|
||||||
@ -46,13 +59,12 @@ elseif (NOT MISSING_INTERNAL_POCO_LIBRARY)
|
|||||||
"${ClickHouse_SOURCE_DIR}/contrib/poco/Util/include/"
|
"${ClickHouse_SOURCE_DIR}/contrib/poco/Util/include/"
|
||||||
)
|
)
|
||||||
|
|
||||||
if (NOT DEFINED POCO_ENABLE_MONGODB OR POCO_ENABLE_MONGODB)
|
if (NOT DEFINED ENABLE_POCO_MONGODB OR ENABLE_POCO_MONGODB)
|
||||||
set (Poco_MongoDB_FOUND 1)
|
set (USE_POCO_MONGODB 1)
|
||||||
set (Poco_MongoDB_LIBRARY PocoMongoDB)
|
set (Poco_MongoDB_LIBRARY PocoMongoDB)
|
||||||
set (Poco_MongoDB_INCLUDE_DIRS "${ClickHouse_SOURCE_DIR}/contrib/poco/MongoDB/include/")
|
set (Poco_MongoDB_INCLUDE_DIRS "${ClickHouse_SOURCE_DIR}/contrib/poco/MongoDB/include/")
|
||||||
endif ()
|
endif ()
|
||||||
|
|
||||||
|
|
||||||
if (EXISTS "${ClickHouse_SOURCE_DIR}/contrib/poco/SQL/ODBC/include/")
|
if (EXISTS "${ClickHouse_SOURCE_DIR}/contrib/poco/SQL/ODBC/include/")
|
||||||
set (Poco_SQL_FOUND 1)
|
set (Poco_SQL_FOUND 1)
|
||||||
set (Poco_SQL_LIBRARY PocoSQL)
|
set (Poco_SQL_LIBRARY PocoSQL)
|
||||||
@ -60,8 +72,8 @@ elseif (NOT MISSING_INTERNAL_POCO_LIBRARY)
|
|||||||
"${ClickHouse_SOURCE_DIR}/contrib/poco/SQL/include"
|
"${ClickHouse_SOURCE_DIR}/contrib/poco/SQL/include"
|
||||||
"${ClickHouse_SOURCE_DIR}/contrib/poco/Data/include"
|
"${ClickHouse_SOURCE_DIR}/contrib/poco/Data/include"
|
||||||
)
|
)
|
||||||
if (ODBC_FOUND)
|
if ((NOT DEFINED ENABLE_POCO_ODBC OR ENABLE_POCO_ODBC) AND ODBC_FOUND)
|
||||||
set (Poco_SQLODBC_FOUND 1)
|
set (USE_POCO_SQLODBC 1)
|
||||||
set (Poco_SQLODBC_INCLUDE_DIRS
|
set (Poco_SQLODBC_INCLUDE_DIRS
|
||||||
"${ClickHouse_SOURCE_DIR}/contrib/poco/SQL/ODBC/include/"
|
"${ClickHouse_SOURCE_DIR}/contrib/poco/SQL/ODBC/include/"
|
||||||
"${ClickHouse_SOURCE_DIR}/contrib/poco/Data/ODBC/include/"
|
"${ClickHouse_SOURCE_DIR}/contrib/poco/Data/ODBC/include/"
|
||||||
@ -73,8 +85,8 @@ elseif (NOT MISSING_INTERNAL_POCO_LIBRARY)
|
|||||||
set (Poco_Data_FOUND 1)
|
set (Poco_Data_FOUND 1)
|
||||||
set (Poco_Data_INCLUDE_DIRS "${ClickHouse_SOURCE_DIR}/contrib/poco/Data/include")
|
set (Poco_Data_INCLUDE_DIRS "${ClickHouse_SOURCE_DIR}/contrib/poco/Data/include")
|
||||||
set (Poco_Data_LIBRARY PocoData)
|
set (Poco_Data_LIBRARY PocoData)
|
||||||
if (ODBC_FOUND)
|
if ((NOT DEFINED ENABLE_POCO_ODBC OR ENABLE_POCO_ODBC) AND ODBC_FOUND)
|
||||||
set (Poco_DataODBC_FOUND 1)
|
set (USE_POCO_DATAODBC 1)
|
||||||
set (Poco_DataODBC_INCLUDE_DIRS
|
set (Poco_DataODBC_INCLUDE_DIRS
|
||||||
"${ClickHouse_SOURCE_DIR}/contrib/poco/Data/ODBC/include/"
|
"${ClickHouse_SOURCE_DIR}/contrib/poco/Data/ODBC/include/"
|
||||||
${ODBC_INCLUDE_DIRECTORIES}
|
${ODBC_INCLUDE_DIRECTORIES}
|
||||||
@ -84,8 +96,8 @@ elseif (NOT MISSING_INTERNAL_POCO_LIBRARY)
|
|||||||
endif ()
|
endif ()
|
||||||
|
|
||||||
# TODO! fix internal ssl
|
# TODO! fix internal ssl
|
||||||
if (OPENSSL_FOUND AND NOT USE_INTERNAL_SSL_LIBRARY AND NOT DISABLE_POCO_SSL)
|
if (OPENSSL_FOUND AND NOT USE_INTERNAL_SSL_LIBRARY AND (NOT DEFINED ENABLE_POCO_NETSSL OR ENABLE_POCO_NETSSL))
|
||||||
set (Poco_NetSSL_FOUND 1)
|
set (USE_POCO_NETSSL 1)
|
||||||
set (Poco_NetSSL_LIBRARY PocoNetSSL)
|
set (Poco_NetSSL_LIBRARY PocoNetSSL)
|
||||||
set (Poco_Crypto_LIBRARY PocoCrypto)
|
set (Poco_Crypto_LIBRARY PocoCrypto)
|
||||||
endif ()
|
endif ()
|
||||||
@ -103,7 +115,7 @@ elseif (NOT MISSING_INTERNAL_POCO_LIBRARY)
|
|||||||
set (Poco_XML_LIBRARY PocoXML)
|
set (Poco_XML_LIBRARY PocoXML)
|
||||||
endif ()
|
endif ()
|
||||||
|
|
||||||
message(STATUS "Using Poco: ${Poco_INCLUDE_DIRS} : ${Poco_Foundation_LIBRARY},${Poco_Util_LIBRARY},${Poco_Net_LIBRARY},${Poco_NetSSL_LIBRARY},${Poco_XML_LIBRARY},${Poco_Data_LIBRARY},${Poco_DataODBC_LIBRARY},${Poco_MongoDB_LIBRARY}; MongoDB=${Poco_MongoDB_FOUND}, DataODBC=${Poco_DataODBC_FOUND}, NetSSL=${Poco_NetSSL_FOUND}")
|
message(STATUS "Using Poco: ${Poco_INCLUDE_DIRS} : ${Poco_Foundation_LIBRARY},${Poco_Util_LIBRARY},${Poco_Net_LIBRARY},${Poco_NetSSL_LIBRARY},${Poco_XML_LIBRARY},${Poco_Data_LIBRARY},${Poco_DataODBC_LIBRARY},${Poco_MongoDB_LIBRARY}; MongoDB=${USE_POCO_MONGODB}, DataODBC=${Poco_DataODBC_FOUND}, NetSSL=${USE_POCO_NETSSL}")
|
||||||
|
|
||||||
# How to make sutable poco:
|
# How to make sutable poco:
|
||||||
# use branch:
|
# use branch:
|
||||||
|
8
contrib/CMakeLists.txt
vendored
8
contrib/CMakeLists.txt
vendored
@ -128,7 +128,7 @@ if (USE_INTERNAL_POCO_LIBRARY)
|
|||||||
set (_save ${ENABLE_TESTS})
|
set (_save ${ENABLE_TESTS})
|
||||||
set (ENABLE_TESTS 0)
|
set (ENABLE_TESTS 0)
|
||||||
set (CMAKE_DISABLE_FIND_PACKAGE_ZLIB 1)
|
set (CMAKE_DISABLE_FIND_PACKAGE_ZLIB 1)
|
||||||
if (USE_INTERNAL_SSL_LIBRARY OR DISABLE_POCO_SSL)
|
if (USE_INTERNAL_SSL_LIBRARY OR (DEFINED ENABLE_POCO_NETSSL AND NOT ENABLE_POCO_NETSSL))
|
||||||
set (DISABLE_INTERNAL_OPENSSL 1 CACHE INTERNAL "")
|
set (DISABLE_INTERNAL_OPENSSL 1 CACHE INTERNAL "")
|
||||||
set (ENABLE_NETSSL 0 CACHE INTERNAL "") # TODO!
|
set (ENABLE_NETSSL 0 CACHE INTERNAL "") # TODO!
|
||||||
set (ENABLE_CRYPTO 0 CACHE INTERNAL "") # TODO!
|
set (ENABLE_CRYPTO 0 CACHE INTERNAL "") # TODO!
|
||||||
@ -142,14 +142,10 @@ if (USE_INTERNAL_POCO_LIBRARY)
|
|||||||
set (CMAKE_CXX_FLAGS ${save_CMAKE_CXX_FLAGS})
|
set (CMAKE_CXX_FLAGS ${save_CMAKE_CXX_FLAGS})
|
||||||
set (CMAKE_C_FLAGS ${save_CMAKE_C_FLAGS})
|
set (CMAKE_C_FLAGS ${save_CMAKE_C_FLAGS})
|
||||||
|
|
||||||
if (DISABLE_POCO_SSL)
|
if (OPENSSL_FOUND AND TARGET Crypto AND (NOT DEFINED ENABLE_POCO_NETSSL OR ENABLE_POCO_NETSSL))
|
||||||
set (Poco_NetSSL_FOUND 0)
|
|
||||||
else()
|
|
||||||
if (OPENSSL_FOUND AND TARGET Crypto)
|
|
||||||
# Bug in poco https://github.com/pocoproject/poco/pull/2100 found on macos
|
# Bug in poco https://github.com/pocoproject/poco/pull/2100 found on macos
|
||||||
target_include_directories(Crypto PUBLIC ${OPENSSL_INCLUDE_DIR})
|
target_include_directories(Crypto PUBLIC ${OPENSSL_INCLUDE_DIR})
|
||||||
endif ()
|
endif ()
|
||||||
endif ()
|
|
||||||
endif ()
|
endif ()
|
||||||
|
|
||||||
if (USE_INTERNAL_LLVM_LIBRARY)
|
if (USE_INTERNAL_LLVM_LIBRARY)
|
||||||
|
@ -170,7 +170,7 @@ if (NOT USE_INTERNAL_BOOST_LIBRARY)
|
|||||||
target_include_directories (clickhouse_common_io BEFORE PUBLIC ${Boost_INCLUDE_DIRS})
|
target_include_directories (clickhouse_common_io BEFORE PUBLIC ${Boost_INCLUDE_DIRS})
|
||||||
endif ()
|
endif ()
|
||||||
|
|
||||||
if (Poco_SQLODBC_FOUND)
|
if (USE_POCO_SQLODBC)
|
||||||
target_link_libraries (clickhouse_common_io ${Poco_SQL_LIBRARY})
|
target_link_libraries (clickhouse_common_io ${Poco_SQL_LIBRARY})
|
||||||
target_link_libraries (dbms ${Poco_SQLODBC_LIBRARY} ${Poco_SQL_LIBRARY})
|
target_link_libraries (dbms ${Poco_SQLODBC_LIBRARY} ${Poco_SQL_LIBRARY})
|
||||||
if (NOT USE_INTERNAL_POCO_LIBRARY)
|
if (NOT USE_INTERNAL_POCO_LIBRARY)
|
||||||
@ -184,7 +184,7 @@ if (Poco_Data_FOUND AND NOT USE_INTERNAL_POCO_LIBRARY)
|
|||||||
target_include_directories (dbms PRIVATE ${Poco_Data_INCLUDE_DIRS})
|
target_include_directories (dbms PRIVATE ${Poco_Data_INCLUDE_DIRS})
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if (Poco_DataODBC_FOUND)
|
if (USE_POCO_DATAODBC)
|
||||||
target_link_libraries (clickhouse_common_io ${Poco_Data_LIBRARY})
|
target_link_libraries (clickhouse_common_io ${Poco_Data_LIBRARY})
|
||||||
target_link_libraries (dbms ${Poco_DataODBC_LIBRARY})
|
target_link_libraries (dbms ${Poco_DataODBC_LIBRARY})
|
||||||
if (NOT USE_INTERNAL_POCO_LIBRARY)
|
if (NOT USE_INTERNAL_POCO_LIBRARY)
|
||||||
@ -192,12 +192,11 @@ if (Poco_DataODBC_FOUND)
|
|||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
if (USE_POCO_MONGODB)
|
||||||
if (Poco_MongoDB_FOUND)
|
|
||||||
target_link_libraries (dbms ${Poco_MongoDB_LIBRARY})
|
target_link_libraries (dbms ${Poco_MongoDB_LIBRARY})
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if (Poco_NetSSL_FOUND)
|
if (USE_POCO_NETSSL)
|
||||||
target_link_libraries (clickhouse_common_io ${Poco_NetSSL_LIBRARY})
|
target_link_libraries (clickhouse_common_io ${Poco_NetSSL_LIBRARY})
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
@ -21,7 +21,7 @@
|
|||||||
#include <Interpreters/ClientInfo.h>
|
#include <Interpreters/ClientInfo.h>
|
||||||
|
|
||||||
#include <Common/config.h>
|
#include <Common/config.h>
|
||||||
#if Poco_NetSSL_FOUND
|
#if USE_POCO_NETSSL
|
||||||
#include <Poco/Net/SecureStreamSocket.h>
|
#include <Poco/Net/SecureStreamSocket.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -57,7 +57,7 @@ void Connection::connect()
|
|||||||
|
|
||||||
if (static_cast<bool>(secure))
|
if (static_cast<bool>(secure))
|
||||||
{
|
{
|
||||||
#if Poco_NetSSL_FOUND
|
#if USE_POCO_NETSSL
|
||||||
socket = std::make_unique<Poco::Net::SecureStreamSocket>();
|
socket = std::make_unique<Poco::Net::SecureStreamSocket>();
|
||||||
#else
|
#else
|
||||||
throw Exception{"tcp_secure protocol is disabled because poco library was built without NetSSL support.", ErrorCodes::SUPPORT_IS_DISABLED};
|
throw Exception{"tcp_secure protocol is disabled because poco library was built without NetSSL support.", ErrorCodes::SUPPORT_IS_DISABLED};
|
||||||
|
@ -10,7 +10,7 @@
|
|||||||
#cmakedefine01 USE_CAPNP
|
#cmakedefine01 USE_CAPNP
|
||||||
#cmakedefine01 USE_EMBEDDED_COMPILER
|
#cmakedefine01 USE_EMBEDDED_COMPILER
|
||||||
#cmakedefine01 LLVM_HAS_RTTI
|
#cmakedefine01 LLVM_HAS_RTTI
|
||||||
#cmakedefine01 Poco_SQLODBC_FOUND
|
#cmakedefine01 USE_POCO_SQLODBC
|
||||||
#cmakedefine01 Poco_DataODBC_FOUND
|
#cmakedefine01 USE_POCO_DATAODBC
|
||||||
#cmakedefine01 Poco_MongoDB_FOUND
|
#cmakedefine01 USE_POCO_MONGODB
|
||||||
#cmakedefine01 Poco_NetSSL_FOUND
|
#cmakedefine01 USE_POCO_NETSSL
|
||||||
|
@ -35,10 +35,10 @@ const char * auto_config_build[]
|
|||||||
"USE_VECTORCLASS", "@USE_VECTORCLASS@",
|
"USE_VECTORCLASS", "@USE_VECTORCLASS@",
|
||||||
"USE_RDKAFKA", "@USE_RDKAFKA@",
|
"USE_RDKAFKA", "@USE_RDKAFKA@",
|
||||||
"USE_CAPNP", "@USE_CAPNP@",
|
"USE_CAPNP", "@USE_CAPNP@",
|
||||||
"USE_Poco_SQLODBC", "@Poco_SQLODBC_FOUND@",
|
"USE_POCO_SQLODBC", "@USE_POCO_SQLODBC@",
|
||||||
"USE_Poco_DataODBC", "@Poco_DataODBC_FOUND@",
|
"USE_POCO_DATAODBC", "@USE_POCO_DATAODBC@",
|
||||||
"USE_Poco_MongoDB", "@Poco_MongoDB_FOUND@",
|
"USE_POCO_MONGODB", "@USE_POCO_MONGODB@",
|
||||||
"USE_Poco_NetSSL", "@Poco_NetSSL_FOUND@",
|
"USE_POCO_NETSSL", "@USE_POCO_NETSSL@",
|
||||||
|
|
||||||
nullptr, nullptr
|
nullptr, nullptr
|
||||||
};
|
};
|
||||||
|
@ -16,10 +16,10 @@
|
|||||||
#include <mutex>
|
#include <mutex>
|
||||||
|
|
||||||
#include <Common/config.h>
|
#include <Common/config.h>
|
||||||
#if Poco_MongoDB_FOUND
|
#if USE_POCO_MONGODB
|
||||||
#include <Dictionaries/MongoDBDictionarySource.h>
|
#include <Dictionaries/MongoDBDictionarySource.h>
|
||||||
#endif
|
#endif
|
||||||
#if Poco_SQLODBC_FOUND || Poco_DataODBC_FOUND
|
#if USE_POCO_SQLODBC || USE_POCO_DATAODBC
|
||||||
#pragma GCC diagnostic push
|
#pragma GCC diagnostic push
|
||||||
#pragma GCC diagnostic ignored "-Wunused-parameter"
|
#pragma GCC diagnostic ignored "-Wunused-parameter"
|
||||||
#include <Poco/Data/ODBC/Connector.h>
|
#include <Poco/Data/ODBC/Connector.h>
|
||||||
@ -88,7 +88,7 @@ Block createSampleBlock(const DictionaryStructure & dict_struct)
|
|||||||
DictionarySourceFactory::DictionarySourceFactory()
|
DictionarySourceFactory::DictionarySourceFactory()
|
||||||
: log(&Poco::Logger::get("DictionarySourceFactory"))
|
: log(&Poco::Logger::get("DictionarySourceFactory"))
|
||||||
{
|
{
|
||||||
#if Poco_SQLODBC_FOUND || Poco_DataODBC_FOUND
|
#if USE_POCO_SQLODBC || USE_POCO_DATAODBC
|
||||||
Poco::Data::ODBC::Connector::registerConnector();
|
Poco::Data::ODBC::Connector::registerConnector();
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
@ -139,7 +139,7 @@ DictionarySourcePtr DictionarySourceFactory::create(
|
|||||||
}
|
}
|
||||||
else if ("mongodb" == source_type)
|
else if ("mongodb" == source_type)
|
||||||
{
|
{
|
||||||
#if Poco_MongoDB_FOUND
|
#if USE_POCO_MONGODB
|
||||||
return std::make_unique<MongoDBDictionarySource>(dict_struct, config, config_prefix + ".mongodb", sample_block);
|
return std::make_unique<MongoDBDictionarySource>(dict_struct, config, config_prefix + ".mongodb", sample_block);
|
||||||
#else
|
#else
|
||||||
throw Exception{"Dictionary source of type `mongodb` is disabled because poco library was built without mongodb support.",
|
throw Exception{"Dictionary source of type `mongodb` is disabled because poco library was built without mongodb support.",
|
||||||
@ -148,7 +148,7 @@ DictionarySourcePtr DictionarySourceFactory::create(
|
|||||||
}
|
}
|
||||||
else if ("odbc" == source_type)
|
else if ("odbc" == source_type)
|
||||||
{
|
{
|
||||||
#if Poco_SQLODBC_FOUND || Poco_DataODBC_FOUND
|
#if USE_POCO_SQLODBC || USE_POCO_DATAODBC
|
||||||
return std::make_unique<ODBCDictionarySource>(dict_struct, config, config_prefix + ".odbc", sample_block, context);
|
return std::make_unique<ODBCDictionarySource>(dict_struct, config, config_prefix + ".odbc", sample_block, context);
|
||||||
#else
|
#else
|
||||||
throw Exception{"Dictionary source of type `odbc` is disabled because poco library was built without ODBC support.",
|
throw Exception{"Dictionary source of type `odbc` is disabled because poco library was built without ODBC support.",
|
||||||
@ -168,7 +168,7 @@ DictionarySourcePtr DictionarySourceFactory::create(
|
|||||||
if (dict_struct.has_expressions)
|
if (dict_struct.has_expressions)
|
||||||
throw Exception{"Dictionary source of type `http` does not support attribute expressions", ErrorCodes::LOGICAL_ERROR};
|
throw Exception{"Dictionary source of type `http` does not support attribute expressions", ErrorCodes::LOGICAL_ERROR};
|
||||||
|
|
||||||
#if Poco_NetSSL_FOUND
|
#if USE_POCO_NETSSL
|
||||||
// Used for https queries
|
// Used for https queries
|
||||||
std::call_once(ssl_init_once, SSLInit);
|
std::call_once(ssl_init_once, SSLInit);
|
||||||
#endif
|
#endif
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
#include <Common/config.h>
|
#include <Common/config.h>
|
||||||
#if Poco_MongoDB_FOUND
|
#if USE_POCO_MONGODB
|
||||||
|
|
||||||
#include <vector>
|
#include <vector>
|
||||||
#include <string>
|
#include <string>
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
#include <Common/config.h>
|
#include <Common/config.h>
|
||||||
#if Poco_MongoDB_FOUND
|
#if USE_POCO_MONGODB
|
||||||
#include <Poco/Util/AbstractConfiguration.h>
|
#include <Poco/Util/AbstractConfiguration.h>
|
||||||
|
|
||||||
#pragma GCC diagnostic push
|
#pragma GCC diagnostic push
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
#include <IO/HTTPCommon.h>
|
#include <IO/HTTPCommon.h>
|
||||||
|
|
||||||
#include <Common/config.h>
|
#include <Common/config.h>
|
||||||
#if Poco_NetSSL_FOUND
|
#if USE_POCO_NETSSL
|
||||||
#include <Poco/Net/AcceptCertificateHandler.h>
|
#include <Poco/Net/AcceptCertificateHandler.h>
|
||||||
#include <Poco/Net/Context.h>
|
#include <Poco/Net/Context.h>
|
||||||
#include <Poco/Net/InvalidCertificateHandler.h>
|
#include <Poco/Net/InvalidCertificateHandler.h>
|
||||||
@ -30,7 +30,7 @@ std::once_flag ssl_init_once;
|
|||||||
void SSLInit()
|
void SSLInit()
|
||||||
{
|
{
|
||||||
// http://stackoverflow.com/questions/18315472/https-request-in-c-using-poco
|
// http://stackoverflow.com/questions/18315472/https-request-in-c-using-poco
|
||||||
#if Poco_NetSSL_FOUND
|
#if USE_POCO_NETSSL
|
||||||
Poco::Net::initializeSSL();
|
Poco::Net::initializeSSL();
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
@ -9,7 +9,7 @@
|
|||||||
#include <Poco/Version.h>
|
#include <Poco/Version.h>
|
||||||
#include <common/logger_useful.h>
|
#include <common/logger_useful.h>
|
||||||
|
|
||||||
#if Poco_NetSSL_FOUND
|
#if USE_POCO_NETSSL
|
||||||
#include <Poco/Net/HTTPSClientSession.h>
|
#include <Poco/Net/HTTPSClientSession.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -36,7 +36,7 @@ ReadWriteBufferFromHTTP::ReadWriteBufferFromHTTP(const Poco::URI & uri,
|
|||||||
session
|
session
|
||||||
{
|
{
|
||||||
std::unique_ptr<Poco::Net::HTTPClientSession>(
|
std::unique_ptr<Poco::Net::HTTPClientSession>(
|
||||||
#if Poco_NetSSL_FOUND
|
#if USE_POCO_NETSSL
|
||||||
is_ssl ? new Poco::Net::HTTPSClientSession :
|
is_ssl ? new Poco::Net::HTTPSClientSession :
|
||||||
#endif
|
#endif
|
||||||
new Poco::Net::HTTPClientSession)
|
new Poco::Net::HTTPClientSession)
|
||||||
|
@ -26,6 +26,7 @@
|
|||||||
#include <Interpreters/DDLWorker.h>
|
#include <Interpreters/DDLWorker.h>
|
||||||
#include <Interpreters/ProcessList.h>
|
#include <Interpreters/ProcessList.h>
|
||||||
#include <Interpreters/loadMetadata.h>
|
#include <Interpreters/loadMetadata.h>
|
||||||
|
#include <Interpreters/DNSCacheUpdater.h>
|
||||||
#include <Storages/StorageReplicatedMergeTree.h>
|
#include <Storages/StorageReplicatedMergeTree.h>
|
||||||
#include <Storages/System/attachSystemTables.h>
|
#include <Storages/System/attachSystemTables.h>
|
||||||
#include <AggregateFunctions/registerAggregateFunctions.h>
|
#include <AggregateFunctions/registerAggregateFunctions.h>
|
||||||
@ -38,12 +39,9 @@
|
|||||||
#include "StatusFile.h"
|
#include "StatusFile.h"
|
||||||
#include "TCPHandlerFactory.h"
|
#include "TCPHandlerFactory.h"
|
||||||
|
|
||||||
#if Poco_NetSSL_FOUND
|
#if USE_POCO_NETSSL
|
||||||
#include <Poco/Net/Context.h>
|
#include <Poco/Net/Context.h>
|
||||||
#include <Poco/Net/SecureServerSocket.h>
|
#include <Poco/Net/SecureServerSocket.h>
|
||||||
#include <Interpreters/DNSCacheUpdater.h>
|
|
||||||
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
namespace CurrentMetrics
|
namespace CurrentMetrics
|
||||||
@ -431,7 +429,7 @@ int Server::main(const std::vector<std::string> & /*args*/)
|
|||||||
/// HTTPS
|
/// HTTPS
|
||||||
if (config().has("https_port"))
|
if (config().has("https_port"))
|
||||||
{
|
{
|
||||||
#if Poco_NetSSL_FOUND
|
#if USE_POCO_NETSSL
|
||||||
std::call_once(ssl_init_once, SSLInit);
|
std::call_once(ssl_init_once, SSLInit);
|
||||||
|
|
||||||
Poco::Net::SecureServerSocket socket;
|
Poco::Net::SecureServerSocket socket;
|
||||||
@ -471,7 +469,7 @@ int Server::main(const std::vector<std::string> & /*args*/)
|
|||||||
/// TCP with SSL
|
/// TCP with SSL
|
||||||
if (config().has("tcp_port_secure"))
|
if (config().has("tcp_port_secure"))
|
||||||
{
|
{
|
||||||
#if Poco_NetSSL_FOUND
|
#if USE_POCO_NETSSL
|
||||||
Poco::Net::SecureServerSocket socket;
|
Poco::Net::SecureServerSocket socket;
|
||||||
auto address = socket_bind_listen(socket, listen_host, config().getInt("tcp_port_secure"), /* secure = */ true);
|
auto address = socket_bind_listen(socket, listen_host, config().getInt("tcp_port_secure"), /* secure = */ true);
|
||||||
socket.setReceiveTimeout(settings.receive_timeout);
|
socket.setReceiveTimeout(settings.receive_timeout);
|
||||||
|
@ -23,7 +23,7 @@ void registerStorageJoin(StorageFactory & factory);
|
|||||||
void registerStorageView(StorageFactory & factory);
|
void registerStorageView(StorageFactory & factory);
|
||||||
void registerStorageMaterializedView(StorageFactory & factory);
|
void registerStorageMaterializedView(StorageFactory & factory);
|
||||||
|
|
||||||
#if Poco_SQLODBC_FOUND || Poco_DataODBC_FOUND
|
#if USE_POCO_SQLODBC || USE_POCO_DATAODBC
|
||||||
void registerStorageODBC(StorageFactory & factory);
|
void registerStorageODBC(StorageFactory & factory);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -56,7 +56,7 @@ void registerStorages()
|
|||||||
registerStorageView(factory);
|
registerStorageView(factory);
|
||||||
registerStorageMaterializedView(factory);
|
registerStorageMaterializedView(factory);
|
||||||
|
|
||||||
#if Poco_SQLODBC_FOUND || Poco_DataODBC_FOUND
|
#if USE_POCO_SQLODBC || USE_POCO_DATAODBC
|
||||||
registerStorageODBC(factory);
|
registerStorageODBC(factory);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -7,12 +7,12 @@ list(REMOVE_ITEM clickhouse_table_functions_headers ITableFunction.h TableFuncti
|
|||||||
add_library(clickhouse_table_functions ${clickhouse_table_functions_sources})
|
add_library(clickhouse_table_functions ${clickhouse_table_functions_sources})
|
||||||
target_link_libraries(clickhouse_table_functions clickhouse_storages_system dbms ${Poco_Foundation_LIBRARY})
|
target_link_libraries(clickhouse_table_functions clickhouse_storages_system dbms ${Poco_Foundation_LIBRARY})
|
||||||
|
|
||||||
if (Poco_SQLODBC_FOUND)
|
if (USE_POCO_SQLODBC)
|
||||||
target_link_libraries (clickhouse_table_functions ${Poco_SQLODBC_LIBRARY})
|
target_link_libraries (clickhouse_table_functions ${Poco_SQLODBC_LIBRARY})
|
||||||
target_include_directories (clickhouse_table_functions PRIVATE ${ODBC_INCLUDE_DIRECTORIES} ${Poco_SQLODBC_INCLUDE_DIRS})
|
target_include_directories (clickhouse_table_functions PRIVATE ${ODBC_INCLUDE_DIRECTORIES} ${Poco_SQLODBC_INCLUDE_DIRS})
|
||||||
endif ()
|
endif ()
|
||||||
|
|
||||||
if (Poco_DataODBC_FOUND)
|
if (USE_POCO_DATAODBC)
|
||||||
target_link_libraries (clickhouse_table_functions ${Poco_DataODBC_LIBRARY})
|
target_link_libraries (clickhouse_table_functions ${Poco_DataODBC_LIBRARY})
|
||||||
target_include_directories (clickhouse_table_functions PRIVATE ${ODBC_INCLUDE_DIRECTORIES} ${Poco_DataODBC_INCLUDE_DIRS})
|
target_include_directories (clickhouse_table_functions PRIVATE ${ODBC_INCLUDE_DIRECTORIES} ${Poco_DataODBC_INCLUDE_DIRS})
|
||||||
endif ()
|
endif ()
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
#include <TableFunctions/TableFunctionODBC.h>
|
#include <TableFunctions/TableFunctionODBC.h>
|
||||||
|
|
||||||
#if Poco_SQLODBC_FOUND || Poco_DataODBC_FOUND
|
#if USE_POCO_SQLODBC || USE_POCO_DATAODBC
|
||||||
#include <type_traits>
|
#include <type_traits>
|
||||||
#include <ext/scope_guard.h>
|
#include <ext/scope_guard.h>
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include <Common/config.h>
|
#include <Common/config.h>
|
||||||
#if Poco_SQLODBC_FOUND || Poco_DataODBC_FOUND
|
#if USE_POCO_SQLODBC || USE_POCO_DATAODBC
|
||||||
|
|
||||||
#include <TableFunctions/ITableFunction.h>
|
#include <TableFunctions/ITableFunction.h>
|
||||||
|
|
||||||
|
@ -13,7 +13,7 @@ void registerTableFunctionNumbers(TableFunctionFactory & factory);
|
|||||||
void registerTableFunctionCatBoostPool(TableFunctionFactory & factory);
|
void registerTableFunctionCatBoostPool(TableFunctionFactory & factory);
|
||||||
void registerTableFunctionFile(TableFunctionFactory & factory);
|
void registerTableFunctionFile(TableFunctionFactory & factory);
|
||||||
|
|
||||||
#if Poco_SQLODBC_FOUND || Poco_DataODBC_FOUND
|
#if USE_POCO_SQLODBC || USE_POCO_DATAODBC
|
||||||
void registerTableFunctionODBC(TableFunctionFactory & factory);
|
void registerTableFunctionODBC(TableFunctionFactory & factory);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -33,7 +33,7 @@ void registerTableFunctions()
|
|||||||
registerTableFunctionCatBoostPool(factory);
|
registerTableFunctionCatBoostPool(factory);
|
||||||
registerTableFunctionFile(factory);
|
registerTableFunctionFile(factory);
|
||||||
|
|
||||||
#if Poco_SQLODBC_FOUND || Poco_DataODBC_FOUND
|
#if USE_POCO_SQLODBC || USE_POCO_DATAODBC
|
||||||
registerTableFunctionODBC(factory);
|
registerTableFunctionODBC(factory);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user