[Commits] 00b665ce76c: Version 1

sujatha sujatha.sivakumar at mariadb.com
Sat Apr 13 10:06:58 EEST 2019


revision-id: 00b665ce76cf270c40bcd5eee926c3ced86becc6 (mariadb-10.2.23-34-g00b665ce76c)
parent(s): e3f44d8d0eb0277312391686672f81a460094917
author: Sujatha Sivakumar
committer: Sujatha Sivakumar
timestamp: 2019-04-13 10:06:58 +0300
message:

Version 1

---
 client/mysqlbinlog.cc | 15 ++++++++-------
 1 file changed, 8 insertions(+), 7 deletions(-)

diff --git a/client/mysqlbinlog.cc b/client/mysqlbinlog.cc
index cfc05cbf794..785d1b93255 100644
--- a/client/mysqlbinlog.cc
+++ b/client/mysqlbinlog.cc
@@ -189,7 +189,7 @@ Log_event* read_remote_annotate_event(uchar* net_buf, ulong event_len,
                                       const char **error_msg)
 {
   uchar *event_buf;
-  Log_event* event;
+  Log_event* event= NULL;
 
   if (!(event_buf= (uchar*) my_malloc(event_len + 1, MYF(MY_WME))))
   {
@@ -227,8 +227,7 @@ void print_annotate_event(PRINT_EVENT_INFO *print_event_info)
   if (annotate_event)
   {
     annotate_event->print(result_file, print_event_info);
-    delete annotate_event;  // the event should not be printed more than once
-    annotate_event= 0;
+    free_annotate_event();
   }
 }
 
@@ -995,6 +994,7 @@ static bool print_row_event(PRINT_EVENT_INFO *print_event_info, Log_event *ev,
       {
         e= *(dynamic_element(&events_in_stmt, i, Log_event**));
         delete e;
+	e= NULL;
       }
       reset_dynamic(&events_in_stmt);
 
@@ -1465,7 +1465,7 @@ Exit_status process_event(PRINT_EVENT_INFO *print_event_info, Log_event *ev,
       if (print_row_event(print_event_info, ev, e->get_table_id(),
                           e->get_flags(Rows_log_event::STMT_END_F)))
         goto err;
-      if (!is_stmt_end)
+      if (opt_flashback && !is_stmt_end)
         destroy_evt= FALSE;
       break;
     }
@@ -1478,7 +1478,7 @@ Exit_status process_event(PRINT_EVENT_INFO *print_event_info, Log_event *ev,
       if (print_row_event(print_event_info, ev, e->get_table_id(),
                           e->get_flags(Old_rows_log_event::STMT_END_F)))
         goto err;
-      if (!is_stmt_end)
+      if (opt_flashback && !is_stmt_end)
         destroy_evt= FALSE;
       break;
     }
@@ -1539,10 +1539,11 @@ Exit_status process_event(PRINT_EVENT_INFO *print_event_info, Log_event *ev,
       }
     }
 
-    if (remote_opt)
-      ev->temp_buf= 0;
     if (destroy_evt) /* destroy it later if not set (ignored table map) */
+    {
       delete ev;
+      ev= NULL;
+    }
   }
   DBUG_RETURN(retval);
 }


More information about the commits mailing list