From bf8b699f649b7f947e8ad8eeeb48c3d5f973be39 Mon Sep 17 00:00:00 2001 From: Kartik Soneji Date: Tue, 31 Aug 2021 14:09:47 +0200 Subject: MDEV-12933 sort out the compression library chaos bzip2/lz4/lzma/lzo/snappy compression is now provided via *services* they're almost like normal services, but in include/providers/ and they're supposed to provide exactly the same interface as original compression libraries (but not everything, only enough of if for the code to compile). the services are implemented via dummy functions that return corresponding error values (LZMA_PROG_ERROR, LZO_E_INTERNAL_ERROR, etc). the actual compression libraries are linked into corresponding provider plugins. Providers are daemon plugins that when loaded replace service pointers to point to actual compression functions. That is, run-time dependency on compression libraries is now on plugins, and the server doesn't need any compression libraries to run, but will automatically support the compression when a plugin is loaded. InnoDB and Mroonga use compression plugins now. RocksDB doesn't, because it comes with standalone utility binaries that cannot load plugins. --- libservices/CMakeLists.txt | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'libservices/CMakeLists.txt') diff --git a/libservices/CMakeLists.txt b/libservices/CMakeLists.txt index 6b47bb53fdb..8c559cb07f5 100644 --- a/libservices/CMakeLists.txt +++ b/libservices/CMakeLists.txt @@ -39,7 +39,12 @@ SET(MYSQLSERVICES_SOURCES wsrep_service.c json_service.c sql_service.c - ) + provider_service_bzip2.c + provider_service_lz4.c + provider_service_lzma.c + provider_service_lzo.c + provider_service_snappy.c +) ADD_CONVENIENCE_LIBRARY(mysqlservices ${MYSQLSERVICES_SOURCES}) INSTALL(TARGETS mysqlservices DESTINATION ${INSTALL_LIBDIR} COMPONENT Development) -- cgit v1.2.1