List:Commits« Previous MessageNext Message »
From:Luis Soares Date:September 26 2011 4:18pm
Subject:bzr push into mysql-trunk branch (luis.soares:3438 to 3439) Bug#12947248
Bug#12978113
View as plain text  
 3439 Luis Soares	2011-09-26
      BUG#12978113: MTS: TYPOS IN LOGGING TO THE SLAVE ERROR LOG 
      BUG#12947248: MTS: WARNING "TEMPORARY FAILED TRANSACTION 
      RETRY IS NOT SUPPORTED" IS MISPLACED
      
      There were a couple of typos and unclear messages. We fix this
      by:
       
       - rewriting the warning message output when the start slave
         command is issued;
      
       - fixed the existing typo
      
      In addition we also:
      
       - rewrote one information note that goes into the error log
       - limit the MTS info messages that end to the error log by 
         only allowing them when log_warnings > 1.

    modified:
      mysql-test/suite/rpl/r/rpl_parallel_start_stop.result
      sql/rpl_rli_pdb.cc
      sql/rpl_slave.cc
 3438 Jorgen Loland	2011-09-26
      BUG#12837714: ADDITIONAL NULL IN 5.6 ON GROUPED SELECT
      
      The bug was that Cached_item_field::cmp() did not do proper 
      NULL checking: if both buff and the field values were NULL, 
      the result was based on bitwise field comparison. Since a 
      field with NULL value may contain random bits, buff and 
      field were considered different in this case.
      
      The fix is to handle the case where both are NULL: the 
      returned value from the function is now that they are equal.
      
      Note: there are four more Cached_item_* classes: For the int,
      real and decimal versions it is OK to compare cached value 
      to the new value because val_int/decimal/real() return 0 if 
      the value is NULL. For the string cached item, we get the 
      same issue as with Cached_item_field but for this class the 
      case where cached value and new value are both NULL is already 
      handled.
     @ mysql-test/r/group_by.result
        Add regression test for bug 12837714
     @ mysql-test/t/group_by.test
        Add regression test for bug 12837714
     @ sql/item_buff.cc
        Fixed Cached_item_field::cmp() to handle the case where both cached and new field value is NULL.
     @ sql/table.cc
        Remove dead code

    modified:
      mysql-test/r/group_by.result
      mysql-test/t/group_by.test
      sql/item_buff.cc
      sql/table.cc
=== modified file 'mysql-test/suite/rpl/r/rpl_parallel_start_stop.result'
--- a/mysql-test/suite/rpl/r/rpl_parallel_start_stop.result	2011-08-19 13:04:28 +0000
+++ b/mysql-test/suite/rpl/r/rpl_parallel_start_stop.result	2011-09-26 15:39:00 +0000
@@ -59,7 +59,7 @@ set @save.slave_transaction_retries= @@g
 set @@global.slave_transaction_retries= 1;
 start slave sql_thread;
 Warnings:
-Note	1740	Temporary failed transaction retry is not supported in multi-threaded slave mode. Such failure will force the slave to stop.
+Note	1740	slave_transaction_retries is not supported in multi-threaded slave mode. In the event of a transient failure, the slave will not retry the transaction and will stop.
 include/stop_slave.inc
 create table t2 (a int);
 insert into t2 values (1);
@@ -69,7 +69,7 @@ Note	1740	UNTIL condtion is not supporte
 include/wait_for_slave_sql_to_stop.inc
 include/start_slave.inc
 Warnings:
-Note	1740	Temporary failed transaction retry is not supported in multi-threaded slave mode. Such failure will force the slave to stop.
+Note	1740	slave_transaction_retries is not supported in multi-threaded slave mode. In the event of a transient failure, the slave will not retry the transaction and will stop.
 drop table t1;
 drop table t2m;
 drop table t2;

