diff options
author | Luis Soares <luis.soares@sun.com> | 2009-06-07 23:28:08 +0100 |
---|---|---|
committer | Luis Soares <luis.soares@sun.com> | 2009-06-07 23:28:08 +0100 |
commit | 1b1ca7fe38bdabed77f3009d818f2499f72f8d96 (patch) | |
tree | 7876648a28fb4c65d7d97b7422c111957d83d88c /sql/log_event.h | |
parent | 206bdd67c67fb28c014b873ac6732e99139d31c4 (diff) | |
download | mariadb-git-1b1ca7fe38bdabed77f3009d818f2499f72f8d96.tar.gz |
BUG#42941: --database paramater to mysqlbinlog fails with RBR
mysqlbinlog --database parameter was being ignored when processing
row events. As such no event filtering would take place.
This patch addresses this by deploying a call to shall_skip_database
when table_map_events are handled (as these contain also the name of
the database). All other rows events referencing the table id for the
filtered map event, will also be skipped.
client/mysqlbinlog.cc:
Added shall_skip_database call to the part of the code that handles
Table_map_log_events. It inspects the database name and decides whether
to filter the event or not. Furthermore, if table map event is filtered
next events referencing the table id in the table map event, will also
be filtered.
mysql-test/suite/binlog/t/binlog_row_mysqlbinlog_db_filter.test:
Test case that checks if row events are actually filtered out.
sql/log_event.h:
Added a map for holding the currently ignored table map events.
Table map events are inserted when they shall be skipped and removed
once the last row event in the statement is processed.
Diffstat (limited to 'sql/log_event.h')
-rw-r--r-- | sql/log_event.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/sql/log_event.h b/sql/log_event.h index bda53da8ab0..c3cf6cf297a 100644 --- a/sql/log_event.h +++ b/sql/log_event.h @@ -676,6 +676,7 @@ typedef struct st_print_event_info #ifdef MYSQL_CLIENT uint verbose; table_mapping m_table_map; + table_mapping m_table_map_ignored; #endif /* |