mirror of
https://github.com/MariaDB/server.git
synced 2025-01-16 03:52:35 +01:00
MDEV-19274 mariadb does not build on OSes that do not have HAVE_POOL_OF_THREADS
Do not try to compile threadpool_common.cc, if threadpool is not available on current OS. Also introduced undocumented/uncached CMake variable DISABLE_THREADPOOL, to emulate builds on exotic OSes.
This commit is contained in:
parent
59ed5f3aa4
commit
6812fb7971
3 changed files with 22 additions and 6 deletions
|
@ -126,7 +126,7 @@ SET (SQL_SOURCE
|
|||
opt_index_cond_pushdown.cc opt_subselect.cc
|
||||
opt_table_elimination.cc sql_expression_cache.cc
|
||||
gcalc_slicescan.cc gcalc_tools.cc
|
||||
threadpool_common.cc ../sql-common/mysql_async.c
|
||||
../sql-common/mysql_async.c
|
||||
my_apc.cc mf_iocache_encr.cc item_jsonfunc.cc
|
||||
my_json_writer.cc
|
||||
rpl_gtid.cc rpl_parallel.cc
|
||||
|
@ -152,17 +152,21 @@ SET (SQL_SOURCE
|
|||
${MYSYS_LIBWRAP_SOURCE}
|
||||
)
|
||||
|
||||
IF (CMAKE_SYSTEM_NAME MATCHES "Linux" OR
|
||||
CMAKE_SYSTEM_NAME MATCHES "Windows" OR
|
||||
CMAKE_SYSTEM_NAME MATCHES "SunOS" OR
|
||||
HAVE_KQUEUE)
|
||||
IF ((CMAKE_SYSTEM_NAME MATCHES "Linux" OR
|
||||
CMAKE_SYSTEM_NAME MATCHES "SunOS" OR
|
||||
WIN32 OR
|
||||
HAVE_KQUEUE)
|
||||
AND (NOT DISABLE_THREADPOOL))
|
||||
ADD_DEFINITIONS(-DHAVE_POOL_OF_THREADS)
|
||||
IF(WIN32)
|
||||
SET(SQL_SOURCE ${SQL_SOURCE} threadpool_win.cc)
|
||||
SET(SQL_SOURCE ${SQL_SOURCE} handle_connections_win.cc)
|
||||
ENDIF()
|
||||
SET(SQL_SOURCE ${SQL_SOURCE} threadpool_generic.cc)
|
||||
SET(SQL_SOURCE ${SQL_SOURCE} threadpool_common.cc)
|
||||
ENDIF()
|
||||
|
||||
IF(WIN32)
|
||||
SET(SQL_SOURCE ${SQL_SOURCE} handle_connections_win.cc)
|
||||
ENDIF()
|
||||
|
||||
MYSQL_ADD_PLUGIN(partition ha_partition.cc STORAGE_ENGINE DEFAULT STATIC_ONLY
|
||||
|
|
|
@ -28,8 +28,13 @@
|
|||
/* From mysqld.cc */
|
||||
extern HANDLE hEventShutdown;
|
||||
extern MYSQL_SOCKET base_ip_sock, extra_ip_sock;
|
||||
#ifdef HAVE_POOL_OF_THREADS
|
||||
extern PTP_CALLBACK_ENVIRON get_threadpool_win_callback_environ();
|
||||
extern void tp_win_callback_prolog();
|
||||
#else
|
||||
#define get_threadpool_win_callback_environ() 0
|
||||
#define tp_win_callback_prolog() do{}while(0)
|
||||
#endif
|
||||
static SECURITY_ATTRIBUTES pipe_security;
|
||||
|
||||
/**
|
||||
|
|
|
@ -1,3 +1,7 @@
|
|||
#ifndef THREADPOOL_H_INCLUDED
|
||||
#define THREADPOOL_H_INCLUDED
|
||||
|
||||
#ifdef HAVE_POOL_OF_THREADS
|
||||
/* Copyright (C) 2012 Monty Program Ab
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
|
@ -154,3 +158,6 @@ struct TP_pool_generic :TP_pool
|
|||
virtual int set_stall_limit(uint);
|
||||
virtual int get_idle_thread_count();
|
||||
};
|
||||
|
||||
#endif /* HAVE_POOL_OF_THREADS */
|
||||
#endif /* THREADPOOL_H_INCLUDED */
|
||||
|
|
Loading…
Reference in a new issue