mirror of
https://github.com/MariaDB/server.git
synced 2025-12-28 08:10:14 +00:00
Fix broken clang-cl compilation
- fix several Windows-specific "variable set but not used", or "variable unused" warnings. - correctly initialize std::atomic_flag (ATOMIC_FLAG_INIT) - fix Ninja build for spider on Windows - adjust check for sizeof(MYSQL) for Windows compilers
This commit is contained in:
parent
dca2e5509e
commit
ff4209fa0d
@ -595,11 +595,8 @@ void network_init_win()
|
||||
|
||||
void handle_connections_win()
|
||||
{
|
||||
int n_waits;
|
||||
|
||||
create_shutdown_event();
|
||||
wait_events.push_back(hEventShutdown);
|
||||
n_waits= 1;
|
||||
|
||||
for (size_t i= 0; i < all_listeners.size(); i++)
|
||||
{
|
||||
|
||||
@ -1398,11 +1398,6 @@ bool unix_sock_is_online= false;
|
||||
static int systemd_sock_activation; /* systemd socket activation */
|
||||
|
||||
|
||||
|
||||
/** wakeup listening(main) thread by writing to this descriptor */
|
||||
static int termination_event_fd= -1;
|
||||
|
||||
|
||||
C_MODE_START
|
||||
#ifdef WITH_PERFSCHEMA_STORAGE_ENGINE
|
||||
/**
|
||||
@ -1455,9 +1450,14 @@ static pthread_t select_thread;
|
||||
#endif
|
||||
|
||||
/* OS specific variables */
|
||||
|
||||
#ifndef EMBEDDED_LIBRARY
|
||||
#ifdef _WIN32
|
||||
/** wakeup main thread by signaling this event */
|
||||
HANDLE hEventShutdown;
|
||||
#else
|
||||
/** wakeup listening(main) thread by writing to this descriptor */
|
||||
static int termination_event_fd= -1;
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
@ -422,7 +422,7 @@ private:
|
||||
bool being_imported= false;
|
||||
|
||||
/** Whether any corrupton of this tablespace has been reported */
|
||||
mutable std::atomic_flag is_corrupted{false};
|
||||
mutable std::atomic_flag is_corrupted= ATOMIC_FLAG_INIT;
|
||||
|
||||
public:
|
||||
/** mutex to protect freed_ranges and last_freed_lsn */
|
||||
@ -1527,7 +1527,10 @@ extern fil_system_t fil_system;
|
||||
|
||||
inline void fil_space_t::reacquire() noexcept
|
||||
{
|
||||
ut_d(uint32_t n=) n_pending.fetch_add(1, std::memory_order_relaxed);
|
||||
#ifdef SAFE_MUTEX
|
||||
uint32_t n=
|
||||
#endif
|
||||
n_pending.fetch_add(1, std::memory_order_relaxed);
|
||||
#ifdef SAFE_MUTEX
|
||||
if (mysql_mutex_is_owner(&fil_system.mutex)) return;
|
||||
ut_ad(n & PENDING);
|
||||
|
||||
@ -28,16 +28,5 @@ ELSE()
|
||||
|
||||
MYSQL_ADD_PLUGIN(spider ${SPIDER_SOURCES} ${extra_options}
|
||||
STORAGE_ENGINE MODULE_ONLY)
|
||||
IF(NOT TARGET spider)
|
||||
RETURN()
|
||||
ENDIF()
|
||||
ENDIF()
|
||||
|
||||
IF(MSVC AND (TARGET spider))
|
||||
IF (CMAKE_BUILD_TYPE STREQUAL "Debug")
|
||||
ADD_CUSTOM_COMMAND(TARGET spider
|
||||
POST_BUILD
|
||||
COMMAND if not exist ..\\..\\sql\\lib mkdir ..\\..\\sql\\lib\\plugin
|
||||
COMMAND copy Debug\\ha_spider.dll ..\\..\\sql\\lib\\plugin\\ha_spider.dll)
|
||||
ENDIF()
|
||||
ENDIF()
|
||||
|
||||
@ -1438,7 +1438,9 @@ int main(int argc, char **argv)
|
||||
this limited check is enough, if sizeof(MYSQL) changes, it changes
|
||||
everywhere
|
||||
*/
|
||||
#if defined __x86_64__
|
||||
#if defined _M_AMD64
|
||||
compile_time_assert(sizeof(MYSQL) == 1208);
|
||||
#elif defined __x86_64__
|
||||
compile_time_assert(sizeof(MYSQL) == 1272);
|
||||
#elif defined __i386__
|
||||
compile_time_assert(sizeof(MYSQL) == 964);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user