mirror of
https://github.com/MariaDB/server.git
synced 2025-10-12 12:25:37 +03:00
Added backup handler calls
Part of MDEV-5336 Implement LOCK FOR BACKUP Added support for backup calls in Aria to protect removal of redo logs.
This commit is contained in:
@@ -822,6 +822,43 @@ void ha_kill_query(THD* thd, enum thd_kill_levels level)
|
||||
}
|
||||
|
||||
|
||||
/*****************************************************************************
|
||||
Backup functions
|
||||
******************************************************************************/
|
||||
|
||||
static my_bool plugin_prepare_for_backup(THD *unused1, plugin_ref plugin,
|
||||
void *not_used)
|
||||
{
|
||||
handlerton *hton= plugin_hton(plugin);
|
||||
if (hton->state == SHOW_OPTION_YES && hton->prepare_for_backup)
|
||||
hton->prepare_for_backup();
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
void ha_prepare_for_backup()
|
||||
{
|
||||
plugin_foreach_with_mask(0, plugin_prepare_for_backup,
|
||||
MYSQL_STORAGE_ENGINE_PLUGIN,
|
||||
PLUGIN_IS_DELETED|PLUGIN_IS_READY, 0);
|
||||
}
|
||||
|
||||
static my_bool plugin_end_backup(THD *unused1, plugin_ref plugin,
|
||||
void *not_used)
|
||||
{
|
||||
handlerton *hton= plugin_hton(plugin);
|
||||
if (hton->state == SHOW_OPTION_YES && hton->end_backup)
|
||||
hton->end_backup();
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
void ha_end_backup()
|
||||
{
|
||||
plugin_foreach_with_mask(0, plugin_end_backup,
|
||||
MYSQL_STORAGE_ENGINE_PLUGIN,
|
||||
PLUGIN_IS_DELETED|PLUGIN_IS_READY, 0);
|
||||
}
|
||||
|
||||
|
||||
/* ========================================================================
|
||||
======================= TRANSACTIONS ===================================*/
|
||||
|
||||
|
Reference in New Issue
Block a user