fix ssl, fix after master merge

This commit is contained in:
Kirill Nikiforov 2024-06-24 00:45:15 +03:00
parent a6c9150621
commit edb3d0ab42
No known key found for this signature in database
11 changed files with 19 additions and 28 deletions

View File

@ -153,6 +153,6 @@ add_library(ch_contrib::libmongoc ALIAS _libmongoc)
target_include_directories(_libmongoc SYSTEM PUBLIC ${LIBMONGOC_SOURCE_DIR} ${COMMON_SOURCE_DIR} ${UTF8PROC_SOURCE_DIR})
target_compile_definitions(_libmongoc PRIVATE MONGOC_COMPILATION)
target_link_libraries(_libmongoc ch_contrib::libbson ch_contrib::c-ares ch_contrib::zstd resolv)
if (ENABLE_OPENSSL OR ENABLE_OPENSSL_DYNAMIC)
if (ENABLE_SSL)
target_link_libraries(_libmongoc OpenSSL::SSL)
endif()

View File

@ -157,7 +157,7 @@ set(MONGOCXX_COMPILER_VERSION "${CMAKE_CXX_COMPILER_VERSION}")
set(MONGOCXX_COMPILER_ID "${CMAKE_CXX_COMPILER_ID}")
set(MONGOCXX_LINK_WITH_STATIC_MONGOC 1)
set(MONGOCXX_BUILD_STATIC 1)
if (ENABLE_OPENSSL OR ENABLE_OPENSSL_DYNAMIC)
if (ENABLE_SSL)
set(MONGOCXX_ENABLE_SSL 1)
endif ()

View File

@ -178,9 +178,9 @@ int mainEntryClickHouseFormat(int argc, char ** argv)
registerInterpreters();
registerFunctions();
registerAggregateFunctions();
registerTableFunctions();
registerTableFunctions(false);
registerDatabases();
registerStorages();
registerStorages(false);
registerFormats();
std::unordered_set<std::string> additional_names;

View File

@ -470,10 +470,10 @@ try
/// Don't initialize DateLUT
registerFunctions();
registerAggregateFunctions();
registerTableFunctions();
registerTableFunctions(global_context->getGlobalContextInstance()->getServerSettings().use_legacy_mongodb_integration);
registerDatabases();
registerStorages();
registerDictionaries();
registerStorages(global_context->getGlobalContextInstance()->getServerSettings().use_legacy_mongodb_integration);
registerDictionaries(global_context->getGlobalContextInstance()->getServerSettings().use_legacy_mongodb_integration);
registerDisks(/* global_skip_access_check= */ true);
registerFormats();

View File

@ -709,10 +709,10 @@ try
registerInterpreters();
registerFunctions();
registerAggregateFunctions();
registerTableFunctions();
registerTableFunctions(server_settings.use_legacy_mongodb_integration);
registerDatabases();
registerStorages();
registerDictionaries();
registerStorages(server_settings.use_legacy_mongodb_integration);
registerDictionaries(server_settings.use_legacy_mongodb_integration);
registerDisks(/* global_skip_access_check= */ false);
registerFormats();
registerRemoteFileMetadatas();

View File

@ -1,9 +1,6 @@
#include "DictionaryFactory.h"
#include "DictionarySourceFactory.h"
#include <Core/ServerSettings.h>
#include <Interpreters/Context.h>
namespace DB
{
@ -39,7 +36,7 @@ void registerDictionaryPolygon(DictionaryFactory & factory);
void registerDictionaryDirect(DictionaryFactory & factory);
void registerDictionaries()
void registerDictionaries(bool use_legacy_mongodb_integration)
{
{
auto & source_factory = DictionarySourceFactory::instance();
@ -48,7 +45,7 @@ void registerDictionaries()
registerDictionarySourceMysql(source_factory);
registerDictionarySourceClickHouse(source_factory);
if (Context::getGlobalContextInstance()->getServerSettings().use_legacy_mongodb_integration)
if (use_legacy_mongodb_integration)
registerDictionarySourceMongoDBPocoLegacy(source_factory);
else
registerDictionarySourceMongoDB(source_factory);

View File

@ -2,5 +2,5 @@
namespace DB
{
void registerDictionaries();
void registerDictionaries(bool use_legacy_mongodb_integration);
}

View File

@ -1,6 +1,3 @@
#include <Core/ServerSettings.h>
#include <Interpreters/Context.h>
#include <Storages/StorageFactory.h>
#include <Storages/registerStorages.h>
@ -105,7 +102,7 @@ void registerStorageKeeperMap(StorageFactory & factory);
void registerStorageObjectStorage(StorageFactory & factory);
void registerStorages()
void registerStorages(bool use_legacy_mongodb_integration [[maybe_unused]])
{
auto & factory = StorageFactory::instance();
@ -161,7 +158,7 @@ void registerStorages()
#endif
#if USE_MONGODB
if (Context::getGlobalContextInstance()->getServerSettings().use_legacy_mongodb_integration)
if (use_legacy_mongodb_integration)
registerStorageMongoDBPocoLegacy(factory);
else
registerStorageMongoDB(factory);

View File

@ -2,5 +2,5 @@
namespace DB
{
void registerStorages();
void registerStorages(bool use_legacy_mongodb_integration);
}

View File

@ -1,12 +1,9 @@
#include "registerTableFunctions.h"
#include <TableFunctions/TableFunctionFactory.h>
#include <Core/ServerSettings.h>
#include <Interpreters/Context.h>
namespace DB
{
void registerTableFunctions()
void registerTableFunctions(bool use_legacy_mongodb_integration [[maybe_unused]])
{
auto & factory = TableFunctionFactory::instance();
@ -26,7 +23,7 @@ void registerTableFunctions()
registerTableFunctionInput(factory);
registerTableFunctionGenerate(factory);
#if USE_MONGODB
if (Context::getGlobalContextInstance()->getServerSettings().use_legacy_mongodb_integration)
if (use_legacy_mongodb_integration)
registerTableFunctionMongoDBPocoLegacy(factory);
else
registerTableFunctionMongoDB(factory);

View File

@ -70,6 +70,6 @@ void registerTableFunctionObjectStorage(TableFunctionFactory & factory);
void registerTableFunctionObjectStorageCluster(TableFunctionFactory & factory);
void registerDataLakeTableFunctions(TableFunctionFactory & factory);
void registerTableFunctions();
void registerTableFunctions(bool use_legacy_mongodb_integration [[maybe_unused]]);
}