commit e437a4fc345ca8e48f0cf77ebf450d32ec2a8aa1 Author: Zsolt Parragi Date: Mon Mar 26 11:14:11 2018 +0200 Fix bug 90238 / PS-3925 (Use strncmp instead of memcmp in log_in_use) (cherry picked from commit 2c950c3ca2bf890549825417c10dd3065b78befc) (cherry picked from commit 2fb17005e0d4b5d3c3c53d817e2be1c899a94e59) (cherry picked from commit 96f907bb235455521a11992675cdf12c9508d822) diff --git a/sql/binlog.cc b/sql/binlog.cc index ef99c2450f0..233e5a31664 100644 --- a/sql/binlog.cc +++ b/sql/binlog.cc @@ -2719,7 +2719,7 @@ class Log_in_use : public Do_THD_Impl { LOG_INFO *linfo; mysql_mutex_lock(&thd->LOCK_thd_data); if ((linfo = thd->current_linfo)) { - if (!memcmp(m_log_name, linfo->log_file_name, m_log_name_len)) { + if (!strncmp(m_log_name, linfo->log_file_name, m_log_name_len)) { LogErr(WARNING_LEVEL, ER_BINLOG_FILE_BEING_READ_NOT_PURGED, m_log_name, thd->thread_id()); m_count++;