diff --git a/plugin/semisync/semisync_source.cc b/plugin/semisync/semisync_source.cc index f62e17b3255..f1589c672fc 100644 --- a/plugin/semisync/semisync_source.cc +++ b/plugin/semisync/semisync_source.cc @@ -124,6 +124,13 @@ unsigned int ActiveTranx::get_hash_value(const char *log_file_name, int ActiveTranx::compare(const char *log_file_name1, my_off_t log_file_pos1, const char *log_file_name2, my_off_t log_file_pos2) { + unsigned int len1 = strlen(log_file_name1); + unsigned int len2 = strlen(log_file_name2); + if (len1 > len2) + return 1; + else if (len1 < len2) + return -1; + int cmp = strcmp(log_file_name1, log_file_name2); if (cmp != 0) return cmp;