MySQL 9.0.0
Source Code Documentation
read_mode_handler.h File Reference
#include <string>

Go to the source code of this file.

Functions

int enable_server_read_mode (const std::string &reason)
 Enable the super read only mode in the server. More...
 
int disable_server_read_mode ()
 Disable the read only mode in the server. More...
 
int get_read_mode_state (bool *read_only_enabled, bool *super_read_only_enabled)
 Get read mode status from server. More...
 
int set_read_mode_state (bool read_only_enabled, bool super_read_only_enabled)
 Set read mode status from server. More...
 

Function Documentation

◆ disable_server_read_mode()

int disable_server_read_mode ( )

Disable the read only mode in the server.

Returns
the operation status
Return values
0OK
!=0Error

◆ enable_server_read_mode()

int enable_server_read_mode ( const std::string &  reason)

Enable the super read only mode in the server.

Parameters
reasonexplains why we set the mode
Returns
the operation status
Return values
0OK
!=0Error

◆ get_read_mode_state()

int get_read_mode_state ( bool *  read_only_enabled,
bool *  super_read_only_enabled 
)

Get read mode status from server.

Parameters
read_only_enabledUpdate with value of read only mode
super_read_only_enabledUpdate with value of super read only mode
Returns
the operation status
Return values
0OK
!=0Error

◆ set_read_mode_state()

int set_read_mode_state ( bool  read_only_enabled,
bool  super_read_only_enabled 
)

Set read mode status from server.

Parameters
read_only_enabledValue to set on read only mode
super_read_only_enabledValue to set on super read only mode
Returns
the operation status
Return values
0OK
!=0Error