diff options
author | Michael Widenius <monty@askmonty.org> | 2011-05-03 19:10:10 +0300 |
---|---|---|
committer | Michael Widenius <monty@askmonty.org> | 2011-05-03 19:10:10 +0300 |
commit | 1be5462d59fa5fbd1ca92286c3a0a049c00f4bb9 (patch) | |
tree | 17ba1ed90233efa64bc83364ed1ffb74dd637ead /client/mysqlbinlog.cc | |
parent | ce55d37929fc91b476541d3a77336a44b20317ac (diff) | |
parent | 90e058e0c623f770ee602ebab86e91303f08c90a (diff) | |
download | mariadb-git-1be5462d59fa5fbd1ca92286c3a0a049c00f4bb9.tar.gz |
Merge with MariaDB 5.1
Diffstat (limited to 'client/mysqlbinlog.cc')
-rw-r--r-- | client/mysqlbinlog.cc | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/client/mysqlbinlog.cc b/client/mysqlbinlog.cc index b6668161ce5..5d458090352 100644 --- a/client/mysqlbinlog.cc +++ b/client/mysqlbinlog.cc @@ -756,10 +756,18 @@ Exit_status process_event(PRINT_EVENT_INFO *print_event_info, Log_event *ev, */ start_datetime= 0; offset= 0; // print everything and protect against cycling rec_count + /* + Skip events according to the --server-id flag. However, don't + skip format_description or rotate events, because they they + are really "global" events that are relevant for the entire + binlog, even if they have a server_id. Also, we have to read + the format_description event so that we can parse subsequent + events. + */ + if (ev_type != ROTATE_EVENT && + server_id && (server_id != ev->server_id)) + goto end; } - if (server_id && (server_id != ev->server_id)) - /* skip just this event, continue processing the log. */ - goto end; if (((my_time_t)(ev->when) >= stop_datetime) || (pos >= stop_position_mot)) { |