MDEV-32567 Remove thr_alarm from server codebase

This allows to simplify net_real_read() and net_real_write() a bit.

Removed some superfluous #ifdef/ifndef MYSQL_SERVER from net_serv.cc
The code always runs in server, either normal or embedded.
Dead code for switching socket between blocking and non-blocking modes,
is also removed.

Removed pthread_kill() with alarm signal that woke up main thread on
server shutdown. Used shutdown(2) on polling sockets instead, to the same
effect.

Removed yet another superstitious pthread_kill(), that ran on non-Windows
in terminate_slave_thread().
This commit is contained in:
Vladislav Vaintroub
2023-10-26 15:02:35 +02:00
committed by Daniel Black
parent 3424ed7d42
commit 013fc02a23
19 changed files with 125 additions and 1515 deletions

View File

@ -836,7 +836,6 @@ CHECK_CXX_SOURCE_COMPILES("
"
HAVE_SOLARIS_STYLE_GETHOST)
SET(NO_ALARM 1 CACHE BOOL "No need to use alarm to implement timeout")
# As a consequence of ALARMs no longer being used, thread
# notification for KILL must close the socket to wake up