diff options
author | Sergei Golubchik <serg@mariadb.org> | 2021-02-12 17:44:22 +0100 |
---|---|---|
committer | Sergei Golubchik <serg@mariadb.org> | 2021-02-12 17:44:22 +0100 |
commit | 00a313ecf329098d4b31a42030b9b5c6f80a6031 (patch) | |
tree | f4983a6629b04563c48fa7276686dfc2187efb5f /sql/sql_repl.cc | |
parent | ef5adf520760536c7396bdfe884fc509ac065694 (diff) | |
parent | 691f93d6d17603f11a0c90f64e94b7ce9d187db4 (diff) | |
download | mariadb-git-00a313ecf329098d4b31a42030b9b5c6f80a6031.tar.gz |
Merge branch 'bb-10.3-release' into bb-10.4-release
Note, the fix for "MDEV-23328 Server hang due to Galera lock conflict resolution"
was null-merged. 10.4 version of the fix is coming up separately
Diffstat (limited to 'sql/sql_repl.cc')
-rw-r--r-- | sql/sql_repl.cc | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/sql/sql_repl.cc b/sql/sql_repl.cc index 5203e0f52a5..622eff2faae 100644 --- a/sql/sql_repl.cc +++ b/sql/sql_repl.cc @@ -4685,5 +4685,22 @@ rpl_gtid_pos_update(THD *thd, char *str, size_t len) return false; } +int compare_log_name(const char *log_1, const char *log_2) { + int res= 1; + const char *ext1_str= strrchr(log_1, '.'); + const char *ext2_str= strrchr(log_2, '.'); + char file_name_1[255], file_name_2[255]; + strmake(file_name_1, log_1, (ext1_str - log_1)); + strmake(file_name_2, log_2, (ext2_str - log_2)); + char *endptr = NULL; + res= strcmp(file_name_1, file_name_2); + if (!res) + { + ulong ext1= strtoul(++ext1_str, &endptr, 10); + ulong ext2= strtoul(++ext2_str, &endptr, 10); + res= (ext1 > ext2 ? 1 : ((ext1 == ext2) ? 0 : -1)); + } + return res; +} #endif /* HAVE_REPLICATION */ |