summaryrefslogtreecommitdiff
path: root/sql/sql_repl.cc
diff options
context:
space:
mode:
authorBrandon Nesterenko <brandon.nesterenko@mariadb.com>2021-06-14 18:38:31 -0600
committerBrandon Nesterenko <brandon.nesterenko@mariadb.com>2021-06-14 18:38:31 -0600
commitdd0e62b34d2e409e2c8430c718dc005a58d6792e (patch)
treeb922732ecd08dd61a88034a42499f42d6d2c15fc /sql/sql_repl.cc
parent75a65d3201a4486af96cf3277b6c5a4ba460eef7 (diff)
downloadmariadb-git-10.3-MDEV-20219.tar.gz
MDEV-20219: PURGE BINARY LOGS does not always purge10.3-MDEV-20219
THIS COMMIT IS FOR DEMONSTRATION ONLY PURGE BINARY LOGS (as intended) does not purge logs that are open. When one thread is reading the logs, for example via SHOW BINLOG EVENTS, then an issued PURGE command will not delete the log while it is open by SHOW. This commit provides a test/result to demonstrate this behavior. With respect to MDEV-20219, the code inside of the backup utility has a comment before purging stating //be carefull with this step if you have slaves! which leads me to believe this issue is due to the above behavior.
Diffstat (limited to 'sql/sql_repl.cc')
-rw-r--r--sql/sql_repl.cc2
1 files changed, 2 insertions, 0 deletions
diff --git a/sql/sql_repl.cc b/sql/sql_repl.cc
index 389346e389d..6c16e5b6c46 100644
--- a/sql/sql_repl.cc
+++ b/sql/sql_repl.cc
@@ -4015,6 +4015,8 @@ bool mysql_show_binlog_events(THD* thd)
thd->current_linfo= &linfo;
+ DEBUG_SYNC(thd, "show_binlog_events_got_linfo");
+
if ((file=open_binlog(&log, linfo.log_file_name, &errmsg)) < 0)
goto err;