![]()  | 
  
    MySQL 8.4.7
    
   Source Code Documentation 
   | 
 
#include "mysqlbackup.h"#include <atomic>#include "backup_comp_constants.h"#include "backup_page_tracker.h"#include "mysql/components/library_mysys/my_memory.h"#include "mysql/components/services/psi_memory.h"#include "mysql/service_security_context.h"#include "mysqld_error.h"#include "string_with_len.h"Functions | |
| bool | have_backup_admin_privilege (void *opaque_thd) | 
| Method to check if the current user has got backup privilege.  More... | |
| mysql_service_status_t | register_udfs () | 
| Register UDF(s)  More... | |
| mysql_service_status_t | unregister_udfs () | 
| Unregister UDF(s)  More... | |
| static bool | register_status_variables () | 
| Register the server status variables defined by this component.  More... | |
| static bool | unregister_status_variables () | 
| Unregister the server status variables defined by this component.  More... | |
| static int | mysqlbackup_backup_id_check (MYSQL_THD thd, SYS_VAR *self, void *save, struct st_mysql_value *value) | 
| Method to set the system variable "mysqlbackup.backupid".  More... | |
| static void | mysqlbackup_backup_id_update (MYSQL_THD, SYS_VAR *, void *var_ptr, const void *save) | 
| Update function for mysqlbackup_backup_id.  More... | |
| static bool | register_system_variables () | 
| Register the server system variables defined by this component.  More... | |
| static bool | unregister_system_variables () | 
| Unregister the server system variables defined by this component.  More... | |
| static bool | initialize_log_service () | 
| Initialize logging service.  More... | |
| static bool | deinitialize_log_service () | 
| Deinitialize logging service.  More... | |
| mysql_service_status_t | mysqlbackup_init () | 
| Initialize the component when loading the component.  More... | |
| mysql_service_status_t | mysqlbackup_deinit () | 
| Deinitialize the component when unloading the component.  More... | |
| END_COMPONENT_PROVIDES () | |
| This component does not provide any services.  More... | |
| REQUIRES_SERVICE_PLACEHOLDER (log_builtins) | |
| A block for specifying dependencies of this Component.  More... | |
| REQUIRES_SERVICE_PLACEHOLDER (log_builtins_string) | |
| REQUIRES_SERVICE_PLACEHOLDER (component_sys_variable_register) | |
| REQUIRES_SERVICE_PLACEHOLDER (component_sys_variable_unregister) | |
| REQUIRES_SERVICE_PLACEHOLDER (status_variable_registration) | |
| REQUIRES_SERVICE_PLACEHOLDER (udf_registration) | |
| REQUIRES_SERVICE_PLACEHOLDER (mysql_thd_security_context) | |
| REQUIRES_SERVICE_PLACEHOLDER (mysql_runtime_error) | |
| REQUIRES_SERVICE_PLACEHOLDER (mysql_security_context_options) | |
| REQUIRES_SERVICE_PLACEHOLDER (mysql_page_track) | |
| REQUIRES_SERVICE_PLACEHOLDER (global_grants_check) | |
| REQUIRES_SERVICE_PLACEHOLDER (mysql_current_thread_reader) | |
| REQUIRES_SERVICE_PLACEHOLDER (psi_memory_v2) | |
| REQUIRES_SERVICE (registry) | |
| A list of dependencies.  More... | |
| REQUIRES_SERVICE (log_builtins) | |
| REQUIRES_SERVICE (log_builtins_string) | |
| REQUIRES_SERVICE (component_sys_variable_register) | |
| REQUIRES_SERVICE (component_sys_variable_unregister) | |
| REQUIRES_SERVICE (status_variable_registration) | |
| REQUIRES_SERVICE (udf_registration) | |
| REQUIRES_SERVICE (mysql_thd_security_context) | |
| REQUIRES_SERVICE (mysql_runtime_error) | |
| REQUIRES_SERVICE (mysql_security_context_options) | |
| REQUIRES_SERVICE (mysql_page_track) | |
| REQUIRES_SERVICE (global_grants_check) | |
| REQUIRES_SERVICE (mysql_current_thread_reader) | |
| REQUIRES_SERVICE (psi_memory_v2) | |
| END_COMPONENT_REQUIRES () | |
| METADATA ("mysql.mysqlbackup", "Oracle Corporation") | |
| A list of metadata to describe the Component.  More... | |
| METADATA ("mysql.license", "Commercial") | |
| END_COMPONENT_METADATA () | |
Variables | |
| static char * | mysqlbackup_component_version {nullptr} | 
| This file contains a definition of the mysqlbackup component.  More... | |
| char * | mysqlbackup_backup_id = nullptr | 
| static std::atomic< bool > | mysqlbackup_component_sys_var_registered {false} | 
| static SHOW_VAR | mysqlbackup_status_variables [] | 
| const mysql_service_log_builtins_t * | log_bi | 
| Types for the logging service.  More... | |
| const mysql_service_log_builtins_string_t * | log_bs | 
| string built-ins  More... | |
| mysql_component_t | mysql_component_mysqlbackup | 
| Declaration of the Component.  More... | |
      
  | 
  static | 
