Skip to content

Commit fc2ed1d

Browse files
committed
Merge branch 'mysql-8.0' into mysql-8.4
Change-Id: I586d2cf3e7cb0e458f8b5b0f1761b10e4ee536ee
2 parents 64f6c78 + 627ae8c commit fc2ed1d

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

storage/innobase/clone/clone0repl.cc

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -632,6 +632,12 @@ void Clone_persist_gtid::periodic_write() {
632632
os_event_reset(m_event);
633633
/* Write accumulated GTIDs to disk table */
634634
flush_gtids(thd);
635+
/* Memory is allocated from thd->memroot to store the information about the
636+
table being locked for flushing gtids. In this case, being a background
637+
thread which is flushing the gtids every 100 millisecond, we should release
638+
the memory after every cycle of flushing gtids to avoid memory growth in
639+
Clone_persist_gtid thread .*/
640+
thd->mem_root->ClearForReuse();
635641
}
636642

637643
/* For slow shutdown, consume remaining GTIDs so that undo can be purged. */

0 commit comments

Comments
 (0)