diff --git a/libmysqld/CMakeLists.txt b/libmysqld/CMakeLists.txt index cb84f46004a..d03abc5c378 100644 --- a/libmysqld/CMakeLists.txt +++ b/libmysqld/CMakeLists.txt @@ -21,6 +21,7 @@ INCLUDE_DIRECTORIES( ${CMAKE_SOURCE_DIR}/include ${CMAKE_SOURCE_DIR}/libmysqld ${CMAKE_SOURCE_DIR}/sql +${CMAKE_SOURCE_DIR}/tpool ${CMAKE_BINARY_DIR}/sql ${PCRE_INCLUDES} ${ZLIB_INCLUDE_DIR} @@ -456,7 +457,7 @@ IF(NOT DISABLE_SHARED) SET_TARGET_PROPERTIES(libmysqld PROPERTIES CLEAN_DIRECT_OUTPUT 1) TARGET_LINK_LIBRARIES(libmysqld ${CRC32_LIBRARY}) SET_TARGET_PROPERTIES(mysqlserver PROPERTIES CLEAN_DIRECT_OUTPUT 1) - TARGET_LINK_LIBRARIES(mysqlserver ${CRC32_LIBRARY}) + TARGET_LINK_LIBRARIES(mysqlserver ${CRC32_LIBRARY} tpool) IF(LIBMYSQLD_SO_EXTRA_LIBS) TARGET_LINK_LIBRARIES(libmysqld ${LIBMYSQLD_SO_EXTRA_LIBS}) ENDIF() diff --git a/sql/CMakeLists.txt b/sql/CMakeLists.txt index 8465b5a6206..437f496f1f1 100644 --- a/sql/CMakeLists.txt +++ b/sql/CMakeLists.txt @@ -44,18 +44,14 @@ ENDIF() INCLUDE_DIRECTORIES( ${CMAKE_SOURCE_DIR}/include -${CMAKE_SOURCE_DIR}/sql +${CMAKE_SOURCE_DIR}/sql ${PCRE_INCLUDES} ${ZLIB_INCLUDE_DIR} ${SSL_INCLUDE_DIRS} ${CMAKE_BINARY_DIR}/sql +${CMAKE_SOURCE_DIR}/tpool ) - - - - - ADD_CUSTOM_COMMAND( OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/lex_token.h COMMAND gen_lex_token > lex_token.h @@ -194,6 +190,7 @@ ADD_LIBRARY(sql STATIC ${SQL_SOURCE}) DTRACE_INSTRUMENT(sql) TARGET_LINK_LIBRARIES(sql mysys mysys_ssl dbug strings vio pcre2-8 + tpool ${LIBWRAP} ${LIBCRYPT} ${LIBDL} ${CMAKE_THREAD_LIBS_INIT} ${SSL_LIBRARIES} ${LIBSYSTEMD}) diff --git a/sql/mdl.cc b/sql/mdl.cc index e7c0d699d76..c4d6f89644b 100644 --- a/sql/mdl.cc +++ b/sql/mdl.cc @@ -24,6 +24,8 @@ #include #include #include +#include + #ifdef HAVE_PSI_INTERFACE static PSI_mutex_key key_MDL_wait_LOCK_wait_status; @@ -1125,6 +1127,7 @@ MDL_wait::timed_wait(MDL_context_owner *owner, struct timespec *abs_timeout, owner->ENTER_COND(&m_COND_wait_status, &m_LOCK_wait_status, wait_state_name, & old_stage); thd_wait_begin(NULL, THD_WAIT_META_DATA_LOCK); + tpool::tpool_wait_begin(); while (!m_wait_status && !owner->is_killed() && wait_result != ETIMEDOUT && wait_result != ETIME) { @@ -1147,6 +1150,7 @@ MDL_wait::timed_wait(MDL_context_owner *owner, struct timespec *abs_timeout, wait_result= mysql_cond_timedwait(&m_COND_wait_status, &m_LOCK_wait_status, abs_timeout); } + tpool::tpool_wait_end(); thd_wait_end(NULL); if (m_wait_status == EMPTY) diff --git a/storage/innobase/CMakeLists.txt b/storage/innobase/CMakeLists.txt index 92c66a6513a..593567bb097 100644 --- a/storage/innobase/CMakeLists.txt +++ b/storage/innobase/CMakeLists.txt @@ -155,8 +155,7 @@ MYSQL_ADD_PLUGIN(innobase ${INNOBASE_SOURCES} STORAGE_ENGINE ${CRC32_LIBRARY} ${NUMA_LIBRARY} ${LIBSYSTEMD} - ${LINKER_SCRIPT} - tpool) + ${LINKER_SCRIPT}) IF(NOT TARGET innobase) RETURN() @@ -194,5 +193,6 @@ IF(MSVC) ENDIF() IF(NOT (PLUGIN_INNOBASE STREQUAL DYNAMIC)) + TARGET_LINK_LIBRARIES(innobase tpool) ADD_SUBDIRECTORY(${CMAKE_SOURCE_DIR}/extra/mariabackup ${CMAKE_BINARY_DIR}/extra/mariabackup) ENDIF()