Deinitialize logging service.
| false | success | 
| true | failure | 
| END_COMPONENT_METADATA | ( | ) | 
| END_COMPONENT_PROVIDES | ( | ) | 
This component does not provide any services.
| END_COMPONENT_REQUIRES | ( | ) | 
| bool have_backup_admin_privilege | ( | void * | opaque_thd | ) | 
Method to check if the current user has got backup privilege.
| [in] | opaque_thd | Current thread context. | 
| false | otherwise | 
      
  | 
  static | 
Initialize logging service.
| false | success | 
| true | failure | 
| METADATA | ( | "mysql.license" | , | 
| "Commercial" | |||
| ) | 
| METADATA | ( | "mysql.mysqlbackup" | , | 
| "Oracle Corporation" | |||
| ) | 
A list of metadata to describe the Component.
      
  | 
  static | 
Method to set the system variable "mysqlbackup.backupid".
Will check if the user has SUPER or BACKUP_ADMIN privilege.
| 0 | on success, errorno on failure | 
      
  | 
  static | 
Update function for mysqlbackup_backup_id.
| mysql_service_status_t mysqlbackup_deinit | ( | ) | 
Deinitialize the component when unloading the component.
| 0 | success | 
| non-zero | failure | 
| mysql_service_status_t mysqlbackup_init | ( | ) | 
Initialize the component when loading the component.
| 0 | success | 
| non-zero | failure | 
      
  | 
  static | 
Register the server status variables defined by this component.
| false | success | 
| true | failure | 
      
  | 
  static | 
Register the server system variables defined by this component.
| false | success | 
| true | failure | 
| mysql_service_status_t register_udfs | ( | ) | 
Register UDF(s)
Registers the plugin's UDFs.
| 0 | success | 
| non-zero | failure | 
| REQUIRES_SERVICE | ( | component_sys_variable_register | ) | 
| REQUIRES_SERVICE | ( | component_sys_variable_unregister | ) | 
| REQUIRES_SERVICE | ( | global_grants_check | ) | 
| REQUIRES_SERVICE | ( | log_builtins | ) | 
| REQUIRES_SERVICE | ( | log_builtins_string | ) | 
| REQUIRES_SERVICE | ( | mysql_current_thread_reader | ) | 
| REQUIRES_SERVICE | ( | mysql_page_track | ) | 
| REQUIRES_SERVICE | ( | mysql_runtime_error | ) | 
| REQUIRES_SERVICE | ( | mysql_security_context_options | ) | 
| REQUIRES_SERVICE | ( | mysql_thd_security_context | ) | 
| REQUIRES_SERVICE | ( | psi_memory_v2 | ) | 
| REQUIRES_SERVICE | ( | registry | ) | 
A list of dependencies.
The dynamic_loader fetches the references for the below services at the component load time and disposes off them at unload.
| REQUIRES_SERVICE | ( | status_variable_registration | ) | 
| REQUIRES_SERVICE | ( | udf_registration | ) | 
| REQUIRES_SERVICE_PLACEHOLDER | ( | component_sys_variable_register | ) | 
| REQUIRES_SERVICE_PLACEHOLDER | ( | component_sys_variable_unregister | ) | 
| REQUIRES_SERVICE_PLACEHOLDER | ( | global_grants_check | ) | 
| REQUIRES_SERVICE_PLACEHOLDER | ( | log_builtins | ) | 
A block for specifying dependencies of this Component.
Note that for each dependency we need to have a placeholder, a extern to placeholder in header file of the Component, and an entry on requires list below.
| REQUIRES_SERVICE_PLACEHOLDER | ( | log_builtins_string | ) | 
| REQUIRES_SERVICE_PLACEHOLDER | ( | mysql_current_thread_reader | ) | 
| REQUIRES_SERVICE_PLACEHOLDER | ( | mysql_page_track | ) | 
| REQUIRES_SERVICE_PLACEHOLDER | ( | mysql_runtime_error | ) | 
| REQUIRES_SERVICE_PLACEHOLDER | ( | mysql_security_context_options | ) | 
| REQUIRES_SERVICE_PLACEHOLDER | ( | mysql_thd_security_context | ) | 
| REQUIRES_SERVICE_PLACEHOLDER | ( | psi_memory_v2 | ) | 
| REQUIRES_SERVICE_PLACEHOLDER | ( | status_variable_registration | ) | 
| REQUIRES_SERVICE_PLACEHOLDER | ( | udf_registration | ) | 
      
  | 
  static | 
Unregister the server status variables defined by this component.
| false | success | 
| true | failure | 
      
  | 
  static | 
Unregister the server system variables defined by this component.
| false | success | 
| true | failure | 
| mysql_service_status_t unregister_udfs | ( | ) | 
Unregister UDF(s)
Unregisters the plugin's UDFs.
| 0 | success | 
| non-zero | failure | 
| const mysql_service_log_builtins_t* log_bi | 
Types for the logging service.
accessor built-ins
| const mysql_service_log_builtins_string_t* log_bs | 
string built-ins
| mysql_component_t mysql_component_mysqlbackup | 
Declaration of the Component.
| char* mysqlbackup_backup_id = nullptr | 
      
  | 
  static | 
      
  | 
  static | 
This file contains a definition of the mysqlbackup component.
      
  | 
  static |