summaryrefslogtreecommitdiff
path: root/sql/backup.h
diff options
context:
space:
mode:
authorMonty <monty@mariadb.org>2021-03-30 17:06:55 +0300
committerSergei Golubchik <serg@mariadb.org>2021-05-19 22:54:13 +0200
commit83e529eced51aa965805e894349bbadd26881f3f (patch)
tree2f13b79cf5648498ee709424ea37105be730fcf3 /sql/backup.h
parent496a14e18714ac3f0b686ec5f57bf88e96512d2f (diff)
downloadmariadb-git-83e529eced51aa965805e894349bbadd26881f3f.tar.gz
MDEV-18465 Logging of DDL statements during backup
Many of the changes was needed to be able to collect and print engine name and table version id's in the ddl log.
Diffstat (limited to 'sql/backup.h')
-rw-r--r--sql/backup.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/sql/backup.h b/sql/backup.h
index 8d8a28b6082..2e5c3a58ba2 100644
--- a/sql/backup.h
+++ b/sql/backup.h
@@ -23,6 +23,18 @@ enum backup_stages
extern TYPELIB backup_stage_names;
+struct backup_log_info {
+ LEX_CSTRING query;
+ LEX_CUSTRING org_table_id; /* Unique id from frm */
+ LEX_CSTRING org_database, org_table;
+ LEX_CSTRING org_storage_engine_name;
+ LEX_CSTRING new_database, new_table;
+ LEX_CSTRING new_storage_engine_name;
+ LEX_CUSTRING new_table_id; /* Unique id from frm */
+ bool org_partitioned;
+ bool new_partitioned;
+};
+
void backup_init();
bool run_backup_stage(THD *thd, backup_stages stage);
bool backup_end(THD *thd);
@@ -31,4 +43,5 @@ bool backup_reset_alter_copy_lock(THD *thd);
bool backup_lock(THD *thd, TABLE_LIST *table);
void backup_unlock(THD *thd);
+void backup_log_ddl(const backup_log_info *info);
#endif /* BACKUP_INCLUDED */