MySQL 8.0.39
Source Code Documentation
read_mode_handler.h
Go to the documentation of this file.
1/* Copyright (c) 2015, 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 READ_MODE_HANDLER_INCLUDE
25#define READ_MODE_HANDLER_INCLUDE
26
27/**
28 Enable the super read only mode in the server.
29
30 @return the operation status
31 @retval 0 OK
32 @retval !=0 Error
33*/
35
36/**
37 Disable the read only mode in the server.
38
39 @return the operation status
40 @retval 0 OK
41 @retval !=0 Error
42*/
44
45/**
46 Get read mode status from server.
47
48 @param read_only_enabled Update with value of read only mode
49 @param super_read_only_enabled Update with value of super read only mode
50
51 @return the operation status
52 @retval 0 OK
53 @retval !=0 Error
54*/
55int get_read_mode_state(bool *read_only_enabled, bool *super_read_only_enabled);
56
57/**
58 Set read mode status from server.
59
60 @param read_only_enabled Value to set on read only mode
61 @param super_read_only_enabled Value to set on super read only mode
62
63 @return the operation status
64 @retval 0 OK
65 @retval !=0 Error
66*/
67int set_read_mode_state(bool read_only_enabled, bool super_read_only_enabled);
68
69#endif /* READ_MODE_HANDLER_INCLUDE */
int set_read_mode_state(bool read_only_enabled, bool super_read_only_enabled)
Set read mode status from server.
Definition: read_mode_handler.cc:88
int get_read_mode_state(bool *read_only_enabled, bool *super_read_only_enabled)
Get read mode status from server.
Definition: read_mode_handler.cc:63
int disable_server_read_mode()
Disable the read only mode in the server.
Definition: read_mode_handler.cc:53
int enable_server_read_mode()
Enable the super read only mode in the server.
Definition: read_mode_handler.cc:32