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

Merge branch '10.2' into 10.3

This commit is contained in:
Sergei Golubchik
2021-02-01 13:49:33 +01:00
261 changed files with 20978 additions and 2998 deletions

View File

@ -4585,5 +4585,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 */