From f5aba2fc28970136803b4d45a5dc8e6ea17e8199 Mon Sep 17 00:00:00 2001 From: Laurynas Biveinis Date: Thu, 10 Oct 2024 16:45:35 +0300 Subject: [PATCH] Re-enable the saving of InnoDB dynamic metadata during clone This fixes the metadata going out of sync on 8.0.36. --- storage/innobase/clone/clone0copy.cc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/storage/innobase/clone/clone0copy.cc b/storage/innobase/clone/clone0copy.cc index 60546a02edec..d14e32af9405 100644 --- a/storage/innobase/clone/clone0copy.cc +++ b/storage/innobase/clone/clone0copy.cc @@ -537,16 +537,16 @@ int Clone_Snapshot::init_redo_copy(Snapshot_State new_state, binlog_error = synchronize_binlog_gtid(cbk); } +#else + int binlog_error = 0; +#endif + /* Save all dynamic metadata to DD buffer table and let all future operations to save data immediately after generation. This makes clone recovery independent of dynamic metadata stored in redo log and avoids generating redo log during recovery. */ dict_persist_t::Enable_immediate dyn_metadata_guard(dict_persist); -#else - int binlog_error = 0; -#endif - /* Use it only for local clone. For remote clone, donor session is different from the sessions created within mtr test case. */ DEBUG_SYNC_C("clone_donor_after_saving_dynamic_metadata");