Commit graph

20 commits

Author SHA1 Message Date
Vladislav Vaintroub
4205078b41 Fix clang-cl warning 2021-05-09 23:51:18 +02:00
Monty
d7d1023217 Changed std::vector<MYSQL_SOCKET> listen_sockets to Dynamic_array
Main reason for this was there was a crash in shutdown of the server
in binlog_encryption.encryption_combo-mix and some other tests because
something in listen_sockets where not initialized. Changing to
Dynamic_array caused things to work.
Other reason for removing std::vector was that it is harder to debug,
and not integrated with DBUG, safemalloc, valgrind or memory
calculation and cause code explosions (extra code generated for each
std::vector type used).
2021-03-20 21:17:32 +02:00
Daniel Black
6b8a896837 MDEV-6536: postfix win32 handle_connections_win type fix 2021-03-05 13:03:51 +11:00
Rinat Ibragimov
b3abcf80a1 MDEV-6536: make --bind=hostname to listen on both IPv6 and IPv4 addresses
Binding to a hostname now makes MariaDB server to listen on all addresses
that hostname resolves to.

Rebased to 10.6 by Daniel Black

Closes: #1668
2021-03-05 08:25:52 +11:00
Marko Mäkelä
09a1f0075a Merge 10.5 into 10.6 2020-11-02 12:49:19 +02:00
Marko Mäkelä
898521e2dd Merge 10.4 into 10.5 2020-10-30 11:15:30 +02:00
Vladislav Vaintroub
e451145aa9 MDEV-24040 Named pipe permission issue
Tighten access control - deny FILE_CREATE_PIPE_INSTANCE permission to
everyone except current user (the one that runs mysqld)
2020-10-28 14:24:10 +01:00
Vladislav Vaintroub
e12ed97675 Fix merge.
Remove wrong DBUG_ASSERT(hEventShutdown). hEventShutdown was created
right after this DBUG_ASSERT
2020-08-12 16:23:36 +02:00
Marko Mäkelä
0e34bb3e97 Merge 10.5 into 10.6 2020-08-12 14:39:53 +03:00
Vladislav Vaintroub
602d3dafa9 MDEV-23279 postfix - delay accepting connections until server startup is finished. 2020-08-11 17:39:43 +00:00
Vladislav Vaintroub
4ea915e28c MDEV-23279 main.named_pipe test timeouts if called twice in a row
The test timeouts, because mtr is waiting for pid file.
The pid file is not there, because expected to fail mysqld startup
(duplicate named pipe name), this startup removed pid file of the running
mysqld instance.

To fix, split handle_connections_win() into the initialization part,
and  accept/handle part, like it is done elsewhere.

The initialization part runs before pid file handling, and aborts on errors
, thus avoiding pid file overwrites.
2020-08-10 17:33:48 +00:00
Vladislav Vaintroub
9701759b3d MDEV-23043 Refactor Windows service handling
Removed the existing nt_service classes - they provide little
abstraction, and only obscure a relatively simple service handling.
This replaces by similar code inspired by MS docs samples.

Service handling is now moved into winmain.cc, which contains
the main() function for Windows.

winmain provides reporting callbacks, which should be used by external code
,to report transitions from starting to running to shutting down to stopped.

Removed a  do-nothing ServiceMain thread, and the
non-working service "pause/continue".  Removed a lot of #ifdef __WIN__
code from mysqld.cc
2020-07-04 18:24:40 +02:00
Sergei Golubchik
7af733a5a2 perfschema compilation, test and misc fixes 2020-03-10 19:24:23 +01:00
Marko Mäkelä
ded128aa9b Merge 10.4 into 10.5 2020-01-20 16:48:56 +02:00
Vladislav Vaintroub
983163209d MDEV-21444 : Fix socket leak if AcceptEx() return WSAECONNRESET.
Also, ignore/retry on ERROR_NETNAME_DELETED in addition to
WSAECONNRESET.
This is how golang handles failing AcceptEx(), see
c7ef348bad
2020-01-08 16:53:09 +01:00
Sergey Vojtovich
ce30c99478 Moved vio allocation to connection thread
Part of MDEV-19515 - Improve connect speed
2019-05-21 17:55:09 +04:00
Sergey Vojtovich
c90c769807 Simplified away CONNECT::host
Part of MDEV-19515 - Improve connect speed
2019-05-21 17:55:09 +04:00
Vladislav Vaintroub
6812fb7971 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.
2019-04-18 07:37:05 +01:00
Monty
c0c62196ca Removed \n from sql_print_error() 2019-01-26 19:18:22 +02:00
Vladislav Vaintroub
8f329e8d37 MDEV-10384 Windows : Refactor threading in mysqld startup.
Remove threads that are doing nothing but wait
- main thread now handles the connections
(if threadpool is used, also threadpool threads would wait for connections)
- thread for socket and pipe connections are removed
- shutdown thread is now removed, we wait for shutdown
notification in main thread as well
- kill_server() is also called inside the main thread, after connection
loop finished.
2018-10-05 09:29:22 +01:00