27#ifndef BACKUP_PAGE_TRACKER_SERVICE_H
28#define BACKUP_PAGE_TRACKER_SERVICE_H
38#define MYSQL_THD THD *
40#define MYSQL_THD void *
43#define CHANGED_PAGES_BUFFER_SIZE (16 * 1024 * 1024)
49 size_t buffer_length,
int page_count,
void *context);
87 unsigned char *is_null,
88 unsigned char *
error);
95 unsigned char *is_null,
96 unsigned char *
error);
103 unsigned char *is_null,
104 unsigned char *
error);
112 unsigned char *is_null,
113 unsigned char *
error);
118 unsigned char *is_null,
119 unsigned char *
error);
#define MYSQL_THD
Definition: backup_page_tracker.h:38
int page_track_callback(MYSQL_THD opaque_thd, const uchar *buffer, size_t buffer_length, int page_count, void *context)
Callback method from InnoDB page-tracking to return the changed pages.
Definition: backup_page_tracker.cc:507
REQUIRES_SERVICE_PLACEHOLDER(mysql_page_track)
Definition: backup_page_tracker.h:70
static void page_track_get_changed_page_count_deinit(UDF_INIT *initid)
Callback method for initialization of UDF "mysqlbackup_page_track_get_changed_page_count".
Definition: backup_page_tracker.cc:299
static void page_track_get_start_lsn_deinit(UDF_INIT *initid)
Callback method for initialization of UDF "mysqlbackup_page_track_get_start_lsn".
Definition: backup_page_tracker.cc:255
static uchar * m_changed_pages_buf
Definition: backup_page_tracker.h:72
static void page_track_purge_up_to_deinit(UDF_INIT *initid)
Callback method for deinitialization of UDF "mysqlbackup_page_track_purge_up_to".
Definition: backup_page_tracker.cc:459
static void page_track_get_changed_pages_deinit(UDF_INIT *initid)
Callback method for initialization of UDF "mysqlbackup_page_track_get_changed_pages".
Definition: backup_page_tracker.cc:350
static long long page_track_get_start_lsn(UDF_INIT *initid, UDF_ARGS *, unsigned char *is_null, unsigned char *error)
UDF for "mysqlbackup_page_track_get_start_lsn" See include/mysql/udf_registration_types....
Definition: backup_page_tracker.cc:264
static bool page_track_get_changed_page_count_init(UDF_INIT *initid, UDF_ARGS *, char *)
Callback function for initialization of UDF "mysqlbackup_page_track_get_changed_page_count".
Definition: backup_page_tracker.cc:289
static mysql_service_status_t register_udfs()
Register backup page-track UDFs.
Definition: backup_page_tracker.cc:114
static bool m_receive_changed_page_data
Definition: backup_page_tracker.h:77
static void deinit()
Method to de-allocate the memory allocated for the buffer holding path value for the page-track file,...
Definition: backup_page_tracker.cc:64
static void initialize_udf_list()
Make a list of the UDFs exposed by mysqlbackup page_tracking.
Definition: backup_page_tracker.cc:74
static long long page_track_get_changed_pages(UDF_INIT *initid, UDF_ARGS *, unsigned char *is_null, unsigned char *error)
UDF for "mysqlbackup_page_track_get_changed_pages" See include/mysql/udf_registration_types....
Definition: backup_page_tracker.cc:362
static bool page_track_purge_up_to_init(UDF_INIT *initid, UDF_ARGS *, char *)
Callback function for initialization of UDF "mysqlbackup_page_track_purge_up_to".
Definition: backup_page_tracker.cc:441
static std::list< udf_data_t * > m_udf_list
Definition: backup_page_tracker.h:73
static bool page_track_get_start_lsn_init(UDF_INIT *initid, UDF_ARGS *, char *)
Callback function for initialization of UDF "mysqlbackup_page_track_get_start_lsn".
Definition: backup_page_tracker.cc:246
static long long page_track_purge_up_to(UDF_INIT *initid, UDF_ARGS *, unsigned char *is_null, unsigned char *error)
UDF for "mysqlbackup_page_track_purge_up_to" See include/mysql/udf_registration_types....
Definition: backup_page_tracker.cc:474
static void set_page_tracking_deinit(UDF_INIT *initid)
Callback method for initialization of UDF "mysqlbackup_page_track_set".
Definition: backup_page_tracker.cc:202
static mysql_service_status_t unregister_udfs()
Un-Register backup page-track UDFs.
Definition: backup_page_tracker.cc:157
static long long set_page_tracking(UDF_INIT *initid, UDF_ARGS *, unsigned char *is_null, unsigned char *error)
UDF for "mysqlbackup_page_track_set" See include/mysql/udf_registration_types.h.
Definition: backup_page_tracker.cc:211
static long long page_track_get_changed_page_count(UDF_INIT *initid, UDF_ARGS *, unsigned char *is_null, unsigned char *error)
UDF for "mysqlbackup_page_track_get_changed_page_count" See include/mysql/udf_registration_types....
Definition: backup_page_tracker.cc:308
static bool set_page_tracking_init(UDF_INIT *initid, UDF_ARGS *, char *)
Callback function for initialization of UDF "mysqlbackup_page_track_set".
Definition: backup_page_tracker.cc:194
static char * m_changed_pages_file
Definition: backup_page_tracker.h:78
static bool page_track_get_changed_pages_init(UDF_INIT *initid, UDF_ARGS *, char *)
Callback function for initialization of UDF "mysqlbackup_page_track_get_changed_pages".
Definition: backup_page_tracker.cc:339
static bool backup_id_update()
Definition: backup_page_tracker.cc:49
For each client connection we create a separate thread with THD serving as a thread/connection descri...
Definition: sql_lexer_thd.h:34
unsigned char uchar
Definition: my_inttypes.h:52
mutable_buffer buffer(void *p, size_t n) noexcept
Definition: buffer.h:420
int mysql_service_status_t
Specific type for the service status return values.
Definition: service.h:34
case opt name
Definition: sslopt-case.h:33
Definition: udf_registration_types.h:48
Information about the result of a user defined function.
Definition: udf_registration_types.h:66
Contains all the necessary data to register an UDF in MySQL.
Definition: backup_page_tracker.h:51
Item_result m_return_type
Definition: backup_page_tracker.h:53
udf_data_t(const std::string name, Item_result return_type, Udf_func_any function, Udf_func_init init_function, Udf_func_deinit deinit_function)
Definition: backup_page_tracker.h:59
bool m_is_registered
Definition: backup_page_tracker.h:57
std::string m_name
Definition: backup_page_tracker.h:52
Udf_func_init m_init_function
Definition: backup_page_tracker.h:55
Udf_func_deinit m_deinit_function
Definition: backup_page_tracker.h:56
Udf_func_any m_function
Definition: backup_page_tracker.h:54
void(* Udf_func_deinit)(UDF_INIT *)
Definition: udf_registration_types.h:80
Item_result
Type of the user defined function return slot and arguments.
Definition: udf_registration_types.h:39
bool(* Udf_func_init)(UDF_INIT *, UDF_ARGS *, char *)
Definition: udf_registration_types.h:81
void(* Udf_func_any)(void)
Definition: udf_registration_types.h:82