Skip to content

Commit

Permalink
PS-3925: Use strncmp instead of memcmp in log_in_use
Browse files Browse the repository at this point in the history
(cherry picked from commit 2c950c3)
  • Loading branch information
dutow committed Mar 26, 2018
1 parent 7cc1488 commit 2fb1700
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion sql/binlog.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit 2fb1700

Please sign in to comment.