diff options
author | Sven Sandberg <sven.sandberg@oracle.com> | 2011-03-25 15:35:45 +0100 |
---|---|---|
committer | Sven Sandberg <sven.sandberg@oracle.com> | 2011-03-25 15:35:45 +0100 |
commit | 732992c693ecaa091690657961415bc52cbb33bc (patch) | |
tree | d213422c9847924f7fb0aefc823ccf3c9fcc6566 /client | |
parent | 52a01765bd9410ac13ca3bf2d163594eb40cbd53 (diff) | |
parent | 257e39aa44a9d035575846ad4f3e3a0fbeff0667 (diff) | |
download | mariadb-git-732992c693ecaa091690657961415bc52cbb33bc.tar.gz |
Merged BUG#11766427, BUG#59539 from 5.1 to 5.5.
No conflicts.
Diffstat (limited to 'client')
-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 91b075a8970..e8a37ecfe5f 100644 --- a/client/mysqlbinlog.cc +++ b/client/mysqlbinlog.cc @@ -714,10 +714,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)) { |