From: Date: November 5 2007 4:20pm Subject: bk commit into 5.0 tree (aelkin:1.2543) BUG#28597 List-Archive: http://lists.mysql.com/commits/37098 X-Bug: 28597 Message-Id: <200711051520.lA5FKFdf011308@koti.dsl.inet.fi> Below is the list of changes that have just been committed into a local 5.0 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-11-05 17:20:10+02:00, aelkin@stripped +3 -0 Bug #28597 Replication doesn't start after upgrading to 5.1.18 Since bug@20166, which replaced the binlog file name generating to base on pidfile_name instead of the previous glob_hostname, the binlog file name suddenly started to be stored solely in the absolute path format, including a case when --log-bin option meant a relative path. What's more serious, the path for binlog file can lead unrequestedly to pid-file directory so that after any proper fix for this bug there might be similar to the bug report consequences for one who upgrades from post-fix-bug@20166-pre-fix-bug@28597 to post-fix-bug@28597. Fixed with preserving`pidfile_name' (intr.by bug@20166) but stripping off its directory part. This restores the original logics of storing the names in compatible with --log-bin option format and with the requirement for --log-bin ralative path to corresond to the data directory. Side effects for this fix: effective fixing bug@27070, refining its test; ensuring no overrun for buff can happen anymore (Bug#31836 insufficient space reserved for the suffix of relay log file name); bug#31837 --remove_file $MYSQLTEST_VARDIR/tmp/bug14157.sql missed in rpl_temporary.test; fixes Bug@28603 Invalid log-bin default location; mysql-test/t/rpl_dual_pos_advance.test@stripped, 2007-11-05 17:20:08+02:00, aelkin@stripped +0 -6 After correcting the logics of log file name composing workaround for Bug #27070 server logs are created unrequested and in wrong directory is removed. mysql-test/t/rpl_temporary.test@stripped, 2007-11-05 17:20:08+02:00, aelkin@stripped +2 -0 remaining temp file of the test removed sql/log.cc@stripped, 2007-11-05 17:20:08+02:00, aelkin@stripped +4 -7 stripping off the directory part of `pidfile_name' for binlog name generating (which fixes two more bugs on wrong binlog file location); ensuring no overrun for buff can happen anymore (Bug #31836 insufficient space reserved for the suffix of relay log file name); diff -Nrup a/mysql-test/t/rpl_dual_pos_advance.test b/mysql-test/t/rpl_dual_pos_advance.test --- a/mysql-test/t/rpl_dual_pos_advance.test 2007-03-20 12:15:14 +02:00 +++ b/mysql-test/t/rpl_dual_pos_advance.test 2007-11-05 17:20:08 +02:00 @@ -106,9 +106,3 @@ connection slave; sync_with_master; # End of 4.1 tests - -# Cleanup -# The A->B->A replication causes the master to start writing relay logs -# in var/run, remove them -remove_file $MYSQLTEST_VARDIR/run/master-relay-bin.000001; -remove_file $MYSQLTEST_VARDIR/run/master-relay-bin.index; diff -Nrup a/mysql-test/t/rpl_temporary.test b/mysql-test/t/rpl_temporary.test --- a/mysql-test/t/rpl_temporary.test 2007-02-27 15:54:31 +02:00 +++ b/mysql-test/t/rpl_temporary.test 2007-11-05 17:20:08 +02:00 @@ -211,6 +211,8 @@ select * from t1; connection master; drop table t1; +--remove_file $MYSQLTEST_VARDIR/tmp/bug14157.sql + # Delete the anonymous users source include/delete_anonymous_users.inc; diff -Nrup a/sql/log.cc b/sql/log.cc --- a/sql/log.cc 2007-07-30 18:27:30 +03:00 +++ b/sql/log.cc 2007-11-05 17:20:08 +02:00 @@ -448,13 +448,10 @@ const char *MYSQL_LOG::generate_name(con { if (!log_name || !log_name[0]) { - /* - 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. - */ - strmake(buff, pidfile_name,FN_REFLEN-5); - strmov(fn_ext(buff),suffix); - return (const char *)buff; + strmake(buff, pidfile_name, FN_REFLEN - strlen(suffix) - 1); + return (const char *) + fn_format(buff, buff, "", suffix, MYF(MY_REPLACE_EXT|MY_REPLACE_DIR)); + } // get rid of extension if the log is binary to avoid problems if (strip_ext)