List:Commits« Previous MessageNext Message »
From:Venkatesh Duggirala Date:January 26 2013 9:55am
Subject:bzr push into mysql-5.6 branch (venkatesh.duggirala:4672 to 4673)
Bug#16056813
View as plain text  
 4673 Venkatesh Duggirala	2013-01-26 [merge]
      BUG#16056813 -MEMORY LEAK ON FILTERED SLAVE 
      Merging fix from mysql-5.5 
      (Merge = NULL merge from mysql-5.5 + Deletion of dead code in mysql-5.6 )
     @ sql/log_event.h
        Adding detailed comment about worker member

    modified:
      sql/log_event.h
      sql/rpl_rli.h
      sql/rpl_slave.cc
      sql/rpl_utility.cc
      sql/rpl_utility.h
 4672 Marko Mäkelä	2013-01-24
      Bug#16063835 ASSERT THR ROW_UPD_CHANGES_ORD_FIELD_BINARY_FUNC,
      ROW_LOG_TABLE_APPLY_UPDATE
      
      btr_cur_pessimistic_update(), btr_cur_optimistic_update(),
      btr_cur_update_in_place(): Require thr!=NULL. Allow
      thr->graph->trx->id != trx_id during online table rebuild, as neither
      trx_id nor thr->graph->trx->id will be written to the record due to
      BTR_KEEP_SYS_FLAG.
      
      row_log_table_apply_update(): Pass thr to btr_cur_pessimistic_insert()
      in order to avoid the debug assertion failure.
      
      rb#1892

    modified:
      storage/innobase/btr/btr0cur.cc
      storage/innobase/include/btr0cur.h
      storage/innobase/row/row0log.cc
=== modified file 'sql/log_event.h'
--- a/sql/log_event.h	revid:marko.makela@stripped6teavnkp
+++ b/sql/log_event.h	revid:venkatesh.duggirala@oracle.com-20130126093550-6htiq7zlxt7ig7up
@@ -1133,6 +1133,8 @@ public:
 
   /**
     MTS: associating the event with either an assigned Worker or Coordinator.
+    Additionally the member serves to tag deferred (IRU) events to avoid
+    the event regular time destruction.
   */
   Relay_log_info *worker;
 

=== modified file 'sql/rpl_rli.h'
--- a/sql/rpl_rli.h	revid:marko.makela@stripped30124151343-vt0xpnt36teavnkp
+++ b/sql/rpl_rli.h	revid:venkatesh.duggirala@stripped7up
@@ -652,14 +652,6 @@ public:
   /*
    * End of MTS section ******************************************************/
 
-  /* 
-     Returns true if the argument event resides in the containter;
-     more specifically, the checking is done against the last added event.
-  */
-  bool is_deferred_event(Log_event * ev)
-  {
-    return deferred_events_collecting ? deferred_events->is_last(ev) : false;
-  };
   /* The general cleanup that slave applier may need at the end of query. */
   inline void cleanup_after_query()
   {

=== modified file 'sql/rpl_slave.cc'
--- a/sql/rpl_slave.cc	revid:marko.makela@stripped124151343-vt0xpnt36teavnkp
+++ b/sql/rpl_slave.cc	revid:venkatesh.duggirala@strippedg7up
@@ -3714,6 +3714,11 @@ static int exec_relay_log_event(THD* thd
       mysql_mutex_unlock(&rli->data_lock);
     */
 
+    /* For deferred events, the ptr_ev is set to NULL
+        in Deferred_log_events::add() function.
+        Hence deferred events wont be deleted here.
+        They will be deleted in Deferred_log_events::rewind() funciton.
+    */
     if (*ptr_ev)
     {
       DBUG_ASSERT(*ptr_ev == ev); // event remains to belong to Coordinator

=== modified file 'sql/rpl_utility.cc'
--- a/sql/rpl_utility.cc	revid:marko.makela@stripped43-vt0xpnt36teavnkp
+++ b/sql/rpl_utility.cc	revid:venkatesh.duggirala@stripped
@@ -1481,19 +1481,18 @@ Hash_slave_rows::make_hash_key(TABLE *ta
 
 #if defined(MYSQL_SERVER) && defined(HAVE_REPLICATION)
 
-Deferred_log_events::Deferred_log_events(Relay_log_info *rli) : last_added(NULL)
+Deferred_log_events::Deferred_log_events(Relay_log_info *rli)
 {
   my_init_dynamic_array(&array, sizeof(Log_event *), 32, 16);
 }
 
-Deferred_log_events::~Deferred_log_events() 
+Deferred_log_events::~Deferred_log_events()
 {
   delete_dynamic(&array);
 }
 
 int Deferred_log_events::add(Log_event *ev)
 {
-  last_added= ev;
   insert_dynamic(&array, (uchar*) &ev);
   ev->worker= NULL; // to mark event busy avoiding deletion
   return 0;

=== modified file 'sql/rpl_utility.h'
--- a/sql/rpl_utility.h	revid:marko.makela@stripped-20130124151343-vt0xpnt36teavnkp
+++ b/sql/rpl_utility.h	revid:venkatesh.duggirala@stripped7zlxt7ig7up
@@ -462,7 +462,6 @@ class Deferred_log_events
 {
 private:
   DYNAMIC_ARRAY array;
-  Log_event *last_added;
 
 public:
   Deferred_log_events(Relay_log_info *rli);
@@ -472,7 +471,6 @@ public:
   bool is_empty();
   bool execute(Relay_log_info *rli);
   void rewind();
-  bool is_last(Log_event *ev) { return ev == last_added; };
 };
 
 #endif

No bundle (reason: useless for push emails).
Thread
bzr push into mysql-5.6 branch (venkatesh.duggirala:4672 to 4673)Bug#16056813Venkatesh Duggirala11 Mar