MySQL  8.0.19
Source Code Documentation
read_mode_handler.h File Reference

Go to the source code of this file.

Functions

int enable_server_read_mode (enum_plugin_con_isolation session_isolation)
 This method creates a server session and connects to the server to enable the read mode. More...
 
int disable_server_read_mode (enum_plugin_con_isolation session_isolation)
 This method creates a server session and connects to the server to disable the read mode. More...
 
long enable_super_read_only_mode (Sql_service_command_interface *sql_service_command)
 Enable the super read only mode in the server. More...
 
long disable_super_read_only_mode (Sql_service_command_interface *sql_service_command)
 Disable the read only mode in the server. More...
 
long get_read_mode_state (Sql_service_command_interface *sql_service_command, bool *read_only_enabled, bool *super_read_only_enabled)
 Get read mode status from server. More...
 
long set_read_mode_state (Sql_service_command_interface *sql_service_command, 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 ( enum_plugin_con_isolation  session_isolation)

This method creates a server session and connects to the server to disable the read mode.

Parameters
session_isolationsession creation requirements: use current thread, use thread but initialize it or create it in a dedicated thread
Returns
the operation status
Return values
0OK
!=0Error

◆ disable_super_read_only_mode()

long disable_super_read_only_mode ( Sql_service_command_interface sql_service_command)

Disable the read only mode in the server.

Parameters
sql_service_commandCommand interface given to execute the command
Returns
the operation status
Return values
0OK
!=0Error

◆ enable_server_read_mode()

int enable_server_read_mode ( enum_plugin_con_isolation  session_isolation)

This method creates a server session and connects to the server to enable the read mode.

Parameters
session_isolationsession creation requirements: use current thread, use thread but initialize it or create it in a dedicated thread
Returns
the operation status
Return values
0OK
!=0Error

◆ enable_super_read_only_mode()

long enable_super_read_only_mode ( Sql_service_command_interface sql_service_command)

Enable the super read only mode in the server.

Parameters
sql_service_commandCommand interface given to execute the command
Returns
the operation status
Return values
0OK
!=0Error

◆ get_read_mode_state()

long get_read_mode_state ( Sql_service_command_interface sql_service_command,
bool read_only_enabled,
bool super_read_only_enabled 
)

Get read mode status from server.

Parameters
sql_service_commandCommand interface given to execute the command
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()

long set_read_mode_state ( Sql_service_command_interface sql_service_command,
bool  read_only_enabled,
bool  super_read_only_enabled 
)

Set read mode status from server.

Parameters
sql_service_commandCommand interface given to execute the command
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