List:Commits« Previous MessageNext Message »
From:Andrei Elkin Date:June 21 2011 11:32am
Subject:bzr commit into mysql-next-mr-wl5569 branch (andrei.elkin:3313) WL#5569
View as plain text  
#At file:///home/andrei/MySQL/BZR/2a-23May/WL/mysql-next-mr-wl5569/ based on revid:alfranio.correia@stripped

 3313 Andrei Elkin	2011-06-21
      wl#5569 MTS
      
      fixing few valgrind warnings.
     @ sql/log_event.cc
        Checking running status instead of THD::killed for the worker.
     @ sql/rpl_rli_pdb.cc
        Valgrind sensitive assert is commented out.
     @ sql/rpl_slave.cc
        Relocating a print-out to an earlier executing point where anynchrounously
        deletable event is still available.

    modified:
      sql/log_event.cc
      sql/rpl_rli_pdb.cc
      sql/rpl_slave.cc
=== modified file 'sql/log_event.cc'
--- a/sql/log_event.cc	2011-06-19 09:33:36 +0000
+++ b/sql/log_event.cc	2011-06-21 11:32:21 +0000
@@ -2801,7 +2801,7 @@ void append_item_to_jobs(slave_job_item 
   mysql_mutex_lock(&w->jobs_lock);
 
   // possible WQ overfill
-  while (!w->info_thd->killed && !thd->killed &&
+  while (w->running_status == Slave_worker::RUNNING && !thd->killed &&
          (ret= en_queue(&w->jobs, job_item)) == -1)
   {
     const char *old_msg;

=== modified file 'sql/rpl_rli_pdb.cc'
--- a/sql/rpl_rli_pdb.cc	2011-06-20 22:19:06 +0000
+++ b/sql/rpl_rli_pdb.cc	2011-06-21 11:32:21 +0000
@@ -308,9 +308,14 @@ static void free_entry(db_worker_hash_en
   DBUG_PRINT("info", ("free_entry %s, %d", entry->db, (int) strlen(entry->db)));
 
   DBUG_ASSERT(c_thd->system_thread == SYSTEM_THREAD_SLAVE_SQL);
-  DBUG_ASSERT(entry->usage == 0 ||
-              !entry->worker    ||  // the last entry owner could have errored out
-              entry->worker->running_status != Slave_worker::RUNNING);
+
+  /*
+    Although assert is correct valgrind senses entry->worker can be freed.
+
+    DBUG_ASSERT(entry->usage == 0 ||
+                !entry->worker    ||  // last entry owner could have errored out
+                entry->worker->running_status != Slave_worker::RUNNING);
+  */
 
   mts_move_temp_tables_to_thd(c_thd, entry->temporary_tables);
   entry->temporary_tables= NULL;

=== modified file 'sql/rpl_slave.cc'
--- a/sql/rpl_slave.cc	2011-06-20 13:32:33 +0000
+++ b/sql/rpl_slave.cc	2011-06-21 11:32:21 +0000
@@ -2832,15 +2832,14 @@ int apply_event_and_update_pos(Log_event
           rli->curr_group_da.elements= 0;
         }
 
-        //job_item->data= ev;
-        /* Notice `ev' instance can be destoyed after `append()' */
-        append_item_to_jobs(job_item, w, rli);
         /*
           ALFRANIO --> Add more debug messages.
         */
         DBUG_PRINT("Mts-jobs", ("Assigning Jobs %lu to Worker %lu\n",
                    (long unsigned int) ((Log_event* )job_item->data)->log_pos, w->id));
 
+        /* Notice `ev' instance can be destoyed after `append()' */
+        append_item_to_jobs(job_item, w, rli);
         if (need_sync)
         {
           /*


Attachment: [text/bzr-bundle] bzr/andrei.elkin@oracle.com-20110621113221-nwi76apwpd3ltdcu.bundle
Thread
bzr commit into mysql-next-mr-wl5569 branch (andrei.elkin:3313) WL#5569Andrei Elkin21 Jun