=== modified file 'sql/rpl_rli_pdb.cc'
--- a/sql/rpl_rli_pdb.cc	2011-08-19 13:04:28 +0000
+++ b/sql/rpl_rli_pdb.cc	2011-09-26 15:39:00 +0000
@@ -1352,7 +1352,11 @@ int wait_for_workers_to_finish(Relay_log
   DBUG_ENTER("wait_for_workers_to_finish");
 
   llstr(const_cast<Relay_log_info*>(rli)->get_event_relay_log_pos(), llbuf);
-  sql_print_information("Coordinator enter synchronization when distributes event relay-log: %s pos: %s", const_cast<Relay_log_info*>(rli)->get_event_relay_log_name(), llbuf);
+  if (global_system_variables.log_warnings > 1)
+    sql_print_information("Coordinator and workers enter synchronization procedure "
+                          "when scheduling event relay-log: %s pos: %s", 
+                          const_cast<Relay_log_info*>(rli)->get_event_relay_log_name(), 
+                          llbuf);
 
   for (uint i= 0, ret= 0; i < hash->records; i++)
   {
@@ -1406,7 +1410,10 @@ int wait_for_workers_to_finish(Relay_log
 
   if (!ignore)
   {
-    sql_print_information("Coordinator synchronized with Workers, waited entries: %d, cant_sync: %d", ret, cant_sync);
+    if (global_system_variables.log_warnings > 1)
+      sql_print_information("Coordinator synchronized with Workers, "
+                            "waited entries: %d, cant_sync: %d", 
+                            ret, cant_sync);
 
     const_cast<Relay_log_info*>(rli)->mts_group_status= Relay_log_info::MTS_NOT_IN_GROUP;
   }
@@ -1801,10 +1808,12 @@ int slave_worker_exec_job(Slave_worker *
 err:
   if (error)
   {
-    sql_print_information("Worker %lu is exiting: killed %i, error %i, "
-                          "running_status %d",
-                          worker->id, thd->killed, thd->is_error(),
-                          worker->running_status);
+
+    if (global_system_variables.log_warnings > 1)
+      sql_print_information("Worker %lu is exiting: killed %i, error %i, "
+                            "running_status %d",
+                            worker->id, thd->killed, thd->is_error(),
+                            worker->running_status);
     worker->slave_worker_ends_group(ev, error);
   }
   

=== modified file 'sql/rpl_slave.cc'
--- a/sql/rpl_slave.cc	2011-09-15 17:18:21 +0000
+++ b/sql/rpl_slave.cc	2011-09-26 15:39:00 +0000
@@ -3871,12 +3871,13 @@ pthread_handler_t handle_slave_worker(vo
   mysql_mutex_lock(&w->jobs_lock);
 
   w->running_status= Slave_worker::NOT_RUNNING;
-  sql_print_information("Worker %lu statistics: "
-                        "events processed = %lu "
-                        "hungry waits = %lu "
-                        "priv queue overfills = %llu ",
-                        w->id, w->events_done, w->wq_size_waits_cnt,
-                        w->jobs.waited_overfill);
+  if (global_system_variables.log_warnings > 1)
+    sql_print_information("Worker %lu statistics: "
+                          "events processed = %lu "
+                          "hungry waits = %lu "
+                          "priv queue overfills = %llu ",
+                          w->id, w->events_done, w->wq_size_waits_cnt,
+                          w->jobs.waited_overfill);
   mysql_cond_signal(&w->jobs_cond);  // famous last goodbye
 
   mysql_mutex_unlock(&w->jobs_lock);
@@ -4517,8 +4518,9 @@ void slave_stop_workers(Relay_log_info *
 
     mysql_mutex_unlock(&w->jobs_lock);
 
-    sql_print_information("Notifying Worker %lu to exit, thd %p", w->id,
-                          w->info_thd);
+    if (global_system_variables.log_warnings > 1)
+      sql_print_information("Notifying Worker %lu to exit, thd %p", w->id,
+                            w->info_thd);
   }
 
   thd_proc_info(thd, "Waiting for workers to exit");
@@ -4550,15 +4552,16 @@ void slave_stop_workers(Relay_log_info *
     delete w;
   }
 
-  sql_print_information("MTS coordinator statistics: "
-                        "events processed = %lu "
-                        "Worker queues filled over overrun level = %lu "
-                        "waited due a Worker queue full = %lu "
-                        "waited due the total size = %lu "
-                        "sleept when Workers occupied = %lu ",
-                        rli->mts_events_assigned, rli->mts_wq_overrun_cnt,
-                        rli->mts_wq_overfill_cnt, rli->wq_size_waits_cnt,
-                        rli->mts_wq_no_underrun_cnt);
+  if (global_system_variables.log_warnings > 1)
+    sql_print_information("Multi-threaded slave statistics: "
+                          "events processed = %lu ;"
+                          "worker queues filled over overrun level = %lu ;"
+                          "waited due a Worker queue full = %lu ;"
+                          "waited due the total size = %lu ;"
+                          "slept when Workers occupied = %lu ",
+                          rli->mts_events_assigned, rli->mts_wq_overrun_cnt,
+                          rli->mts_wq_overfill_cnt, rli->wq_size_waits_cnt,
+                          rli->mts_wq_no_underrun_cnt);
 
   DBUG_ASSERT(rli->pending_jobs == 0);
   DBUG_ASSERT(rli->mts_pending_jobs_size == 0);
@@ -6800,8 +6803,9 @@ int start_slave(THD* thd , Master_info*
           push_warning_printf(thd, Sql_condition::WARN_LEVEL_NOTE,
                               ER_MTS_FEATURE_IS_NOT_SUPPORTED,
                               ER(ER_MTS_FEATURE_IS_NOT_SUPPORTED),
-                              "Temporary failed transaction retry",
-                              "Such failure will force the slave to stop.");
+                              "slave_transaction_retries",
+                              "In the event of a transient failure, the slave will "
+                              "not retry the transaction and will stop.");
         }
       }
       else if (thd->lex->mi.pos || thd->lex->mi.relay_log_pos)

No bundle (reason: useless for push emails).
Thread
bzr push into mysql-trunk branch (luis.soares:3438 to 3439) Bug#12947248Bug#12978113Luis Soares26 Sep