From 2fb17005e0d4b5d3c3c53d817e2be1c899a94e59 Mon Sep 17 00:00:00 2001 From: Zsolt Parragi Date: Mon, 26 Mar 2018 11:14:11 +0200 Subject: [PATCH] PS-3925: Use strncmp instead of memcmp in log_in_use (cherry picked from commit 2c950c3ca2bf890549825417c10dd3065b78befc) --- sql/binlog.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sql/binlog.cc b/sql/binlog.cc index 29b6f27b710..83fc43f51da 100644 --- a/sql/binlog.cc +++ b/sql/binlog.cc @@ -2022,7 +2022,7 @@ static int log_in_use(const char* log_name) if ((linfo = (*it)->current_linfo)) { mysql_mutex_lock(&linfo->lock); - if(!memcmp(log_name, linfo->log_file_name, log_name_len)) + if(!strncmp(log_name, linfo->log_file_name, log_name_len)) { thread_count++; sql_print_warning("file %s was not purged because it was being read"