On 03/28/2011 03:18 PM, Andrei Elkin wrote:
> file:///home/andrei/MySQL/BZR/2a-23May/FIXES/bug11763265-55956-mysqlbinlog_raw_mode/ based
> on revid:georgi.kodinov@stripped
> 3327 Andrei Elkin 2011-03-28
> bug#11763265 Potential bug with new --raw mode with mysqlbinlog
> There are two reported artifacts on possible operations with uninitialazed
> Log_event* pointer
> inside dump_remote_log_entries().
Two? Which ones?
> In fact, under --raw mode only Load-data events generated by pre 5.0.3 servers
> is the valid issue.
s/is the/are/ s/issue/issues/
> That relates to the assignment Load_log_event *le= (Load_log_event*)ev
> where rhs is not initialized when --raw.
> Rotate event is indeed handled correctly.
> Fixed with enforcing all events incl LOAD_EVENT, CREATE_FILE_EVENT to be dumped
> as raw_mode
s/with/by/ s/to be//
> is supposed to do without instantiation of the event.
s/is supposed to do//
> In case of CREATE_FILE_EVENT another artifact is corrected to pass such event
> to re-formatting
> to yield an event of the latest binlog-format.
Can you improve this comment?
> @ client/mysqlbinlog.cc
> In case not raw_mode LOAD_EVENT and CREATE_FILE_EVENT require conversion into
> the current load-data formats. In case of raw_mode all events including the two does not
> need any extra treatment.
> === modified file 'client/mysqlbinlog.cc'
> --- a/client/mysqlbinlog.cc 2011-01-18 12:09:03 +0000
> +++ b/client/mysqlbinlog.cc 2011-03-28 14:17:59 +0000
> @@ -1673,8 +1673,7 @@ static Exit_status dump_remote_log_entri
> ev->register_temp_buf((char *) net->read_pos + 1);
> - if (glob_description_event->binlog_version >= 3 ||
> - (type != LOAD_EVENT && type != CREATE_FILE_EVENT))
> + if (raw_mode || (type != LOAD_EVENT && type != CREATE_FILE_EVENT))
> If this is a Rotate event, maybe it's the end of the requested binlog;