From: Date: October 19 2007 2:02pm Subject: bk commit into 5.1 tree (aelkin:1.2578) BUG#28597 List-Archive: http://lists.mysql.com/commits/35912 X-Bug: 28597 Message-Id: <200710191202.l9JC2Jae021260@dsl-hkibras1-ff5fc300-23.dhcp.inet.fi> Below is the list of changes that have just been committed into a local 5.1 repository of elkin. When elkin does a push these changes will be propagated to the main repository and, within 24 hours after the push, to the public repository. For information on how to access the public repository see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html ChangeSet@stripped, 2007-10-19 15:02:10+03:00, aelkin@stripped +1 -0 Bug #28597 Replication doesn't start after upgrading to 5.1.18 Since bug@20166 that replaced the binlog file name generating to favor pidfile_name instead of the previous glob_hostname generated names started to be written in the absolute path format. Fixed with stripping off the directory part of a generated name that also terminates a pending TODO. sql/log.cc@stripped, 2007-10-19 15:02:04+03:00, aelkin@stripped +6 -5 generating bin-log file name as relative path. Using make_default_log_name pattern to eliminate a pending TODO in MYSQL_LOG::generate_name. diff -Nrup a/sql/log.cc b/sql/log.cc --- a/sql/log.cc 2007-10-12 10:31:59 +03:00 +++ b/sql/log.cc 2007-10-19 15:02:04 +03:00 @@ -2166,13 +2166,14 @@ const char *MYSQL_LOG::generate_name(con { if (!log_name || !log_name[0]) { + DBUG_ASSERT(strlen(suffix) <= 4); // avoids overrun /* - TODO: The following should be using fn_format(); We just need to - first change fn_format() to cut the file name if it's too long. + generating in style of make_default_log_name */ - strmake(buff, pidfile_name, FN_REFLEN - 5); - strmov(fn_ext(buff), suffix); - return (const char *)buff; + strmake(buff, pidfile_name, FN_REFLEN-5); + return (const char *) + fn_format(buff, buff, "", suffix, + MYF(MY_UNPACK_FILENAME|MY_REPLACE_EXT|MY_REPLACE_DIR)); } // get rid of extension if the log is binary to avoid problems if (strip_ext)