MySQL 9.1.0
Source Code Documentation
delayed_plugin_initialization.h
Go to the documentation of this file.
1/* Copyright (c) 2016, 2024, Oracle and/or its affiliates.
2
3 This program is free software; you can redistribute it and/or modify
4 it under the terms of the GNU General Public License, version 2.0,
5 as published by the Free Software Foundation.
6
7 This program is designed to work with certain software (including
8 but not limited to OpenSSL) that is licensed under separate terms,
9 as designated in a particular file or component or in included license
10 documentation. The authors of MySQL hereby grant you an additional
11 permission to link the program and your derivative works with the
12 separately licensed software that they have either included with
13 the program or referenced in the documentation.
14
15 This program is distributed in the hope that it will be useful,
16 but WITHOUT ANY WARRANTY; without even the implied warranty of
17 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 GNU General Public License, version 2.0, for more details.
19
20 You should have received a copy of the GNU General Public License
21 along with this program; if not, write to the Free Software
22 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
23
24#ifndef DELAYED_PLUGIN_INITIALIZATION_INCLUDE
25#define DELAYED_PLUGIN_INITIALIZATION_INCLUDE
26
28
30 public:
32
33 /**
34 The class destructor
35 */
37
38 /**
39 The thread handler.
40
41 @retval 0 OK
42 @retval !=0 Error
43 */
45
46 /**
47 Initialize a thread where the plugin services will be initialized
48
49 @return the operation status
50 @retval 0 OK
51 @retval !=0 Error
52 */
54
55 /**
56 Signals the plugin initialization thread that the server is ready.
57 */
59
60 /**
61 Wait for the initialization thread to do its job.
62 */
64
65 /**
66 Signal that the read mode is set on the server.
67 */
69
70 /**
71 Wait for the read mode to be set by the thread process.
72 */
73 void wait_for_read_mode();
74
75 private:
76 // Delayed_initialization_thread variables
77
78 /* Delayed_initialization_thread state */
80
81 /* Is the server ready*/
83
84 /* Is the read mode already set*/
86
87 /* Thread related structures */
88
90 // run conditions and locks
95};
96
97#endif /* DELAYED_PLUGIN_INITIALIZATION_INCLUDE */
Definition: delayed_plugin_initialization.h:29
void signal_thread_ready()
Signals the plugin initialization thread that the server is ready.
Definition: delayed_plugin_initialization.cc:61
mysql_cond_t server_ready_cond
Definition: delayed_plugin_initialization.h:94
int launch_initialization_thread()
Initialize a thread where the plugin services will be initialized.
Definition: delayed_plugin_initialization.cc:102
void wait_for_read_mode()
Wait for the read mode to be set by the thread process.
Definition: delayed_plugin_initialization.cc:90
~Delayed_initialization_thread()
The class destructor.
Definition: delayed_plugin_initialization.cc:54
bool is_super_read_only_set
Definition: delayed_plugin_initialization.h:85
Delayed_initialization_thread()
Definition: delayed_plugin_initialization.cc:43
void signal_read_mode_ready()
Signal that the read mode is set on the server.
Definition: delayed_plugin_initialization.cc:83
mysql_mutex_t run_lock
Definition: delayed_plugin_initialization.h:91
thread_state delayed_thd_state
Definition: delayed_plugin_initialization.h:79
my_thread_handle delayed_init_pthd
Definition: delayed_plugin_initialization.h:89
bool is_server_ready
Definition: delayed_plugin_initialization.h:82
int initialization_thread_handler()
The thread handler.
Definition: delayed_plugin_initialization.cc:129
void wait_for_thread_end()
Wait for the initialization thread to do its job.
Definition: delayed_plugin_initialization.cc:68
mysql_mutex_t server_ready_lock
Definition: delayed_plugin_initialization.h:93
mysql_cond_t run_cond
Definition: delayed_plugin_initialization.h:92
Definition: my_thread_bits.h:58
An instrumented cond structure.
Definition: mysql_cond_bits.h:50
An instrumented mutex structure.
Definition: mysql_mutex_bits.h:50
Definition: plugin_utils.h:48