summaryrefslogtreecommitdiff
path: root/client
diff options
context:
space:
mode:
authorSujatha Sivakumar <sujatha.sivakumar@oracle.com>2013-03-18 15:03:54 +0530
committerSujatha Sivakumar <sujatha.sivakumar@oracle.com>2013-03-18 15:03:54 +0530
commitc4837b366a83811b226d7dd165b5a23b2f14f5ed (patch)
tree0c54e71ffd126348667ebd58682b95d9047cc63b /client
parent913d6e230db4bd92991e4a4063f1fa82d5be5a30 (diff)
parentddc0cff344d44160ea2c054f7fc8005aaa85b31a (diff)
downloadmariadb-git-c4837b366a83811b226d7dd165b5a23b2f14f5ed.tar.gz
merge from mysql-5.1 to mysql-5.5
Diffstat (limited to 'client')
-rw-r--r--client/mysqlbinlog.cc46
1 files changed, 31 insertions, 15 deletions
diff --git a/client/mysqlbinlog.cc b/client/mysqlbinlog.cc
index 461e704a1f8..c0c502516e4 100644
--- a/client/mysqlbinlog.cc
+++ b/client/mysqlbinlog.cc
@@ -1,5 +1,5 @@
/*
- Copyright (c) 2000, 2012, Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -943,20 +943,37 @@ Exit_status process_event(PRINT_EVENT_INFO *print_event_info, Log_event *ev,
case PRE_GA_DELETE_ROWS_EVENT:
case PRE_GA_UPDATE_ROWS_EVENT:
{
- if (ev_type != TABLE_MAP_EVENT)
+ bool stmt_end= FALSE;
+ Table_map_log_event *ignored_map= NULL;
+
+ if (ev_type == WRITE_ROWS_EVENT ||
+ ev_type == DELETE_ROWS_EVENT ||
+ ev_type == UPDATE_ROWS_EVENT)
{
- Rows_log_event *e= (Rows_log_event*) ev;
- Table_map_log_event *ignored_map=
- print_event_info->m_table_map_ignored.get_table(e->get_table_id());
- bool skip_event= (ignored_map != NULL);
-
- /*
- end of statement check:
- i) destroy/free ignored maps
- ii) if skip event, flush cache now
- */
- if (e->get_flags(Rows_log_event::STMT_END_F))
- {
+ Rows_log_event *new_ev= (Rows_log_event*) ev;
+ if (new_ev->get_flags(Rows_log_event::STMT_END_F))
+ stmt_end= TRUE;
+ ignored_map= print_event_info->m_table_map_ignored.get_table(new_ev->get_table_id());
+ }
+ else if (ev_type == PRE_GA_WRITE_ROWS_EVENT ||
+ ev_type == PRE_GA_DELETE_ROWS_EVENT ||
+ ev_type == PRE_GA_UPDATE_ROWS_EVENT)
+ {
+ Old_rows_log_event *old_ev= (Old_rows_log_event*) ev;
+ if (old_ev->get_flags(Rows_log_event::STMT_END_F))
+ stmt_end= TRUE;
+ ignored_map= print_event_info->m_table_map_ignored.get_table(old_ev->get_table_id());
+ }
+
+ bool skip_event= (ignored_map != NULL);
+ /*
+ end of statement check:
+ i) destroy/free ignored maps
+ ii) if skip event, flush cache now
+ */
+ if (stmt_end)
+ {
+
/*
Now is safe to clear ignored map (clear_tables will also
delete original table map events stored in the map).
@@ -983,7 +1000,6 @@ Exit_status process_event(PRINT_EVENT_INFO *print_event_info, Log_event *ev,
/* skip the event check */
if (skip_event)
goto end;
- }
/*
These events must be printed in base64 format, if printed.
base64 format requires a FD event to be safe, so if no FD