From: Date: November 14 2008 3:49pm Subject: bzr commit into mysql-6.0-backup branch (Rafal.Somla:2733) Bug#40262 List-Archive: http://lists.mysql.com/commits/58795 X-Bug: 40262 Message-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit #At file:///ext/mysql/bzr/backup/bug40262/ 2733 Rafal Somla 2008-11-14 BUG#40262 (Binary log information incorrect in backup of no data with binlog turned on) This is a preliminary patch which fixes a problem in si_log.h which leads to a carash reported in the bug. According to specifications, methods Backup_log::binlog_file() and Backup_log::master_binlog_file() should do nothing if NULL string is passed as the argument. But they crashed instead (due to a call to strlen() on NULL string). This patch fixes this. modified: sql/si_logs.h === modified file 'sql/si_logs.h' --- a/sql/si_logs.h 2008-10-30 17:53:24 +0000 +++ b/sql/si_logs.h 2008-11-14 14:49:09 +0000 @@ -201,7 +201,7 @@ void Backup_log::stop(time_t when) inline void Backup_log::binlog_file(char *file) { - if (strlen(file) > 0) + if (file && strlen(file) > 0) m_op_hist.binlog_file= file; } @@ -217,7 +217,7 @@ void Backup_log::binlog_file(char *file) inline void Backup_log::master_binlog_file(char *file) { - if (strlen(file) > 0) + if (file && strlen(file) > 0) m_op_hist.master_binlog_file= file; }