summaryrefslogtreecommitdiff
path: root/sql/sql_repl.h
diff options
context:
space:
mode:
authorSujatha <sujatha.sivakumar@mariadb.com>2021-01-07 17:34:57 +0530
committerSujatha <sujatha.sivakumar@mariadb.com>2021-01-21 13:00:02 +0530
commiteb75e8705d9a444e10057967eaebf947b1115ff8 (patch)
treee777af3b48303cf78369b5f43314a6e157517e29 /sql/sql_repl.h
parent53acd1c1d88be82190c56af3e4cc11fb2770a169 (diff)
downloadmariadb-git-eb75e8705d9a444e10057967eaebf947b1115ff8.tar.gz
MDEV-8134: The relay-log is not flushed after the slave-relay-log.999999 showed
Problem: ======== Auto purge of relaylogs stops when relay-log-file is 'slave-relay-log.999999' and slave_parallel_threads is enabled. Analysis: ========= The problem is that in Relay_log_info::inc_group_relay_log_pos() function, when two log names are compared via strcmp() function, it gives correct result, when log name sequence numbers are of same digits(6 digits), But when the number goes to 7 digits, a 999999 compares greater than 1000000, which is wrong, hence the bug. Fix: ==== Extract the numeric extension part of the file name, convert it into unsigned long and compare. Thanks to David Zhao for the contribution.
Diffstat (limited to 'sql/sql_repl.h')
-rw-r--r--sql/sql_repl.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/sql/sql_repl.h b/sql/sql_repl.h
index 8ddfa9239f6..9129aaeed5e 100644
--- a/sql/sql_repl.h
+++ b/sql/sql_repl.h
@@ -56,6 +56,7 @@ bool show_binlogs(THD* thd);
extern int init_master_info(Master_info* mi);
void kill_zombie_dump_threads(uint32 slave_server_id);
int check_binlog_magic(IO_CACHE* log, const char** errmsg);
+int compare_log_name(const char *log_1, const char *log_2);
struct LOAD_FILE_IO_CACHE : public IO_CACHE
{