diff --git a/docker/test/fasttest/run.sh b/docker/test/fasttest/run.sh index bba20f64e5a..8e0571838c8 100755 --- a/docker/test/fasttest/run.sh +++ b/docker/test/fasttest/run.sh @@ -378,6 +378,8 @@ function run_tests # needs pv 01923_network_receive_time_metric_insert + + 01889_sqlite_read_write ) time clickhouse-test --hung-check -j 8 --order=random --use-skip-list \ diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 209d618c44a..2ea20f22e05 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -76,7 +76,9 @@ add_headers_and_sources(clickhouse_common_io IO) add_headers_and_sources(clickhouse_common_io IO/S3) list (REMOVE_ITEM clickhouse_common_io_sources Common/malloc.cpp Common/new_delete.cpp) -add_headers_and_sources(dbms Databases/SQLite) +if (USE_SQLITE) + add_headers_and_sources(dbms Databases/SQLite) +endif() if(USE_RDKAFKA) add_headers_and_sources(dbms Storages/Kafka) @@ -427,6 +429,10 @@ if (USE_AMQPCPP) dbms_target_include_directories (SYSTEM BEFORE PUBLIC ${AMQPCPP_INCLUDE_DIR}) endif() +if (USE_SQLITE) + dbms_target_link_libraries(PUBLIC sqlite) +endif() + if (USE_CASSANDRA) dbms_target_link_libraries(PUBLIC ${CASSANDRA_LIBRARY}) dbms_target_include_directories (SYSTEM BEFORE PUBLIC ${CASS_INCLUDE_DIR}) @@ -462,8 +468,6 @@ endif () dbms_target_link_libraries(PRIVATE _boost_context) -dbms_target_link_libraries(PUBLIC sqlite) - include ("${ClickHouse_SOURCE_DIR}/cmake/add_check.cmake") if (ENABLE_TESTS AND USE_GTEST) diff --git a/src/Storages/registerStorages.cpp b/src/Storages/registerStorages.cpp index 5aa2e1b5d0f..333f35774e2 100644 --- a/src/Storages/registerStorages.cpp +++ b/src/Storages/registerStorages.cpp @@ -27,7 +27,6 @@ void registerStorageView(StorageFactory & factory); void registerStorageMaterializedView(StorageFactory & factory); void registerStorageLiveView(StorageFactory & factory); void registerStorageGenerateRandom(StorageFactory & factory); -void registerStorageSQLite(StorageFactory & factory); #if USE_AWS_S3 void registerStorageS3(StorageFactory & factory); @@ -69,9 +68,10 @@ void registerStorageExternalDistributed(StorageFactory & factory); #endif #if USE_SQLITE - registerStorageSQLite(factory); +void registerStorageSQLite(StorageFactory & factory); #endif + void registerStorages() { auto & factory = StorageFactory::instance(); @@ -133,6 +133,10 @@ void registerStorages() #if USE_MYSQL || USE_LIBPQXX registerStorageExternalDistributed(factory); #endif + + #if USE_SQLITE + registerStorageSQLite(factory); + #endif } }