1 #ifndef BACKUP_INCLUDED
2 #define BACKUP_INCLUDED
3 /* Copyright (c) 2018, MariaDB Corporation
4 
5    This program is free software; you can redistribute it and/or modify
6    it under the terms of the GNU General Public License as published by
7    the Free Software Foundation; version 2 of the License.
8 
9    This program is distributed in the hope that it will be useful,
10    but WITHOUT ANY WARRANTY; without even the implied warranty of
11    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12    GNU General Public License for more details.
13 
14    You should have received a copy of the GNU General Public License
15    along with this program; if not, write to the Free Software
16    Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301  USA */
17 
18 enum backup_stages
19 {
20   BACKUP_START, BACKUP_FLUSH, BACKUP_WAIT_FOR_FLUSH, BACKUP_LOCK_COMMIT,
21   BACKUP_END, BACKUP_FINISHED
22 };
23 
24 extern TYPELIB backup_stage_names;
25 
26 void backup_init();
27 bool run_backup_stage(THD *thd, backup_stages stage);
28 bool backup_end(THD *thd);
29 void backup_set_alter_copy_lock(THD *thd, TABLE *altered_table);
30 bool backup_reset_alter_copy_lock(THD *thd);
31 
32 bool backup_lock(THD *thd, TABLE_LIST *table);
33 void backup_unlock(THD *thd);
34 #endif /* BACKUP_INCLUDED */
35