List:Commits« Previous MessageNext Message »
From:Rafal Somla Date:November 14 2008 3:49pm
Subject:bzr commit into mysql-6.0-backup branch (Rafal.Somla:2733) Bug#40262
View as plain text  
#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;
 }
 

Thread
bzr commit into mysql-6.0-backup branch (Rafal.Somla:2733) Bug#40262Rafal Somla14 Nov
  • Re: bzr commit into mysql-6.0-backup branch (Rafal.Somla:2733)Bug#40262Øystein Grøvlen18 Nov