[Commits] Rev 4273: MDEV-6120: When slave stops with error, error message should indicate the failing GTID in http://bazaar.launchpad.net/~maria-captains/maria/10.0

knielsen at knielsen-hq.org knielsen at knielsen-hq.org
Mon Jul 7 12:07:14 EEST 2014


At http://bazaar.launchpad.net/~maria-captains/maria/10.0

------------------------------------------------------------
revno: 4273
revision-id: knielsen at knielsen-hq.org-20140707090714-99bsuk1eb6wn32k5
parent: jplindst at mariadb.org-20140704050927-7h2erk6q5kgmjvoc
committer: Kristian Nielsen <knielsen at knielsen-hq.org>
branch nick: tmp
timestamp: Mon 2014-07-07 11:07:14 +0200
message:
  MDEV-6120: When slave stops with error, error message should indicate the failing GTID
  
  Follow-up patch. The original patch added an extra argument to the
  rli->report() function, however it was forgotten to adjust the calls in
  log_event_old.cc accordingly.
  
  This patch updates log_event_old.cc as needed. It just adds NULL, since this
  is only for old event formats from ancient master servers, which would not
  have any GTID information to add to the error messages in any case.
=== modified file 'sql/log_event_old.cc'
--- a/sql/log_event_old.cc	2014-06-25 13:17:03 +0000
+++ b/sql/log_event_old.cc	2014-07-07 09:07:14 +0000
@@ -108,7 +108,7 @@ Old_rows_log_event::do_apply_event(Old_r
           Error reporting borrowed from Query_log_event with many excessive
           simplifications (we don't honour --slave-skip-errors)
         */
-        rli->report(ERROR_LEVEL, actual_error,
+        rli->report(ERROR_LEVEL, actual_error, NULL,
                     "Error '%s' on opening tables",
                     (actual_error ? ev_thd->get_stmt_da()->message() :
                      "unexpected success or fatal error"));
@@ -233,7 +233,7 @@ Old_rows_log_event::do_apply_event(Old_r
   break;
 
       default:
-  rli->report(ERROR_LEVEL, ev_thd->get_stmt_da()->sql_errno(),
+  rli->report(ERROR_LEVEL, ev_thd->get_stmt_da()->sql_errno(), NULL,
                     "Error in %s event: row application failed. %s",
                     ev->get_type_str(),
                     ev_thd->is_error() ? ev_thd->get_stmt_da()->message() : "");
@@ -250,7 +250,7 @@ Old_rows_log_event::do_apply_event(Old_r
 
   if (error)
   {                     /* error has occured during the transaction */
-    rli->report(ERROR_LEVEL, ev_thd->get_stmt_da()->sql_errno(),
+    rli->report(ERROR_LEVEL, ev_thd->get_stmt_da()->sql_errno(), NULL,
                 "Error in %s event: error during transaction execution "
                 "on table %s.%s. %s",
                 ev->get_type_str(), table->s->db.str,
@@ -1498,7 +1498,7 @@ int Old_rows_log_event::do_apply_event(r
           simplifications (we don't honour --slave-skip-errors)
         */
         uint actual_error= thd->net.last_errno;
-        rli->report(ERROR_LEVEL, actual_error,
+        rli->report(ERROR_LEVEL, actual_error, NULL,
                     "Error '%s' in %s event: when locking tables",
                     (actual_error ? thd->net.last_error :
                      "unexpected success or fatal error"),
@@ -1507,7 +1507,7 @@ int Old_rows_log_event::do_apply_event(r
       }
       else
       {
-        rli->report(ERROR_LEVEL, error,
+        rli->report(ERROR_LEVEL, error, NULL,
                     "Error in %s event: when locking tables",
                     get_type_str());
       }
@@ -1653,7 +1653,7 @@ int Old_rows_log_event::do_apply_event(r
         break;
 
       default:
-        rli->report(ERROR_LEVEL, thd->net.last_errno,
+        rli->report(ERROR_LEVEL, thd->net.last_errno, NULL,
                     "Error in %s event: row application failed. %s",
                     get_type_str(),
                     thd->net.last_error ? thd->net.last_error : "");
@@ -1691,7 +1691,7 @@ int Old_rows_log_event::do_apply_event(r
 
   if (error)
   {                     /* error has occured during the transaction */
-    rli->report(ERROR_LEVEL, thd->net.last_errno,
+    rli->report(ERROR_LEVEL, thd->net.last_errno, NULL,
                 "Error in %s event: error during transaction execution "
                 "on table %s.%s. %s",
                 get_type_str(), table->s->db.str,
@@ -1774,7 +1774,7 @@ int Old_rows_log_event::do_apply_event(r
     */
     DBUG_ASSERT(! thd->transaction_rollback_request);
     if ((error= (binlog_error ? trans_rollback_stmt(thd) : trans_commit_stmt(thd))))
-      rli->report(ERROR_LEVEL, error,
+      rli->report(ERROR_LEVEL, error, NULL,
                   "Error in %s event: commit of row events failed, "
                   "table `%s`.`%s`",
                   get_type_str(), m_table->s->db.str,



More information about the commits mailing list