Lars, hi.
> Hi Andrei,
>
> This patch is only fixing what is written to the index file.
>
> I don't think this is enough, since BUG#28597 is about an index file
> that already exists on the master. With the exact same file as given
> in the bug report, the replication should still work.
>
The problem of the bug is in that \cite{cset_comments}
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.
That bug20166 changes forced writing the names of generated binlog file names
in the absolute path format whereas they had been written in the
relative path format previously, which was correct.
The patch that cures from this artifact definitely has to strip the dir
name part to get the prior-bug20166 behaviour.
Stripping could be done either by reverting the changes of bug#20166
or the way I did which also address a pending todo.
Anything wrong with this still?
regards,
Andrei
> Best wishes,
> Lars
>
>
> On Fri, Oct 19, 2007 at 03:02:19PM +0300, Andrei Elkin wrote:
>> 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)
>>
>> --
>> MySQL Code Commits Mailing List
>> For list archives: http://lists.mysql.com/commits
>> To unsubscribe: http://lists.mysql.com/commits?unsub=1
>
> --
> Dr. Lars Thalmann
> Replication and Clustering Technology
> MySQL AB, www.mysql.com
--
Andrei Elkin, Software Developer, PhD
MySQL Finland Oy, Helsinki, Finland, www.mysql.com
Are you MySQL certified? www.mysql.com/certification