List:Commits« Previous MessageNext Message »
From:Alexander Nozdrin Date:February 11 2008 12:04pm
Subject:bk commit into 5.1 tree (anozdrin:1.2543)
View as plain text  
Below is the list of changes that have just been committed into a local
5.1 repository of anozdrin.  When anozdrin does a push these changes
will be propagated to the main repository and, within 24 hours after the
push, to the public repository.
For information on how to access the public repository
see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html

ChangeSet@stripped, 2008-02-11 14:04:30+03:00, anozdrin@quad. +4 -0
  Patch to eliminate some valgrind warnings in debug printout code.
  
  (originally from Mats)

  sql/rpl_rli.cc@stripped, 2008-02-11 14:04:29+03:00, anozdrin@quad. +4 -1
    Adding variable to mark an instance of Relay_log_info as fake.

  sql/rpl_rli.h@stripped, 2008-02-11 14:04:29+03:00, anozdrin@quad. +4 -0
    Adding variable to mark an instance of Relay_log_info as fake.

  sql/slave.cc@stripped, 2008-02-11 14:04:29+03:00, anozdrin@quad. +14 -8
    Not printing debug information if we are working with a fake
    instance of Relay_log_info. This because the result of calling
    update is nonsense, and trying to print it generates valgrind
    warnings.

  sql/sql_binlog.cc@stripped, 2008-02-11 14:04:29+03:00, anozdrin@quad. +3 -0
    Marking newly created instance of Relay_log_info as a fake instance.

diff -Nrup a/sql/rpl_rli.cc b/sql/rpl_rli.cc
--- a/sql/rpl_rli.cc	2008-02-05 10:22:17 +03:00
+++ b/sql/rpl_rli.cc	2008-02-11 14:04:29 +03:00
@@ -33,7 +33,10 @@ Relay_log_info::Relay_log_info()
   :Slave_reporting_capability("SQL"),
    no_storage(FALSE), replicate_same_server_id(::replicate_same_server_id),
    info_fd(-1), cur_log_fd(-1), save_temporary_tables(0),
-   group_relay_log_pos(0),
+   group_relay_log_pos(0), event_relay_log_pos(0),
+#if HAVE_purify
+   is_fake(FALSE),
+#endif
    cur_log_old_open_count(0), group_master_log_pos(0), log_space_total(0),
    ignore_log_space_limit(0), last_master_timestamp(0), slave_skip_counter(0),
    abort_pos_wait(0), slave_run_id(0), sql_thd(0),
diff -Nrup a/sql/rpl_rli.h b/sql/rpl_rli.h
--- a/sql/rpl_rli.h	2007-10-22 10:49:59 +04:00
+++ b/sql/rpl_rli.h	2008-02-11 14:04:29 +03:00
@@ -154,6 +154,10 @@ public:
   ulonglong event_relay_log_pos;
   ulonglong future_event_relay_log_pos;
 
+#ifdef HAVE_purify
+  bool is_fake; /* Mark that this is a fake relay log info structure */
+#endif
+
   /* 
      Original log name and position of the group we're currently executing
      (whose coordinates are group_relay_log_name/pos in the relay log)
diff -Nrup a/sql/slave.cc b/sql/slave.cc
--- a/sql/slave.cc	2008-01-31 18:31:50 +03:00
+++ b/sql/slave.cc	2008-02-11 14:04:29 +03:00
@@ -1892,14 +1892,19 @@ int apply_event_and_update_pos(Log_event
   if (exec_res == 0)
   {
     int error= ev->update_pos(rli);
-    char buf[22];
-    DBUG_PRINT("info", ("update_pos error = %d", error));
-    DBUG_PRINT("info", ("group %s %s",
-                        llstr(rli->group_relay_log_pos, buf),
-                        rli->group_relay_log_name));
-    DBUG_PRINT("info", ("event %s %s",
-                        llstr(rli->event_relay_log_pos, buf),
-                        rli->event_relay_log_name));
+#ifdef HAVE_purify
+    if (!rli->is_fake)
+#endif
+    {
+      char buf[22];
+      DBUG_PRINT("info", ("update_pos error = %d", error));
+      DBUG_PRINT("info", ("group %s %s",
+                          llstr(rli->group_relay_log_pos, buf),
+                          rli->group_relay_log_name));
+      DBUG_PRINT("info", ("event %s %s",
+                          llstr(rli->event_relay_log_pos, buf),
+                          rli->event_relay_log_name));
+    }
     /*
       The update should not fail, so print an error message and
       return an error code.
@@ -1909,6 +1914,7 @@ int apply_event_and_update_pos(Log_event
     */
     if (error)
     {
+      char buf[22];
       rli->report(ERROR_LEVEL, ER_UNKNOWN_ERROR,
                   "It was not possible to update the positions"
                   " of the relay log information: the slave may"
diff -Nrup a/sql/sql_binlog.cc b/sql/sql_binlog.cc
--- a/sql/sql_binlog.cc	2007-12-19 17:05:33 +03:00
+++ b/sql/sql_binlog.cc	2008-02-11 14:04:29 +03:00
@@ -56,6 +56,9 @@ void mysql_client_binlog_statement(THD* 
   if (!thd->rli_fake)
   {
     thd->rli_fake= new Relay_log_info;
+#ifdef HAVE_purify
+    thd->rli_fake->is_fake= TRUE;
+#endif
     have_fd_event= FALSE;
   }
   if (thd->rli_fake &&
!thd->rli_fake->relay_log.description_event_for_exec)
Thread
bk commit into 5.1 tree (anozdrin:1.2543)Alexander Nozdrin11 Feb