summaryrefslogtreecommitdiff
path: root/sql/mysqld.h
diff options
context:
space:
mode:
authorVladislav Vaintroub <wlad@mariadb.com>2020-07-04 18:24:40 +0200
committerVladislav Vaintroub <wlad@mariadb.com>2020-07-04 18:24:40 +0200
commit9701759b3d9ea9fd9bee640ce27171bdd51b7e78 (patch)
tree88ad4445989ffb68b1f3af82642749ca50372ab9 /sql/mysqld.h
parentd46576b35ac0775e6500ee15e828f29c74998262 (diff)
downloadmariadb-git-9701759b3d9ea9fd9bee640ce27171bdd51b7e78.tar.gz
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
Diffstat (limited to 'sql/mysqld.h')
-rw-r--r--sql/mysqld.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/sql/mysqld.h b/sql/mysqld.h
index db8d9b4b1aa..6f0db56d309 100644
--- a/sql/mysqld.h
+++ b/sql/mysqld.h
@@ -952,4 +952,14 @@ extern ulong opt_binlog_dbug_fsync_sleep;
extern uint volatile global_disable_checkpoint;
extern my_bool opt_help;
+extern int mysqld_main(int argc, char **argv);
+
+#ifdef _WIN32
+extern HANDLE hEventShutdown;
+extern void mysqld_win_initiate_shutdown();
+extern void mysqld_win_set_startup_complete();
+extern void mysqld_set_service_status_callback(void (*)(DWORD, DWORD, DWORD));
+extern void mysqld_win_set_service_name(const char *name);
+#endif
+
#endif /* MYSQLD_INCLUDED */