Go to the source code of this file.
|
privilege_result | user_has_gr_admin_privilege () |
| Checks whether the user has GROUP_REPLICATION_ADMIN privilege. More...
|
|
void | log_privilege_status_result (privilege_result const &privilege, char *message) |
| Logs the privilege status of privilege into message . More...
|
|
std::pair< bool, std::string > | check_super_read_only_is_disabled () |
| Checks that super_read_only is disabled on the server. More...
|
|
bool | member_online_with_majority () |
| Checks whether the server is ONLINE and belongs to the majority partition. More...
|
|
bool | group_contains_unreachable_member () |
| Checks if an unreachable member exists in the group. More...
|
|
bool | group_contains_recovering_member () |
| Checks if a member in recovery exists in the group. More...
|
|
bool | validate_uuid_parameter (std::string &uuid, size_t ulength, const char **error_message) |
| Checks if the uuid is valid to use in a function It checks: More...
|
|
bool | throw_udf_error (const char *action_name, const char *error_message, bool log_error=false) |
| Throw a error on a UDF function with mysql_error_service_printf. More...
|
|
bool | log_group_action_result_message (Group_action_diagnostics *result_area, const char *action_name, char *result_message, unsigned long *length) |
| Logs the group action action_name result from result_area into result_message . More...
|
|
bool | check_locked_tables (char *message) |
| Checks if tables are locked, and logs to message if so. More...
|
|
bool | group_contains_member_older_than (Member_version const &min_required_version) |
| Checks whether the group contains a member older than the specified version. More...
|
|
◆ privilege_status
Result data type for user_has_gr_admin_privilege.
There are three cases:
error: There was an error fetching the user's privileges ok: The user has the required privileges no_privilege: The user does not have the required privileges
In the no_privilege case, the result contains the user's name and host for the caller to create an helpful error message.
Enumerator |
---|
ok | |
no_privilege | |
error | |
◆ check_locked_tables()
bool check_locked_tables |
( |
char * |
message | ) |
|
Checks if tables are locked, and logs to message
if so.
- Parameters
-
[out] | message | buffer where the log message will be written to |
- Return values
-
true | if tables are not locked |
false | if tables are locked (message is written to) |
◆ check_super_read_only_is_disabled()
std::pair< bool, std::string > check_super_read_only_is_disabled |
( |
| ) |
|
Checks that super_read_only
is disabled on the server.
- Returns
- std::pair<bool, std::string> where each element has the following meaning: first element of the pair is the function error value: false Successful true Error second element of the pair is the error message.
◆ group_contains_member_older_than()
bool group_contains_member_older_than |
( |
Member_version const & |
min_required_version | ) |
|
Checks whether the group contains a member older than the specified version.
- Parameters
-
min_required_version | Minimum version required |
- Returns
- true if there is some older member, false otherwise
◆ group_contains_recovering_member()
bool group_contains_recovering_member |
( |
| ) |
|
Checks if a member in recovery exists in the group.
- Return values
-
true | if a recovering member exists |
false | otherwise |
◆ group_contains_unreachable_member()
bool group_contains_unreachable_member |
( |
| ) |
|
Checks if an unreachable member exists in the group.
- Return values
-
true | if an unreachable member exists |
false | otherwise |
◆ log_group_action_result_message()
bool log_group_action_result_message |
( |
Group_action_diagnostics * |
result_area, |
|
|
const char * |
action_name, |
|
|
char * |
result_message, |
|
|
unsigned long * |
length |
|
) |
| |
Logs the group action action_name
result from result_area
into result_message
.
- Parameters
-
| result_area | describes the log message level |
| action_name | group action name |
[out] | result_message | buffer where the log message will be written |
[out] | length | size of the log message written to result_message |
- Return values
-
true | the group action failed and this function threw/logged the group action's error |
false | everything went OK |
◆ log_privilege_status_result()
void log_privilege_status_result |
( |
privilege_result const & |
privilege, |
|
|
char * |
message |
|
) |
| |
Logs the privilege status of privilege
into message
.
- Parameters
-
| privilege | the result of user_has_gr_admin_privilege() |
[out] | message | the buffer where the log message will be written |
◆ member_online_with_majority()
bool member_online_with_majority |
( |
| ) |
|
Checks whether the server is ONLINE and belongs to the majority partition.
- Return values
-
true | if the member is online and in the majority partition |
false | otherwise |
◆ throw_udf_error()
bool throw_udf_error |
( |
const char * |
action_name, |
|
|
const char * |
error_message, |
|
|
bool |
log_error = false |
|
) |
| |
Throw a error on a UDF function with mysql_error_service_printf.
- Parameters
-
action_name | the action name when the error occurred |
error_message | the error message to print |
log_error | should the error also go to the log (default = false) |
- Return values
-
true | the function failed to use the mysql_runtime_error service to throw the error |
false | everything went OK |
◆ user_has_gr_admin_privilege()
Checks whether the user has GROUP_REPLICATION_ADMIN privilege.
- Return values
-
privilege_result::error | if there was an error fetching the user's privileges |
privilege_result::no_privilege | if the user does not have the privilege |
privilege_result::success | if the user has the privilege |
◆ validate_uuid_parameter()
bool validate_uuid_parameter |
( |
std::string & |
uuid, |
|
|
size_t |
ulength, |
|
|
const char ** |
error_message |
|
) |
| |
Checks if the uuid is valid to use in a function It checks:
- It is not empty
- It is a valid uuid
- It belongs to the group
- Parameters
-
| uuid | the uuid string |
| ulength | the length of the uuid string |
[out] | error_message | the returned error message |
- Return values
-
true | if uuid is not valid |
false | otherwise |
◆ member_offline_or_minority_str
const char* const member_offline_or_minority_str |
Initial value:=
"Member must be ONLINE and in the majority partition."
◆ recovering_member_on_group_str
const char* const recovering_member_on_group_str |
Initial value:=
"A member is joining the group, wait for it to be ONLINE."
◆ server_uuid_not_on_group_str
const char* const server_uuid_not_on_group_str |
Initial value:=
"The requested uuid is not a member of the group."
◆ server_uuid_not_present_str
const char* const server_uuid_not_present_str |
Initial value:=
"Wrong arguments: You need to specify a server uuid."
◆ server_uuid_not_valid_str
const char* const server_uuid_not_valid_str |
Initial value:=
"Wrong arguments: The server uuid is not valid."
◆ unreachable_member_on_group_str
const char* const unreachable_member_on_group_str |
Initial value:=
"All members in the group must be reachable."