Skip to content

Commit ea108b1

Browse files
committed
Merge 8.4 -> trunk
2 parents 7c7af65 + 5b53174 commit ea108b1

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

sql/binlog_index.cc

+3-2
Original file line numberDiff line numberDiff line change
@@ -768,7 +768,7 @@ void Binlog_index::adjust_linfo_offsets(my_off_t purge_offset) {
768768
}
769769

770770
Binlog_index_monitor::Binlog_index_monitor(bool relay_log)
771-
: m_binlog_index(relay_log) {}
771+
: m_binlog_index(relay_log), m_is_relay_log(relay_log) {}
772772

773773
void Binlog_index_monitor::set_psi_keys(PSI_mutex_key key_LOCK_index,
774774
PSI_file_key key_file_log_index,
@@ -972,7 +972,8 @@ int Binlog_index_monitor::purge_index_entry(THD *thd,
972972
@todo: This is weird, what does NDB errors have to do with
973973
need_lock_index? Explain better or refactor /Sven
974974
*/
975-
ha_binlog_index_purge_file(current_thd, log_info.log_file_name);
975+
if (!m_is_relay_log)
976+
ha_binlog_index_purge_file(current_thd, log_info.log_file_name);
976977
}
977978

978979
DBUG_PRINT("info", ("purging %s", log_info.log_file_name));

sql/binlog_index.h

+2-1
Original file line numberDiff line numberDiff line change
@@ -322,7 +322,7 @@ class Binlog_index {
322322
IO_CACHE purge_index_file;
323323
char purge_index_file_name[FN_REFLEN];
324324

325-
bool is_relay_log;
325+
const bool is_relay_log;
326326
/**
327327
Set of log info objects that are in usage and might prevent some other
328328
operations from executing.
@@ -562,6 +562,7 @@ class Binlog_index_monitor {
562562
/** POSIX thread objects are inited by init_pthread_objects() */
563563
mysql_mutex_t m_LOCK_index;
564564
Binlog_index m_binlog_index;
565+
const bool m_is_relay_log;
565566
};
566567

567568
#endif /* BINLOG_INDEX_H_INCLUDED */

0 commit comments

Comments
 (0)