1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-30 16:24:05 +03:00

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
This commit is contained in:
Sergei Golubchik
2021-02-12 17:44:22 +01:00
309 changed files with 21633 additions and 3317 deletions

View File

@ -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 */