Fix build

This commit is contained in:
Alexey Milovidov 2024-02-20 11:45:42 +01:00
parent 57f3c148d9
commit 38ae6968b6

View File

@ -20,7 +20,6 @@
#include <Interpreters/ActionLocksManager.h> #include <Interpreters/ActionLocksManager.h>
#include <Interpreters/InterpreterCreateQuery.h> #include <Interpreters/InterpreterCreateQuery.h>
#include <Interpreters/InterpreterRenameQuery.h> #include <Interpreters/InterpreterRenameQuery.h>
#include <Interpreters/QueryLog.h>
#include <Interpreters/executeDDLQueryOnCluster.h> #include <Interpreters/executeDDLQueryOnCluster.h>
#include <Interpreters/QueryThreadLog.h> #include <Interpreters/QueryThreadLog.h>
#include <Interpreters/QueryViewsLog.h> #include <Interpreters/QueryViewsLog.h>
@ -36,7 +35,6 @@
#include <Interpreters/ProcessorsProfileLog.h> #include <Interpreters/ProcessorsProfileLog.h>
#include <Interpreters/AsynchronousInsertLog.h> #include <Interpreters/AsynchronousInsertLog.h>
#include <Interpreters/BackupLog.h> #include <Interpreters/BackupLog.h>
#include <IO/S3/BlobStorageLogWriter.h>
#include <Interpreters/JIT/CompiledExpressionCache.h> #include <Interpreters/JIT/CompiledExpressionCache.h>
#include <Interpreters/TransactionLog.h> #include <Interpreters/TransactionLog.h>
#include <Interpreters/AsynchronousInsertQueue.h> #include <Interpreters/AsynchronousInsertQueue.h>
@ -44,7 +42,6 @@
#include <Access/AccessControl.h> #include <Access/AccessControl.h>
#include <Access/ContextAccess.h> #include <Access/ContextAccess.h>
#include <Access/Common/AllowedClientHosts.h> #include <Access/Common/AllowedClientHosts.h>
#include <Databases/IDatabase.h>
#include <Databases/DatabaseReplicated.h> #include <Databases/DatabaseReplicated.h>
#include <Disks/ObjectStorages/IMetadataStorage.h> #include <Disks/ObjectStorages/IMetadataStorage.h>
#include <Storages/StorageDistributed.h> #include <Storages/StorageDistributed.h>
@ -362,19 +359,23 @@ BlockIO InterpreterSystemQuery::execute()
getContext()->checkAccess(AccessType::SYSTEM_DROP_QUERY_CACHE); getContext()->checkAccess(AccessType::SYSTEM_DROP_QUERY_CACHE);
getContext()->clearQueryCache(); getContext()->clearQueryCache();
break; break;
#if USE_EMBEDDED_COMPILER
case Type::DROP_COMPILED_EXPRESSION_CACHE: case Type::DROP_COMPILED_EXPRESSION_CACHE:
#if USE_EMBEDDED_COMPILER
getContext()->checkAccess(AccessType::SYSTEM_DROP_COMPILED_EXPRESSION_CACHE); getContext()->checkAccess(AccessType::SYSTEM_DROP_COMPILED_EXPRESSION_CACHE);
if (auto * cache = CompiledExpressionCacheFactory::instance().tryGetCache()) if (auto * cache = CompiledExpressionCacheFactory::instance().tryGetCache())
cache->clear(); cache->clear();
break; #else
throw Exception(ErrorCodes::SUPPORT_IS_DISABLED, "The server was compiled without the support for JIT compilation");
#endif #endif
#if USE_AWS_S3 break;
case Type::DROP_S3_CLIENT_CACHE: case Type::DROP_S3_CLIENT_CACHE:
#if USE_AWS_S3
getContext()->checkAccess(AccessType::SYSTEM_DROP_S3_CLIENT_CACHE); getContext()->checkAccess(AccessType::SYSTEM_DROP_S3_CLIENT_CACHE);
S3::ClientCacheRegistry::instance().clearCacheForAll(); S3::ClientCacheRegistry::instance().clearCacheForAll();
break; #else
throw Exception(ErrorCodes::SUPPORT_IS_DISABLED, "The server was compiled without the support for AWS S3");
#endif #endif
break;
case Type::DROP_FILESYSTEM_CACHE: case Type::DROP_FILESYSTEM_CACHE:
{ {
@ -768,6 +769,12 @@ BlockIO InterpreterSystemQuery::execute()
flushJemallocProfile("/tmp/jemalloc_clickhouse"); flushJemallocProfile("/tmp/jemalloc_clickhouse");
break; break;
} }
#else
case Type::JEMALLOC_PURGE:
case Type::JEMALLOC_ENABLE_PROFILE:
case Type::JEMALLOC_DISABLE_PROFILE:
case Type::JEMALLOC_FLUSH_PROFILE:
throw Exception(ErrorCodes::SUPPORT_IS_DISABLED, "The server was compiled without JEMalloc");
#endif #endif
default: default:
throw Exception(ErrorCodes::BAD_ARGUMENTS, "Unknown type of SYSTEM query"); throw Exception(ErrorCodes::BAD_ARGUMENTS, "Unknown type of SYSTEM query");